Skip to content
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

Ensure Compatibility with Doctrine ORM 3 While Retaining Support for ORM 2 #60

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

jorisdugue
Copy link
Owner

@jorisdugue jorisdugue commented Dec 5, 2024

This pull request fixes Issue #59 by ensuring compatibility with Doctrine ORM v3 while retaining support for Doctrine ORM v2. It addresses the parameter-handling differences between the two versions, making the system robust and backward-compatible.

Changes Included :

  • Added VersionORM
    • A wrapper around InstalledVersions::getVersion that provides the installed version of the doctrine/orm package.
  • Added DoctrineParser:
    • DoctrineParser depends on the VersionORM for version checks.
    • The logic for buildParams ensures parameters are converted to ArrayCollection in v3 and left unchanged for v2.
  • Composer Restriction :
    • Added a restriction to ensure the project uses Composer v2. This is necessary for compatibility with the dependency management and version checking performed by the InstalledVersions API.

Testing

  • Added unit tests for VersionORM to validate the output of getDoctrineVersion.
  • impleemnt tests for DoctrineParser to utilize a mocked VersionProvider.
  • Verified that the buildParams method behaves correctly for both Doctrine ORM v2 and v3.
    resolve Ensure backward compatibility between ORM2 and ORM3 #59

@jorisdugue jorisdugue added bug Something isn't working enhancement New feature or request labels Dec 5, 2024
@jorisdugue jorisdugue self-assigned this Dec 5, 2024
@jorisdugue jorisdugue merged commit b54df49 into master Dec 5, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure backward compatibility between ORM2 and ORM3
1 participant