This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged branch fabpot/classloader-optim (PR #4729)
Commits ------- 3f9e8ff [ClassLoader] made ClassCollectionLoader::load() automatically include class dependencies 6f4d281 [ClassLoader] added missing support for PHP 5.4 traits Discussion ---------- Classloader optimization The first commit fixes support for PHP 5.4 trait. The second one does several things: * it optimizes the recent merge so that the reflection class instance is only loaded once; * we use the fact that we now get all class dependencies to automatically add all class dependencies to the map. --------------------------------------------------------------------------- by fabpot at 2012-07-03T17:26:46Z I've updated to take into accounts traits. --------------------------------------------------------------------------- by bamarni at 2012-07-04T11:58:57Z great job :+1: I can't see it in the diff as this part hasn't changed, but somewhere in the autoReload block there is : ``` if ($meta[1] != $classes) { $reload = true; } ``` It should be array_unique($classes), otherwise the file would be perpetually regenerated in autoReload mode when the input contains duplicate, because they're implicitely removed when dumping the files. --------------------------------------------------------------------------- by fabpot at 2012-07-04T13:20:04Z @bamarni I've added an `array_unique` call at the top (this bug existed before by the way).
- Loading branch information
Showing
7 changed files
with
170 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace ClassesWithParents; | ||
|
||
trait ATrait | ||
{ | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace ClassesWithParents; | ||
|
||
trait BTrait | ||
{ | ||
use ATrait; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace ClassesWithParents; | ||
|
||
trait CTrait | ||
{ | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace ClassesWithParents; | ||
|
||
class D extends A | ||
{ | ||
use BTrait; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace ClassesWithParents; | ||
|
||
class E extends D | ||
{ | ||
use CTrait; | ||
} |