fix: resolve Doctrine ORM deprecation warnings for ORM 3.0 compatibility (#11)#27
Merged
Merged
Conversation
…ity (#11) Address three deprecation warnings to prepare for Doctrine ORM 3.0: 1. MySQL Version Specification: - Change server_version from '8' to '8.0.31' for explicit version detection - Prevents DBAL 4.0 version detection logic deprecation warning 2. Lazy Ghost Objects: - Enable lazy ghost objects with 'enable_lazy_ghost_objects: true' - Required for ORM 3.0 compatibility, improves performance 3. AttributeDriver Field Reporting: - Configure 'report_fields_where_declared: true' - Enables new ORM 3.0 field reporting mode for better mapping validation - May uncover invalid mapping configurations that need fixing These changes maintain backward compatibility while preparing the application for future Doctrine ORM upgrades.
🐳 Docker Image Built SuccessfullyImage Tags: Pull Command: docker pull ghcr.io/mkldevops/education-legacy:pr-27-035e2756f6333003b8ac2874a008482c9234bce8Run Command: docker run -p 3900:80 ghcr.io/mkldevops/education-legacy:pr-27-035e2756f6333003b8ac2874a008482c9234bce8✅ Ready for testing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three Doctrine ORM deprecation warnings to prepare for ORM 3.0 compatibility. These are configuration-only changes that maintain backward compatibility while addressing future breaking changes.
Deprecation Warnings Resolved
1. MySQL Version Detection ✅
Problem:
Version detection logic for MySQL will change in DBAL 4Solution: Changed
server_version: "8"toserver_version: "8.0.31"Impact: Prevents version detection issues in DBAL 4.0
2. Lazy Ghost Objects ✅
Problem:
Not enabling lazy ghost objects is deprecated and will not be supported in Doctrine ORM 3.0Solution: Added
enable_lazy_ghost_objects: trueImpact: Required for ORM 3.0, improves lazy loading performance
3. AttributeDriver Field Reporting ✅
Problem:
In ORM 3.0, the AttributeDriver will report fields for the classes where they are declaredSolution: Added
report_fields_where_declared: trueImpact: Enables new ORM 3.0 field reporting mode, may reveal invalid mappings
Technical Details
Configuration Changes in
config/packages/doctrine.yaml:Benefits
Risk Assessment
Testing
Validation
The configuration changes are purely additive and enable recommended settings for ORM 3.0 compatibility:
server_version: "8.0.31"enable_lazy_ghost_objects: truereport_fields_where_declared: trueReferences
Closes #11