-
Notifications
You must be signed in to change notification settings - Fork 21
Migrate sf 8 / type info #297
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: main
Are you sure you want to change the base?
Conversation
446d025 to
32ace2c
Compare
f74161d to
e25810c
Compare
e25810c to
8433eb4
Compare
69dd857 to
757bddb
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
This PR migrates AutoMapper to Symfony 8 and PHP 8.4, introducing the new TypeInfo component as a replacement for the TypesMatching system. Key architectural changes include:
- Removal of
TypesMatchingclass and usage of Symfony'sTypeInfocomponent - Addition of type properties to source/target metadata
- Updated transformer factory interfaces to use metadata types directly
- Upgraded minimum PHP version to 8.4 and Symfony to 7.4/8.0
Reviewed changes
Copilot reviewed 140 out of 140 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Transformer/NullableTransformerFactoryTest.php | Removed setAccessible call that's still required for private property access |
| tests/Transformer/*TransformerFactoryTest.php | Updated tests to use TypeInfo API instead of TypesMatching |
| src/Transformer/*TransformerFactory.php | Refactored to accept source/target metadata directly instead of TypesMatching |
| src/Metadata/TypesMatching.php | Removed deprecated TypesMatching class |
| src/Metadata/*PropertyMetadata.php | Added Type property and withType() method |
| src/Extractor/*MappingExtractor.php | Updated to use separate source/target type extractors |
| composer.json | Updated dependencies to Symfony 7.4/8.0 and PHP 8.4 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| protected function setUp(): void | ||
| { | ||
| $this->isTargetNullableProperty = (new \ReflectionClass(NullableTransformer::class))->getProperty('isTargetNullable'); |
Copilot
AI
Dec 1, 2025
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.
The setAccessible(true) call has been removed, but accessing private properties still requires this call in PHP 8.1+. Without it, the test will fail with an error when trying to get the value of the private property isTargetNullable. This line should be restored to ensure the reflection property is accessible.
This update to symfony 8, but it will deprecate a few things :
TypeInfocomponent