Repository navigation
Conversation
ADmad
approved these changes
Oct 21, 2026
josbeir
force-pushed
the
fix/association-target-analysis-types
branch
from
October 21, 2026 18:26
1647c75 to
f06be79
Compare
Collaborator
Author
|
Closing this because the original issue was fixed upstream after this PR was opened. This PR was opened on October 6. CakePHP added Those annotations let Mago preserve the concrete target table type without a source patch. Verified against current CakePHP 6.x source with Mago 1.47.2 and 1.54.0. The original patch addressed a real gap at the time. Its replacement now only adds regression tests, so there is no remaining fix needed in this package. |
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.
CakePHP 6.x already declares
@method T getTarget()on its four ORM association classes, which lets Mago retain the concrete target table without a source patch. Replace the proposed patch with regression coverage and leave the shipped preset unchanged.The installed-consumer check covers
BelongsTo,BelongsToMany,HasMany, andHasOneusing fixtures that match CakePHP's annotations. Positive cases must return the concrete target type; negative cases must report four incompatible return types. The CakePHP 6.x compatibility script runs the same checks against the actual framework source without patches or extensions.Validation: all package checks pass, including 12 PHPUnit tests, consumer checks, corpus validation, formatter and fixer checks. The CakePHP 6.x compatibility and analysis checks also pass against a local checkout. Rebased onto main after PR #4.