Skip to content

Conversation

@joelwurtz
Copy link
Member

@joelwurtz joelwurtz commented Nov 27, 2025

This update to symfony 8, but it will deprecate a few things :

  • TypesMatching is removed
  • Use the new TypeInfo component
  • Add a type property in source / target metadata which, which type to use
  • Every package updated to use sf 7.4 / 8.0
  • PHP version upgrade requirement to 8.4

@joelwurtz joelwurtz force-pushed the feat/prepare-symfony8 branch from 446d025 to 32ace2c Compare November 28, 2025 13:45
@joelwurtz joelwurtz marked this pull request as ready for review November 28, 2025 13:48
@joelwurtz joelwurtz force-pushed the feat/prepare-symfony8 branch 4 times, most recently from f74161d to e25810c Compare November 28, 2025 15:50
@joelwurtz joelwurtz force-pushed the feat/prepare-symfony8 branch from e25810c to 8433eb4 Compare November 30, 2025 09:39
@joelwurtz joelwurtz force-pushed the feat/prepare-symfony8 branch from 69dd857 to 757bddb Compare November 30, 2025 14:14
@joelwurtz joelwurtz requested a review from Copilot December 1, 2025 10:54
Copilot finished reviewing on behalf of joelwurtz December 1, 2025 10:55
Copy link

Copilot AI left a 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 TypesMatching class and usage of Symfony's TypeInfo component
  • 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');
Copy link

Copilot AI Dec 1, 2025

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.

Copilot uses AI. Check for mistakes.
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