sonata-project / SonataFormatterBundle

Symfony SonataFormatterBundle
https://docs.sonata-project.org/projects/SonataFormatterBundle
MIT License
81 stars 117 forks source link

Increase PHPStan, Psalm, cleanup deps #658

Closed jordisala1991 closed 2 years ago

jordisala1991 commented 2 years ago

Subject

I am targeting this branch, because this is for next release.

jordisala1991 commented 2 years ago

I am not sure on how to fix the last error on psalm:

ERROR: DocblockTypeContradiction - src/DependencyInjection/SonataFormatterExtension.php:135:13 - Operand of type false is always false (see https://psalm.dev/155)
        if (is_a($env->getClass(), ExtendableFormatter::class)) {
VincentLanglet commented 2 years ago

I am not sure on how to fix the last error on psalm:

ERROR: DocblockTypeContradiction - src/DependencyInjection/SonataFormatterExtension.php:135:13 - Operand of type false is always false (see https://psalm.dev/155)
        if (is_a($env->getClass(), ExtendableFormatter::class)) {

$env->getClass() is a string no ? To use is_a with a string, I think you have to pass true as third parameter.

VincentLanglet commented 2 years ago

Can we merge this @jordisala1991 ?

jordisala1991 commented 2 years ago

Yep, it looks ready to me. Should I add changelog?

VincentLanglet commented 2 years ago

Yep, it looks ready to me. Should I add changelog?

It seems ok to me like this.