Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix phpstan errors for tests #6961

Merged
merged 7 commits into from
Mar 26, 2021

Conversation

VincentLanglet
Copy link
Member

@VincentLanglet VincentLanglet commented Mar 21, 2021

.

@VincentLanglet VincentLanglet force-pushed the phpstanTests branch 2 times, most recently from 134cb17 to 928c44a Compare March 22, 2021 09:44
@VincentLanglet VincentLanglet requested a review from a team March 22, 2021 09:45
@VincentLanglet VincentLanglet force-pushed the phpstanTests branch 3 times, most recently from 53bf0c5 to 4e769b1 Compare March 22, 2021 16:48
@VincentLanglet
Copy link
Member Author

@phansys I get an error with

        if (!$this->httpMethodParameterOverride && Request::getHttpMethodParameterOverride()) {
            $disableHttpMethodParameterOverride = \Closure::bind(static function (): void {
                self::$httpMethodParameterOverride = false;
            }, null, Request::class);
            $disableHttpMethodParameterOverride();
        }

Static access to instance property Sonata\AdminBundle\Tests\Controller\CRUDControllerTest::$httpMethodParameterOverride.

I don't really understand this code ; can you confirm it's valid ?

@VincentLanglet
Copy link
Member Author

I need psalm/psalm-plugin-symfony#160
and I need to solve phpstan/phpstan-phpunit#87

@phansys
Copy link
Member

phansys commented Mar 22, 2021

I don't really understand this code ; can you confirm it's valid ?

I think yes. This is an example about how it works: https://3v4l.org/LcsM6.

@VincentLanglet
Copy link
Member Author

I don't really understand this code ; can you confirm it's valid ?

I think yes. This is an example about how it works: https://3v4l.org/LcsM6.

Ok, I created an issue: phpstan/phpstan#4734

@VincentLanglet
Copy link
Member Author

The lint issue is related to PHP-CS-Fixer/PHP-CS-Fixer#5505

@VincentLanglet
Copy link
Member Author

Now I just need sonata-project/dev-kit#1473

phpstan.neon.dist Outdated Show resolved Hide resolved
@VincentLanglet VincentLanglet marked this pull request as ready for review March 24, 2021 22:07
@VincentLanglet VincentLanglet requested review from jordisala1991 and a team March 24, 2021 22:07
@VincentLanglet VincentLanglet added this to the 4.0 milestone Mar 24, 2021
Copy link
Member

@jordisala1991 jordisala1991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! It would be good to have a changelog for the things changed on the src folder

@VincentLanglet
Copy link
Member Author

Nice work! It would be good to have a changelog for the things changed on the src folder

I think it's only phpdoc

@VincentLanglet VincentLanglet requested a review from a team March 26, 2021 13:00
@VincentLanglet VincentLanglet merged commit 8b6729b into sonata-project:master Mar 26, 2021
@VincentLanglet VincentLanglet deleted the phpstanTests branch March 26, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants