@Crell @phphil and auto wiring can be disabled.
I never found a problem with auto wiring. SOLID code supports very well the auto-wiring.
author of eureka-framework (with PSR-7) and some other components, like ORM, validator...
Also author of MySQL Queue system (for small queue < 100k): php-mqdb
working with PHP since more than 20 years
@dgoosens yes only for direct class. Instanceof will cover parents and interfaces.
@dgoosens for now, I tend to use this notation:
```php
match($foo::class) {
Foo::class => //...
Bar::class => //...
Oof::class, Rab::class => //...
BazInterface::class => //...
default => //...
}
```
A little bit more verbose, but currently works :)
I'm delighted to announce that FrankenPHP is now officially supported by the @thephpf, that the project repository will be moved to the @php organization on GitHub, and that the collaboration between the PHP project, the Caddy web server, and @cooptilleuls will intensify even further!
PHP is kicking!
https://les-tilleuls.coop/en/blog/frankenphp-is-now-officially-supported-by-the-php-foundation
@Girgias Love and force to you. As a PHP dev, I need you and all core maintainers.
You do so great work on PHP!
Please, continue to make PHP so great and modern. ❤️❤️
@b_viguier
1. Dictatorship for my part.
In fact, when I create a new project, it has a goal. Then, using democratic path can lead to path I don't want for my projects.
But even if I prefer the dictatorship way, I'm open and listen to any suggestions. If any change seems going to the wrong direction, I must tell why it seems not good to me for the project.
So, dictatorship way, but opened to debate :)
@awoodsnet
1. PHP 8.3 or 8.4, depends on projects
2. I love writing core and low level libs (orm, filesystem...), write tools that automatise some works ( SDK/client generator for an API based on openapi spec...). Also love flexibility and "strictability" (I always use "declare strict types on").
3. With PHP, we can do almost anything: system tools, websites, apps, CLI commands to process data, gaming, pseudo native apps...)
4. Unit and integration testing + behat test for APIs
@heiglandreas it 's clearly a work around, not the ideal solution.
Yes, it is like "final" keyword.
Use only for classes we won't mock or we need to provide an interface that we can mock.
And for tiers libs, we probably need to communicate / raise issue to warn maintainers about usage and inplication of read-only keyword at class level 🙂
(Like for final keyword)
@heiglandreas you can replace read-only class by read-only properties, when you need to mock the class.
Should have the same effect but without the limitation to mock.
And keep read-only only for class that don't need to be mocked.
@dseguy I use array_pop(), because it is the simplest 🙂
@Xenograg why don't you use enum stored as state in a single object that will be returned ?
It will be less verbose, and keep the same level of readability, I guess.
And it will be less verbose to check (no insteadof comparison, but just use ===)
@pasqualeberesti peut être besoin d'échapper la chaîne pour que ça soit bien traité et reconnu par le système. Ça arrive parfois avec des caractères spéciaux.
Peut-être avec escapeshellarg() (je ne suis plus certain du nom de la fonction)
@orange_lux on cherche un dev PHP backend pour faire du code de qualité dans mon équipe, chez Deezer (CLI, api & backoffice).
Si ça t'intéresse, n'hésite pas à me mp, je te transfèrerai les infos.
Et je pourrais forward ton CV dans le process de recrutement. Je ne garantis rien, mais une chose est sûre, on fait du code de qualité, et j'en suis garant 😄
@php_discussions and great 👍 for usage of strict types.
NB: we don't use PHP closing tag, unless we are in template.
@php_discussions but globally, is currently good.
And maybe don't return null on the controller, but a message for empty data 🙂
@php_discussions your code is pretty SOLID, but I guess you should use more injection (inject your validator for example, to have less coupled code). Your code will be more testable
And the singleton pattern is not a very good pattern. You can remove the database class and just use PDO you can inject in your repository.
Inject PDO in database class if you want to keep it
About naming, generally, a method that returns void and throws an exception after the check is named with prefix `assert`
@ztec or I'm a robot / AI 😱😱
@ztec I guess you need to select the bottom left image, as it looks like 3 examples images.
But yep, it's really bad captcha. As all captcha now 😅
@dseguy wow, impressive work ! ❤️