-
-
Notifications
You must be signed in to change notification settings - Fork 204
Add Suport symfony 8 and php 8.5 #1841
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
base: 4.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,181 @@ | ||
| parameters: | ||
| ignoreErrors: | ||
| - # Disallow VariableMethodCallRule and VariablePropertyFetchRule | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should I create another file to not mix with this one? |
||
| message: '#^Variable (method call|property access)#' | ||
| path: . | ||
| - # https://github.com/phpstan/phpstan-strict-rules/issues/130 | ||
| message: '#^Call to static method PHPUnit\\Framework\\Assert::.* will always evaluate to true\.$#' | ||
| path: tests/ | ||
| - # https://github.com/phpstan/phpstan-symfony/issues/322 | ||
| message: "#^Cannot call method getId\\(\\) on array\\<string, bool\\|string\\>\\|Sonata\\\\PageBundle\\\\Model\\\\PageInterface\\|Sonata\\\\PageBundle\\\\Model\\\\SiteInterface\\.$#" | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
| - # https://github.com/phpstan/phpstan-symfony/issues/322 | ||
| message: "#^Only booleans are allowed in &&, array\\<string, bool\\|string\\>\\|Sonata\\\\PageBundle\\\\Model\\\\PageInterface\\|Sonata\\\\PageBundle\\\\Model\\\\SiteInterface\\|null given on the right side\\.$#" | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
| - # https://github.com/phpstan/phpstan-symfony/issues/322 | ||
| message: "#^Parameter \\#2 \\$currentPage of method Sonata\\\\PageBundle\\\\Form\\\\Type\\\\PageSelectorType\\:\\:childWalker\\(\\) expects Sonata\\\\PageBundle\\\\Model\\\\PageInterface\\|null, array\\<string, bool\\|string\\>\\|Sonata\\\\PageBundle\\\\Model\\\\PageInterface\\|Sonata\\\\PageBundle\\\\Model\\\\SiteInterface\\|null given\\.$#" | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
| - # https://github.com/phpstan/phpstan-symfony/issues/322 | ||
| message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<string, bool\\|string\\>\\|Sonata\\\\PageBundle\\\\Model\\\\PageInterface\\|Sonata\\\\PageBundle\\\\Model\\\\SiteInterface\\|null given\\.$#" | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
| ignoreErrors: | ||
| - | ||
| rawMessage: Possibly invalid array key type int|string|null. | ||
| identifier: offsetAccess.invalidOffset | ||
| count: 1 | ||
| path: src/Entity/BlockInteractor.php | ||
|
|
||
| - | ||
| rawMessage: Variable method call on Sonata\PageBundle\Model\PageInterface. | ||
| identifier: method.dynamicName | ||
| count: 1 | ||
| path: src/Entity/PageManager.php | ||
|
|
||
| - | ||
| rawMessage: 'Cannot call method getId() on array<string, bool|string>|Sonata\PageBundle\Model\PageInterface|Sonata\PageBundle\Model\SiteInterface.' | ||
| identifier: method.nonObject | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
|
|
||
| - | ||
| rawMessage: 'Only booleans are allowed in &&, array<string, bool|string>|Sonata\PageBundle\Model\PageInterface|Sonata\PageBundle\Model\SiteInterface|null given on the right side.' | ||
| identifier: booleanAnd.rightNotBoolean | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
|
|
||
| - | ||
| rawMessage: 'Parameter #2 $currentPage of method Sonata\PageBundle\Form\Type\PageSelectorType::childWalker() expects Sonata\PageBundle\Model\PageInterface|null, array<string, bool|string>|Sonata\PageBundle\Model\PageInterface|Sonata\PageBundle\Model\SiteInterface|null given.' | ||
| identifier: argument.type | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
|
|
||
| - | ||
| rawMessage: 'Parameter #2 ...$arrays of function array_merge expects array, array<string, bool|string>|Sonata\PageBundle\Model\PageInterface|Sonata\PageBundle\Model\SiteInterface|null given.' | ||
| identifier: argument.type | ||
| count: 1 | ||
| path: src/Form/Type/PageSelectorType.php | ||
|
|
||
| - | ||
| rawMessage: Possibly invalid array key type string|null. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not know if it could be related with phpstan/phpstan-symfony#322 like we are doing on https://github.com/sonata-project/SonataPageBundle/blob/4.x/phpstan-baseline.neon#L22 But I would prefer ignore those errors besides add workaround for code that never going to be used. like this we add checks to verify if it's if this field is null, the code will break for sure. My suggestion is, ignore those errors and create a issue to solve this mess, it will make our life easier. and I remember it was painful for this PR: #1522 let me know what you think and I could open a issue. |
||
| identifier: offsetAccess.invalidOffset | ||
| count: 2 | ||
| path: src/Page/PageServiceManager.php | ||
|
|
||
| - | ||
| rawMessage: Access to constant BUILTIN_TYPE_BOOL on an unknown class Symfony\Component\PropertyInfo\Type. | ||
| identifier: class.notFound | ||
| count: 1 | ||
| path: src/Serializer/BlockTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: Access to constant BUILTIN_TYPE_INT on an unknown class Symfony\Component\PropertyInfo\Type. | ||
| identifier: class.notFound | ||
| count: 2 | ||
| path: src/Serializer/BlockTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: Access to constant BUILTIN_TYPE_STRING on an unknown class Symfony\Component\PropertyInfo\Type. | ||
| identifier: class.notFound | ||
| count: 3 | ||
| path: src/Serializer/BlockTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: Instantiated class Symfony\Component\PropertyInfo\Type not found. | ||
| identifier: class.notFound | ||
| count: 6 | ||
| path: src/Serializer/BlockTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: 'Method Sonata\PageBundle\Serializer\BlockTypeExtractor::getTypes() has invalid return type Symfony\Component\PropertyInfo\Type.' | ||
| identifier: class.notFound | ||
| count: 1 | ||
| path: src/Serializer/BlockTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: Access to constant BUILTIN_TYPE_OBJECT on an unknown class Symfony\Component\PropertyInfo\Type. | ||
| identifier: class.notFound | ||
| count: 5 | ||
| path: src/Serializer/InterfaceTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: Instantiated class Symfony\Component\PropertyInfo\Type not found. | ||
| identifier: class.notFound | ||
| count: 5 | ||
| path: src/Serializer/InterfaceTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: 'Method Sonata\PageBundle\Serializer\InterfaceTypeExtractor::getBlockType() has invalid return type Symfony\Component\PropertyInfo\Type.' | ||
| identifier: class.notFound | ||
| count: 1 | ||
| path: src/Serializer/InterfaceTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: 'Method Sonata\PageBundle\Serializer\InterfaceTypeExtractor::getPageType() has invalid return type Symfony\Component\PropertyInfo\Type.' | ||
| identifier: class.notFound | ||
| count: 1 | ||
| path: src/Serializer/InterfaceTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: 'Method Sonata\PageBundle\Serializer\InterfaceTypeExtractor::getTypes() has invalid return type Symfony\Component\PropertyInfo\Type.' | ||
| identifier: class.notFound | ||
| count: 1 | ||
| path: src/Serializer/InterfaceTypeExtractor.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with ''Symfony\\Component\\HttpFoundation\\Response'' and Symfony\Component\HttpFoundation\Response will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 1 | ||
| path: tests/Block/ContainerBlockServiceTest.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with ''Symfony\\Component\\HttpFoundation\\Response'' and Symfony\Component\HttpFoundation\Response will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 1 | ||
| path: tests/Block/PageListBlockServiceTest.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with ''Sonata\\PageBundle\\Model\\PageInterface'' and Sonata\PageBundle\Model\PageInterface will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 4 | ||
| path: tests/CmsManager/CmsPageManagerTest.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with arguments ''Sonata\\PageBundle\\Model\\PageBlockInterface'', Sonata\PageBundle\Model\PageBlockInterface and ''should be a block'' will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 1 | ||
| path: tests/CmsManager/CmsPageManagerTest.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertTrue() with true will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 1 | ||
| path: tests/Functional/BasePantherTestCase.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with ''Sonata\\PageBundle\\Model\\PageBlockInterface'' and Sonata\PageBundle\Model\PageBlockInterface will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 1 | ||
| path: tests/Model/BlockInteractorTest.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with ''Sonata\\PageBundle\\Model\\SnapshotPageProxyInterface'' and Sonata\PageBundle\Model\SnapshotPageProxy will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 1 | ||
| path: tests/Model/SnapshotPageProxyTest.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with arguments ''Symfony\\Component\\HttpFoundation\\Response'', Symfony\Component\HttpFoundation\Response and ''Should return a…'' will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 1 | ||
| path: tests/Page/Service/BasePageServiceTest.php | ||
|
|
||
| - | ||
| rawMessage: 'Call to static method PHPUnit\Framework\Assert::assertInstanceOf() with ''Symfony\\Component\\HttpFoundation\\Request'' and Symfony\Component\HttpFoundation\Request will always evaluate to true.' | ||
| identifier: staticMethod.alreadyNarrowedType | ||
| count: 4 | ||
| path: tests/Request/RequestFactoryTest.php | ||
|
|
||
| - | ||
| rawMessage: Variable method call on object. | ||
| identifier: method.dynamicName | ||
| count: 1 | ||
| path: tests/Site/HostPathSiteSelectorTest.php | ||
|
|
||
| - | ||
| rawMessage: Variable property access on object. | ||
| identifier: property.dynamicName | ||
| count: 2 | ||
| path: tests/Site/HostPathSiteSelectorTest.php | ||
|
|
||
| - | ||
| rawMessage: Variable method call on object. | ||
| identifier: method.dynamicName | ||
| count: 1 | ||
| path: tests/Site/HostSiteSelectorTest.php | ||
|
|
||
| - | ||
| rawMessage: Variable property access on object. | ||
| identifier: property.dynamicName | ||
| count: 2 | ||
| path: tests/Site/HostSiteSelectorTest.php | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I strict on
^3.1.2or keep it more flexible in^3.0?the problem detected was more related with symfony-cmf then page bundle.