Skip to content

revert: drop trait method aliasing#128

Open
cjmellor wants to merge 1 commit into
mainfrom
refactor/drop-trait-aliasing
Open

revert: drop trait method aliasing#128
cjmellor wants to merge 1 commit into
mainfrom
refactor/drop-trait-aliasing

Conversation

@cjmellor
Copy link
Copy Markdown
Owner

No description provided.

Reverts PR #123's private-helper indirection. The helpers were only
justified by the trait-method-aliasing escape hatch, which #123 itself
acknowledged was incomplete (HasTiers, Multiplier::forUser, the four
listeners, and Eloquent's refresh() path all still called the public
methods). Rather than chase every external call site forever, the
package now treats trait method names as part of its API: hosts whose
User model defines a colliding challenges() / streaks() / experience() /
experienceHistory() should rename their own method or compose this
package into a wrapper model.

- inline challengesRelation() into challenges() (keeps #122 table
  config call)
- inline streaksRelation() into streaks()
- inline experienceRelation() / experienceHistoryRelation() back into
  experience() / experienceHistory()
- drop loadedExperience() helper; restore $this->experience magic
  property and $this->load('experience') pattern that pre-#123 used
- drop AliasingUser fixture, TraitAliasingTest, and the property
  docblock entry on TestCase
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.

1 participant