You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect Flint is intended for WordPress theme developers who are not really into OOP - although they are really professionals as they earn money by manufacturing themes.
At the moment we are distinguishing most PHP functionality in to two types. One type is PSR-4 auto-loadable and the other always require. The ./lib folder is auto-loaded with PSR-4. Thus this should not have any side-effects. The './inc' folder is basically just an extension of your regular functions.php. Instead of slamming everything in there, we split things up into logically separated files.
Adding php-stan to flynt would be nice, but in a WordPress environment where you have concepts that go against modern PHP ways, you have to do a lot of extra work to reliably use it.
Also, we want to make the barrier of entrance as low as possible. A WordPress developer should not need to learn a new style of coding, just to be able to use our component based approach and enjoy its benefits.
Adding @phpstan to CI is like adding 100 pairs of eyes.
composer require --dev szepeviktor/phpstan-wordpress php-stubs/acf-pro-stubs
phpstan.neon.dist
then run
vendor/bin/phpstan analyze -l 4
Please consider reading https://www.php-fig.org/psr/psr-1/#23-side-effects
...which implies loading Components with PSR-4 (aka. Composer loader) and being implemented as classes.
The text was updated successfully, but these errors were encountered: