mirror of
https://github.com/symfony/class-loader.git
synced 2026-04-23 16:58:17 +02:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 181f15a84f | |||
| 0a5217edb6 | |||
| e5f3ef7ebd | |||
| 77f69969b1 | |||
| 8478872572 | |||
| 622d370a07 | |||
| 827c54ee98 | |||
| 7ffb15eeff |
@@ -1,4 +1,3 @@
|
||||
vendor/
|
||||
composer.lock
|
||||
phpunit.xml
|
||||
|
||||
|
||||
+1
-1
@@ -177,7 +177,7 @@ class ClassLoader
|
||||
$classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';
|
||||
|
||||
foreach ($this->prefixes as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
if ($class === strstr($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
|
||||
return $dir.DIRECTORY_SEPARATOR.$classPath;
|
||||
|
||||
@@ -39,7 +39,7 @@ class ClassMapGenerator
|
||||
/**
|
||||
* Iterate over all files in the given directory searching for classes
|
||||
*
|
||||
* @param Iterator|string $dir The directory to search in or an iterator
|
||||
* @param \Iterator|string $dir The directory to search in or an iterator
|
||||
*
|
||||
* @return array A class map array
|
||||
*/
|
||||
|
||||
@@ -65,5 +65,5 @@ Resources
|
||||
You can run the unit tests with the following command:
|
||||
|
||||
$ cd path/to/Symfony/Component/ClassLoader/
|
||||
$ composer.phar install --dev
|
||||
$ composer.phar install
|
||||
$ phpunit
|
||||
|
||||
@@ -189,7 +189,7 @@ class ClassCollectionLoaderTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testUnableToLoadClassException()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user