Sitelet https://github.com/KnpLabs/KnpMenu/pull/367
Skip to content

Add a CI job running phpstan - #367

Merged
stof merged 1 commit into
KnpLabs:masterfrom
stof:phpstan
Jan 18, 2022
Merged

stof merged 1 commit into
KnpLabs:masterfrom
stof:phpstan

Conversation

@stof

@stof stof commented Jan 18, 2022

Copy link
Copy Markdown
Collaborator

The phpstan configuration was there, but not running on CI, which made it be forgotten.

Comment thread composer.json Outdated
"symfony/routing": "^4.4 || ^5.0 || ^6.0",
"twig/twig": "^1.40 || ^2.9 || ^3.0"
"twig/twig": "^1.40 || ^2.9 || ^3.0",
"phpstan/phpstan": "^1.4"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So far, the dependencies were sorted alphabetically. You're about to change that. 🙃

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yeah, they were sorted, but without the config telling composer require to apply the sorting. Let me change that.

Comment thread phpstan-baseline.neon
path: src/Knp/Menu/Matcher/Voter/RouteVoter.php

-
message: "#^Strict comparison using \\=\\=\\= between false and array\\<Knp\\\\Menu\\\\ItemInterface\\> will always evaluate to false\\.$#"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this one is because array_combine returns false only on PHP 7, not on PHP 8 (on PHP 8, it throws an exception on failure)

@stof
stof merged commit e243a9e into KnpLabs:master Jan 18, 2022
@stof
stof deleted the phpstan branch January 18, 2022 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants