Skip to content

[5.6] class_uses_recursive() return parent class's trait first#22537

Merged
taylorotwell merged 2 commits intolaravel:masterfrom
zhwei:master
Dec 26, 2017
Merged

[5.6] class_uses_recursive() return parent class's trait first#22537
taylorotwell merged 2 commits intolaravel:masterfrom
zhwei:master

Conversation

@zhwei
Copy link
Contributor

@zhwei zhwei commented Dec 26, 2017

Reason

when Model booting traits, subclass's trait will boot before parent's trait, It is quite different from dev's expectation.


Changed

  • This PR will make class_uses_recursive() return traits order by use order.
  • PHPUnit assertEquals does not validate the order of array elements , so i change to assertSame

repeat #22536

@GrahamCampbell GrahamCampbell changed the title class_uses_recursive() return parent class's trait first [5.6] class_uses_recursive() return parent class's trait first Dec 26, 2017
@taylorotwell taylorotwell merged commit 1b4e49b into laravel:master Dec 26, 2017
@zhwei zhwei deleted the master branch December 27, 2017 14:04
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