diff --git a/lib/composer/composer/ClassLoader.php b/lib/composer/composer/ClassLoader.php index ff6ecfb822f89ab498410e4d8dd1e6204f15dd8d..ac67d302a1866f83aab0c3bff265cfbfe9318f51 100644 --- a/lib/composer/composer/ClassLoader.php +++ b/lib/composer/composer/ClassLoader.php @@ -53,8 +53,8 @@ class ClassLoader private $useIncludePath = false; private $classMap = array(); - private $classMapAuthoritative = false; + private $missingClasses = array(); public function getPrefixes() { @@ -322,20 +322,20 @@ class ClassLoader if (isset($this->classMap[$class])) { return $this->classMap[$class]; } - if ($this->classMapAuthoritative) { + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } $file = $this->findFileWithExtension($class, '.php'); // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { + if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } - if ($file === null) { + if (false === $file) { // Remember that this class does not exist. - return $this->classMap[$class] = false; + $this->missingClasses[$class] = true; } return $file; @@ -399,6 +399,8 @@ class ClassLoader if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } + + return false; } } diff --git a/tests/phpunit.xml.dist b/tests/phpunit.xml.dist deleted file mode 100644 index d3a5897dfaf446e576ed7f30c8b52ed3e433da10..0000000000000000000000000000000000000000 --- a/tests/phpunit.xml.dist +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<phpunit bootstrap="bootstrap.php"> - <testsuite name='ownCloud'> - <directory suffix='.php'>lib/</directory> - <directory suffix='.php'>Settings/</directory> - <directory suffix='.php'>Core/</directory> - <file>apps.php</file> - </testsuite> - <!-- filters for code coverage --> - <filter> - <!-- whitelist processUncoveredFilesFromWhitelist="true" --> - <whitelist> - <directory suffix=".php">..</directory> - <exclude> - <directory suffix=".php">../3rdparty</directory> - <directory suffix=".php">../apps/files/l10n</directory> - <directory suffix=".php">../apps/files_external/l10n</directory> - <directory suffix=".php">../apps/files_external/3rdparty</directory> - <directory suffix=".php">../apps/files_versions/l10n</directory> - <directory suffix=".php">../apps/encryption/l10n</directory> - <directory suffix=".php">../apps/files_sharing/l10n</directory> - <directory suffix=".php">../apps/files_trashbin/l10n</directory> - <directory suffix=".php">../apps/user_ldap/l10n</directory> - <directory suffix=".php">../apps/user_webdavauth/l10n</directory> - <directory suffix=".php">../apps/provisioning_api/tests</directory> - <directory suffix=".php">../lib/l10n</directory> - <directory suffix=".php">../core/l10n</directory> - <directory suffix=".php">../settings/l10n</directory> - <directory suffix=".php">../tests</directory> - </exclude> - </whitelist> - </filter> - <listeners> - <listener class="StartSessionListener" file="startsessionlistener.php" /> - </listeners> -</phpunit>