-
Notifications
You must be signed in to change notification settings - Fork 17
IBX-10840: Fixed missing logger in ImageExtension #662
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.6
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR fixes a missing logger in ImageExtension by implementing LoggerAwareInterface and enabling repository-wide PHPStan checks for dynamic properties via checkDynamicProperties: true. This stricter analysis revealed several undeclared properties in tests and incorrect PHPDoc type hints in production code.
Key Changes:
- Added logger support to
ImageExtensionclass usingLoggerAwareInterfaceandLoggerAwareTrait - Enabled
checkDynamicPropertiesin PHPStan configuration to catch dynamic property usage - Corrected PHPDoc type hints in multiple field type classes to accurately reflect parameter types
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php | Added LoggerAwareInterface implementation with LoggerAwareTrait |
| src/bundle/Core/Resources/config/templating.yml | Configured logger injection for ImageExtension service |
| phpstan.neon.dist | Enabled checkDynamicProperties check |
| phpstan-baseline.neon | Updated baseline to reflect resolved and new PHPStan issues |
| tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php | Declared $storageGateway property and refactored getter using null coalescing assignment |
| tests/lib/FieldType/ImageTest.php | Declared $mimeTypeDetectorMock property and refactored getter using null coalescing assignment |
| tests/lib/Repository/Values/User/UserTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/User/UserGroupTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/User/RoleTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/User/PolicyTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/ObjectState/ObjectStateTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/Content/TrashItemTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/Content/SectionTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/Content/LocationTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| tests/lib/Repository/Values/Content/LanguageTest.php | Added PHPStan ignore comment for intentional invalid property access test |
| src/lib/FieldType/Validator/ImageValidator.php | Corrected PHPDoc to specify concrete Value parameter type |
| src/lib/FieldType/Selection/Type.php | Removed redundant union type from PHPDoc |
| src/lib/FieldType/RelationList/Type.php | Removed redundant union type from PHPDoc |
| src/lib/FieldType/Relation/Type.php | Removed redundant union type from PHPDoc |
| src/lib/FieldType/ImageAsset/Type.php | Removed redundant union type from PHPDoc |
| src/lib/FieldType/BinaryBase/Type.php | Removed redundant union type from PHPDoc |
| src/lib/FieldType/Author/Type.php | Added PHPDoc to getName() and corrected PHPDoc for getSortInfo() |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
c4183ec to
7e97871
Compare
|
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.
Pull Request Overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.



Caution
Fast forward (or rebase) merge
Description:
This PR fixes missing logger in
ImageExtensionby addingLoggerAwareInterface.Additionally, it enables repository-wide check against dynamic property use by enabling
checkDynamicPropertiesin PHPStan. This uncovered other places where property was missing (mostly tests though), and where property accessed was done on invalid assumptions (some phpdocs have been corrected).For QA:
Documentation: