diff --git a/src/Symfony/Bridge/Doctrine/.gitignore b/src/Symfony/Bridge/Doctrine/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Bridge/Doctrine/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Doctrine/README.md b/src/Symfony/Bridge/Doctrine/README.md index 211eb7fb616f..9aecb01e3f5c 100644 --- a/src/Symfony/Bridge/Doctrine/README.md +++ b/src/Symfony/Bridge/Doctrine/README.md @@ -9,20 +9,6 @@ Resources You can run the unit tests with the following command: - phpunit -c src/Symfony/Bridge/Doctrine/ - -If you also want to run the unit tests that depend on other Symfony -Components, declare the following environment variables before running -PHPUnit: - - export DOCTRINE_COMMON=../path/to/doctrine-common - export DOCTRINE_DBAL=../path/to/doctrine-dbal - export DOCTRINE_ORM=../path/to/doctrine - export DOCTRINE_FIXTURES=../path/to/doctrine-fixtures - export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation - export SYMFONY_DEPENDENCY_INJECTION=../path/to/DependencyInjection - export SYMFONY_FORM=../path/to/Form - export SYMFONY_SECURITY=../path/to/Security - export SYMFONY_VALIDATOR=../path/to/Validator - export SYMFONY_HTTP_KERNEL=../path/to/HttpKernel - export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher + $ cd path/to/Symfony/Bridge/Doctrine/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php b/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php index 994592e22eb7..7912352895f9 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php +++ b/src/Symfony/Bridge/Doctrine/Tests/bootstrap.php @@ -9,62 +9,6 @@ * file that was distributed with this source code. */ -spl_autoload_register($loader = function ($class) { - foreach (array( - 'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation', - 'SYMFONY_DEPENDENCY_INJECTION' => 'DependencyInjection', - 'SYMFONY_FORM' => 'Form', - 'SYMFONY_SECURITY' => 'Security', - 'SYMFONY_VALIDATOR' => 'Validator', - 'SYMFONY_HTTP_KERNEL' => 'HttpKernel', - 'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher', - ) as $env => $name) { - if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) { - if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) { - require_once $file; - } - } - } +$loader = require __DIR__.'/../vendor/autoload.php'; - if (isset($_SERVER['SYMFONY_HTTP_FOUNDATION']) && 'SessionHandlerInterface' === ltrim($class, '/')) { - require_once $_SERVER['SYMFONY_HTTP_FOUNDATION'].'/Resources/stubs/SessionHandlerInterface.php'; - } - - if (isset($_SERVER['DOCTRINE_FIXTURES']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common\DataFixtures')) { - if (file_exists($file = $_SERVER['DOCTRINE_FIXTURES'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (isset($_SERVER['DOCTRINE_COMMON']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common')) { - if (file_exists($file = $_SERVER['DOCTRINE_COMMON'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (isset($_SERVER['DOCTRINE_DBAL']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\DBAL')) { - if (file_exists($file = $_SERVER['DOCTRINE_DBAL'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (isset($_SERVER['DOCTRINE_ORM']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\ORM')) { - if (file_exists($file = $_SERVER['DOCTRINE_ORM'].'/lib/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (0 === strpos(ltrim($class, '/'), 'Symfony\Bridge\Doctrine')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Bridge\Doctrine')).'.php')) { - require_once $file; - } - } -}); - -if (isset($_SERVER['DOCTRINE_COMMON'])) { - Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) use ($loader) { - $loader($class); - - return class_exists($class, false); - }); -} +Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass')); diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 325c335e3e4d..aae52769336b 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -19,6 +19,16 @@ "php": ">=5.3.3", "doctrine/common": ">=2.2,<2.4-dev" }, + "require-dev": { + "symfony/dependency-injection": "2.2.*", + "symfony/form": "2.2.*", + "symfony/http-kernel": "2.2.*", + "symfony/security": "2.2.*", + "symfony/validator": "2.2.*", + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": ">=2.2,<2.4-dev", + "doctrine/orm": ">=2.2.3,<2.4-dev" + }, "suggest": { "symfony/form": "2.2.*", "symfony/validator": "2.2.*", diff --git a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist index 779a6e0503ad..c8f58f323220 100644 --- a/src/Symfony/Bridge/Doctrine/phpunit.xml.dist +++ b/src/Symfony/Bridge/Doctrine/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="tests/bootstrap.php" + bootstrap="Tests/bootstrap.php" > diff --git a/src/Symfony/Bridge/Monolog/.gitignore b/src/Symfony/Bridge/Monolog/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Bridge/Monolog/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Monolog/README.md b/src/Symfony/Bridge/Monolog/README.md index 111f673e0e6a..4e2253c5eafc 100644 --- a/src/Symfony/Bridge/Monolog/README.md +++ b/src/Symfony/Bridge/Monolog/README.md @@ -8,11 +8,6 @@ Resources You can run the unit tests with the following command: - phpunit -c src/Symfony/Bridge/Monolog/ - -If you also want to run the unit tests that depend on other Symfony -Components, declare the following environment variables before running -PHPUnit: - - export MONOLOG=../path/to/Monolog - export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation + $ cd path/to/Symfony/Bridge/Monolog/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Monolog/Tests/bootstrap.php b/src/Symfony/Bridge/Monolog/Tests/bootstrap.php deleted file mode 100644 index 571a8ef0218d..000000000000 --- a/src/Symfony/Bridge/Monolog/Tests/bootstrap.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - foreach (array( - 'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation', - ) as $env => $name) { - if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) { - if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) { - require_once $file; - } - } - } - - if (isset($_SERVER['MONOLOG']) && 0 === strpos(ltrim($class, '/'), 'Monolog')) { - if (file_exists($file = $_SERVER['MONOLOG'].'/src/'.str_replace('\\', '/', $class).'.php')) { - require_once $file; - } - } - - if (0 === strpos(ltrim($class, '/'), 'Symfony\Bridge\Monolog')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Bridge\Monolog')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Bridge/Monolog/phpunit.xml.dist b/src/Symfony/Bridge/Monolog/phpunit.xml.dist index f26e3fa07520..9dca6482fc0d 100644 --- a/src/Symfony/Bridge/Monolog/phpunit.xml.dist +++ b/src/Symfony/Bridge/Monolog/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Bridge/Propel1/.gitignore b/src/Symfony/Bridge/Propel1/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Bridge/Propel1/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Propel1/README.md b/src/Symfony/Bridge/Propel1/README.md index 0c336a30bb8e..abf786e0be11 100644 --- a/src/Symfony/Bridge/Propel1/README.md +++ b/src/Symfony/Bridge/Propel1/README.md @@ -8,15 +8,6 @@ Resources You can run the unit tests with the following command: - phpunit -c src/Symfony/Bridge/Propel/ - -If you also want to run the unit tests that depend on other Symfony -Components, declare the following environment variables before running -PHPUnit: - - export PROPEL1=../path/to/Propel - export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation - export SYMFONY_HTTP_KERNEL=../path/to/HttpKernel - export SYMFONY_FORM=../path/to/Form - export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher - export SYMFONY_OPTIONS_RESOLVER=../path/to/OptionsResolver \ No newline at end of file + $ cd path/to/Symfony/Bridge/Propel1/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Propel1/Tests/bootstrap.php b/src/Symfony/Bridge/Propel1/Tests/bootstrap.php deleted file mode 100644 index 2ace36bc5afb..000000000000 --- a/src/Symfony/Bridge/Propel1/Tests/bootstrap.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - foreach (array( - 'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation', - 'SYMFONY_HTTP_KERNEL' => 'HttpKernel', - 'SYMFONY_FORM' => 'Form', - 'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher', - 'SYMFONY_OPTIONS_RESOLVER' => 'OptionsResolver', - ) as $env => $name) { - if (isset($_SERVER[$env]) && 0 === strpos(ltrim($class, '/'), 'Symfony\Component\\'.$name)) { - if (file_exists($file = $_SERVER[$env].'/'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\\'.$name)).'.php')) { - require_once $file; - } - } - } - - if (0 === strpos(ltrim($class, '/'), 'Symfony\Bridge\Propel1')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Bridge\Propel1')).'.php')) { - require_once $file; - } - } -}); - -if (isset($_SERVER['PROPEL1']) && is_file($file = $_SERVER['PROPEL1'].'/runtime/lib/Propel.php')) { - require_once $file; -} diff --git a/src/Symfony/Bridge/Propel1/phpunit.xml.dist b/src/Symfony/Bridge/Propel1/phpunit.xml.dist index ae1d6cdee2e0..7a5c82b5fffe 100644 --- a/src/Symfony/Bridge/Propel1/phpunit.xml.dist +++ b/src/Symfony/Bridge/Propel1/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Bridge/Twig/.gitignore b/src/Symfony/Bridge/Twig/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Bridge/Twig/.gitignore +++ b/src/Symfony/Bridge/Twig/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Bridge/Twig/README.md b/src/Symfony/Bridge/Twig/README.md index 80cf13b3cf5b..e5663236dd5d 100644 --- a/src/Symfony/Bridge/Twig/README.md +++ b/src/Symfony/Bridge/Twig/README.md @@ -10,6 +10,6 @@ Resources If you want to run the unit tests, install dev dependencies before running PHPUnit: - php composer.phar install --dev - - phpunit + $ cd path/to/Symfony/Bridge/Twig/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Bridge/Twig/Tests/bootstrap.php b/src/Symfony/Bridge/Twig/Tests/bootstrap.php deleted file mode 100644 index dffd6eb4194a..000000000000 --- a/src/Symfony/Bridge/Twig/Tests/bootstrap.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Bridge/Twig/phpunit.xml.dist b/src/Symfony/Bridge/Twig/phpunit.xml.dist index f0f818102286..cc9e0e86b19b 100644 --- a/src/Symfony/Bridge/Twig/phpunit.xml.dist +++ b/src/Symfony/Bridge/Twig/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/BrowserKit/.gitignore b/src/Symfony/Component/BrowserKit/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/BrowserKit/.gitignore +++ b/src/Symfony/Component/BrowserKit/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/BrowserKit/README.md b/src/Symfony/Component/BrowserKit/README.md index 061c2d7d6beb..da191883625f 100644 --- a/src/Symfony/Component/BrowserKit/README.md +++ b/src/Symfony/Component/BrowserKit/README.md @@ -18,9 +18,6 @@ provided by the HttpKernel component. You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/BrowserKit/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/BrowserKit/Tests/bootstrap.php b/src/Symfony/Component/BrowserKit/Tests/bootstrap.php deleted file mode 100644 index 1b326ffd2e72..000000000000 --- a/src/Symfony/Component/BrowserKit/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\BrowserKit')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\BrowserKit')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/BrowserKit/phpunit.xml.dist b/src/Symfony/Component/BrowserKit/phpunit.xml.dist index 0ddabeda0e5e..8dff1ea1f99d 100644 --- a/src/Symfony/Component/BrowserKit/phpunit.xml.dist +++ b/src/Symfony/Component/BrowserKit/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/ClassLoader/.gitignore b/src/Symfony/Component/ClassLoader/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/ClassLoader/.gitignore +++ b/src/Symfony/Component/ClassLoader/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/ClassLoader/README.md b/src/Symfony/Component/ClassLoader/README.md index 64dffe9a68a9..5ac31c64890d 100644 --- a/src/Symfony/Component/ClassLoader/README.md +++ b/src/Symfony/Component/ClassLoader/README.md @@ -64,9 +64,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/ClassLoader/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/ClassLoader/Tests/bootstrap.php b/src/Symfony/Component/ClassLoader/Tests/bootstrap.php deleted file mode 100644 index 54dac3fd265d..000000000000 --- a/src/Symfony/Component/ClassLoader/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\ClassLoader')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\ClassLoader')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/ClassLoader/phpunit.xml.dist b/src/Symfony/Component/ClassLoader/phpunit.xml.dist index ae7e2ad9518c..0d29c115323e 100644 --- a/src/Symfony/Component/ClassLoader/phpunit.xml.dist +++ b/src/Symfony/Component/ClassLoader/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Config/.gitignore b/src/Symfony/Component/Config/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Config/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Config/README.md b/src/Symfony/Component/Config/README.md index e87363df2d37..c7865b381545 100644 --- a/src/Symfony/Component/Config/README.md +++ b/src/Symfony/Component/Config/README.md @@ -11,4 +11,7 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Config/ + $ composer.phar install --dev + $ phpunit + diff --git a/src/Symfony/Component/Config/Tests/bootstrap.php b/src/Symfony/Component/Config/Tests/bootstrap.php deleted file mode 100644 index 3a61b6d59d19..000000000000 --- a/src/Symfony/Component/Config/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Config')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Config')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Config/phpunit.xml.dist b/src/Symfony/Component/Config/phpunit.xml.dist index e0195190eaf0..7ba6e5523447 100644 --- a/src/Symfony/Component/Config/phpunit.xml.dist +++ b/src/Symfony/Component/Config/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Console/.gitignore b/src/Symfony/Component/Console/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Console/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Console/README.md b/src/Symfony/Component/Console/README.md index 4f234e034d08..fbf05fc8532e 100644 --- a/src/Symfony/Component/Console/README.md +++ b/src/Symfony/Component/Console/README.md @@ -45,7 +45,9 @@ Tests You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Console/ + $ composer.phar install --dev + $ phpunit Third Party ----------- diff --git a/src/Symfony/Component/Console/Tests/bootstrap.php b/src/Symfony/Component/Console/Tests/bootstrap.php deleted file mode 100644 index c486b72642ac..000000000000 --- a/src/Symfony/Component/Console/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Console')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Console')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Console/phpunit.xml.dist b/src/Symfony/Component/Console/phpunit.xml.dist index fd1c069feac9..8a7edd46af51 100644 --- a/src/Symfony/Component/Console/phpunit.xml.dist +++ b/src/Symfony/Component/Console/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/CssSelector/.gitignore b/src/Symfony/Component/CssSelector/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/CssSelector/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/CssSelector/README.md b/src/Symfony/Component/CssSelector/README.md index dd92f7a82c75..2424bea90a93 100644 --- a/src/Symfony/Component/CssSelector/README.md +++ b/src/Symfony/Component/CssSelector/README.md @@ -20,4 +20,6 @@ Current code is a port of https://github.com/SimonSapin/cssselect@fd2e70 You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/CssSelector/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/CssSelector/Tests/bootstrap.php b/src/Symfony/Component/CssSelector/Tests/bootstrap.php deleted file mode 100644 index d2c7d087ef2b..000000000000 --- a/src/Symfony/Component/CssSelector/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\CssSelector')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\CssSelector')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/CssSelector/phpunit.xml.dist b/src/Symfony/Component/CssSelector/phpunit.xml.dist index 1aeb811580a7..a19dc00b348f 100644 --- a/src/Symfony/Component/CssSelector/phpunit.xml.dist +++ b/src/Symfony/Component/CssSelector/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/DependencyInjection/.gitignore b/src/Symfony/Component/DependencyInjection/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/DependencyInjection/.gitignore +++ b/src/Symfony/Component/DependencyInjection/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/DependencyInjection/README.md b/src/Symfony/Component/DependencyInjection/README.md index 5cb62cf1c489..ab6759524040 100644 --- a/src/Symfony/Component/DependencyInjection/README.md +++ b/src/Symfony/Component/DependencyInjection/README.md @@ -68,9 +68,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/DependencyInjection/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/DependencyInjection/Tests/bootstrap.php b/src/Symfony/Component/DependencyInjection/Tests/bootstrap.php deleted file mode 100644 index fd3118fc361c..000000000000 --- a/src/Symfony/Component/DependencyInjection/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\DependencyInjection')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DependencyInjection')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist index 554d1046b52c..53f5f99d6002 100644 --- a/src/Symfony/Component/DependencyInjection/phpunit.xml.dist +++ b/src/Symfony/Component/DependencyInjection/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/DomCrawler/.gitignore b/src/Symfony/Component/DomCrawler/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/DomCrawler/.gitignore +++ b/src/Symfony/Component/DomCrawler/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/DomCrawler/README.md b/src/Symfony/Component/DomCrawler/README.md index b383b5184bcc..721c0d9df187 100644 --- a/src/Symfony/Component/DomCrawler/README.md +++ b/src/Symfony/Component/DomCrawler/README.md @@ -27,9 +27,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/DomCrawler/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/DomCrawler/Tests/bootstrap.php b/src/Symfony/Component/DomCrawler/Tests/bootstrap.php deleted file mode 100644 index 78425f484a3c..000000000000 --- a/src/Symfony/Component/DomCrawler/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\DomCrawler')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DomCrawler')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/DomCrawler/phpunit.xml.dist b/src/Symfony/Component/DomCrawler/phpunit.xml.dist index 1ee868ab54f1..0f8d2da7575c 100644 --- a/src/Symfony/Component/DomCrawler/phpunit.xml.dist +++ b/src/Symfony/Component/DomCrawler/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/EventDispatcher/.gitignore b/src/Symfony/Component/EventDispatcher/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/EventDispatcher/.gitignore +++ b/src/Symfony/Component/EventDispatcher/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/EventDispatcher/README.md b/src/Symfony/Component/EventDispatcher/README.md index a2bcfca1e354..11f6b1888e39 100644 --- a/src/Symfony/Component/EventDispatcher/README.md +++ b/src/Symfony/Component/EventDispatcher/README.md @@ -20,9 +20,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/EventDispatcher/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/EventDispatcher/Tests/bootstrap.php b/src/Symfony/Component/EventDispatcher/Tests/bootstrap.php deleted file mode 100644 index 033180fd3fb2..000000000000 --- a/src/Symfony/Component/EventDispatcher/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\EventDispatcher')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\EventDispatcher')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist index c5571353a650..0c3de4f7b214 100644 --- a/src/Symfony/Component/EventDispatcher/phpunit.xml.dist +++ b/src/Symfony/Component/EventDispatcher/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Filesystem/.gitignore b/src/Symfony/Component/Filesystem/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Filesystem/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Filesystem/README.md b/src/Symfony/Component/Filesystem/README.md index 5c654aad35be..94ac1469c14c 100644 --- a/src/Symfony/Component/Filesystem/README.md +++ b/src/Symfony/Component/Filesystem/README.md @@ -40,4 +40,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Filesystem/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Filesystem/Tests/bootstrap.php b/src/Symfony/Component/Filesystem/Tests/bootstrap.php deleted file mode 100644 index 940c6984504f..000000000000 --- a/src/Symfony/Component/Filesystem/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Filesystem')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Filesystem')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Filesystem/phpunit.xml.dist b/src/Symfony/Component/Filesystem/phpunit.xml.dist index 5cd2dc961c92..ef0bf954137e 100644 --- a/src/Symfony/Component/Filesystem/phpunit.xml.dist +++ b/src/Symfony/Component/Filesystem/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Finder/.gitignore b/src/Symfony/Component/Finder/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Finder/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Finder/README.md b/src/Symfony/Component/Finder/README.md index 0c4516f7d6b2..a4caf93baa3d 100644 --- a/src/Symfony/Component/Finder/README.md +++ b/src/Symfony/Component/Finder/README.md @@ -35,4 +35,7 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Finder/ + $ composer.phar install --dev + $ phpunit + diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php index cf1109ebda2c..9b8384b5cca3 100644 --- a/src/Symfony/Component/Finder/Tests/FinderTest.php +++ b/src/Symfony/Component/Finder/Tests/FinderTest.php @@ -312,7 +312,7 @@ public function testIn($adapter) $finder = $this->buildFinder($adapter); $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); - $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php'), $iterator); + $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php'), $iterator); } /** diff --git a/src/Symfony/Component/Finder/Tests/bootstrap.php b/src/Symfony/Component/Finder/Tests/bootstrap.php deleted file mode 100644 index 3edc1b253686..000000000000 --- a/src/Symfony/Component/Finder/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Finder')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Finder')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Finder/phpunit.xml.dist b/src/Symfony/Component/Finder/phpunit.xml.dist index cd116f57163c..23272235b969 100644 --- a/src/Symfony/Component/Finder/phpunit.xml.dist +++ b/src/Symfony/Component/Finder/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Form/.gitignore b/src/Symfony/Component/Form/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/Form/.gitignore +++ b/src/Symfony/Component/Form/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index f6ddf031aa08..c336935dd808 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -21,9 +21,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/Form/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Form/Tests/bootstrap.php b/src/Symfony/Component/Form/Tests/bootstrap.php deleted file mode 100644 index 902cefce5c7f..000000000000 --- a/src/Symfony/Component/Form/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Form')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Form')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Form/phpunit.xml.dist b/src/Symfony/Component/Form/phpunit.xml.dist index 0fd49c27e42f..d0d261f19429 100644 --- a/src/Symfony/Component/Form/phpunit.xml.dist +++ b/src/Symfony/Component/Form/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/HttpFoundation/.gitignore b/src/Symfony/Component/HttpFoundation/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/HttpFoundation/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/HttpFoundation/README.md b/src/Symfony/Component/HttpFoundation/README.md index 0c4a4a9dc3a6..ed49b4e15e41 100644 --- a/src/Symfony/Component/HttpFoundation/README.md +++ b/src/Symfony/Component/HttpFoundation/README.md @@ -43,4 +43,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/HttpFoundation/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php index 4a8fe5489fff..23f93f7a763a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php @@ -49,7 +49,7 @@ public function testGetContent() public function testRequests() { - $response = BinaryFileResponse::create('src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif')->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif')->setAutoEtag(); // do a request to get the ETag $request = Request::create('/'); diff --git a/src/Symfony/Component/HttpFoundation/Tests/bootstrap.php b/src/Symfony/Component/HttpFoundation/Tests/bootstrap.php deleted file mode 100644 index f7fc8c9809aa..000000000000 --- a/src/Symfony/Component/HttpFoundation/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (ltrim('SessionHandlerInterface', '/') === $class) { - require_once __DIR__.'/../Resources/stubs/SessionHandlerInterface.php'; - } - - if (0 !== strpos(ltrim($class, '/'), 'Symfony\Component\HttpFoundation')) { - return; - } - - require_once __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\HttpFoundation')).'.php'; -}); diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index 09b8725308d8..a8e00ef2872b 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -20,7 +20,7 @@ }, "autoload": { "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" }, - "classmap": [ "Symfony/Component/HttpFoundation/Resources/stubs" ] + "classmap": [ "Symfony/Component/HttpFoundation/Resources/Resources/stubs" ] }, "target-dir": "Symfony/Component/HttpFoundation", "minimum-stability": "dev", diff --git a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist index 2a760f290c73..df11f72c0ff3 100644 --- a/src/Symfony/Component/HttpFoundation/phpunit.xml.dist +++ b/src/Symfony/Component/HttpFoundation/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/HttpKernel/.gitignore b/src/Symfony/Component/HttpKernel/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/HttpKernel/.gitignore +++ b/src/Symfony/Component/HttpKernel/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/HttpKernel/README.md b/src/Symfony/Component/HttpKernel/README.md index c44d53085820..e0f3c987c477 100644 --- a/src/Symfony/Component/HttpKernel/README.md +++ b/src/Symfony/Component/HttpKernel/README.md @@ -84,9 +84,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/HttpKernel/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php index 48ff956b4daf..0d26fe42b3f6 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php @@ -19,7 +19,7 @@ protected function getScript($request) { $script = parent::getScript($request); - $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '".__DIR__."/../bootstrap.php';", $script); + $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '".__DIR__."/../../vendor/autoload.php';", $script); return $script; } diff --git a/src/Symfony/Component/HttpKernel/Tests/bootstrap.php b/src/Symfony/Component/HttpKernel/Tests/bootstrap.php deleted file mode 100644 index 24b1009e9acd..000000000000 --- a/src/Symfony/Component/HttpKernel/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\HttpKernel')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\HttpKernel')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/HttpKernel/phpunit.xml.dist b/src/Symfony/Component/HttpKernel/phpunit.xml.dist index dd824acdf7ea..f8490c3f9e66 100644 --- a/src/Symfony/Component/HttpKernel/phpunit.xml.dist +++ b/src/Symfony/Component/HttpKernel/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Locale/.gitignore b/src/Symfony/Component/Locale/.gitignore index 3dc210d9072d..dc89eba81b10 100644 --- a/src/Symfony/Component/Locale/.gitignore +++ b/src/Symfony/Component/Locale/.gitignore @@ -3,3 +3,6 @@ Resources/data/4.2/ Resources/data/4.4/ Resources/data/4.6/ Resources/data/4.8/ +vendor/ +composer.lock +phpunit.xml diff --git a/src/Symfony/Component/Locale/README.md b/src/Symfony/Component/Locale/README.md index 431a65a1fb03..72b4bfa3d4ea 100644 --- a/src/Symfony/Component/Locale/README.md +++ b/src/Symfony/Component/Locale/README.md @@ -22,7 +22,9 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/XXX/ + $ composer.phar install --dev + $ phpunit If your PHP have the ``intl`` extension enabled but the intl extension ICU data version mismatch the one shipped with the component, you can build the data for diff --git a/src/Symfony/Component/Locale/phpunit.xml.dist b/src/Symfony/Component/Locale/phpunit.xml.dist index f6a1a6f65d73..ebaa3ef8d0d5 100644 --- a/src/Symfony/Component/Locale/phpunit.xml.dist +++ b/src/Symfony/Component/Locale/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/OptionsResolver/.gitignore b/src/Symfony/Component/OptionsResolver/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/OptionsResolver/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/OptionsResolver/README.md b/src/Symfony/Component/OptionsResolver/README.md index e45b8b3d7d25..29cea102d68a 100644 --- a/src/Symfony/Component/OptionsResolver/README.md +++ b/src/Symfony/Component/OptionsResolver/README.md @@ -102,4 +102,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/OptionsResolver/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/OptionsResolver/Tests/bootstrap.php b/src/Symfony/Component/OptionsResolver/Tests/bootstrap.php deleted file mode 100644 index 328ecb2d1e4f..000000000000 --- a/src/Symfony/Component/OptionsResolver/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\OptionsResolver')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\OptionsResolver')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist index 639bb3fbc605..ad24d17ba810 100644 --- a/src/Symfony/Component/OptionsResolver/phpunit.xml.dist +++ b/src/Symfony/Component/OptionsResolver/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Process/.gitignore b/src/Symfony/Component/Process/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Process/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Process/README.md b/src/Symfony/Component/Process/README.md index 2a8a4f764a3d..7b9f30757bea 100644 --- a/src/Symfony/Component/Process/README.md +++ b/src/Symfony/Component/Process/README.md @@ -42,4 +42,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/XXX/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Process/Tests/bootstrap.php b/src/Symfony/Component/Process/Tests/bootstrap.php deleted file mode 100644 index 11054b98928f..000000000000 --- a/src/Symfony/Component/Process/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Process')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Process')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Process/phpunit.xml.dist b/src/Symfony/Component/Process/phpunit.xml.dist index c120a97e9118..9d5830f9e24e 100644 --- a/src/Symfony/Component/Process/phpunit.xml.dist +++ b/src/Symfony/Component/Process/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Routing/.gitignore b/src/Symfony/Component/Routing/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/Routing/.gitignore +++ b/src/Symfony/Component/Routing/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Routing/README.md b/src/Symfony/Component/Routing/README.md index 61504c84d946..663844a67429 100644 --- a/src/Symfony/Component/Routing/README.md +++ b/src/Symfony/Component/Routing/README.md @@ -29,9 +29,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/Routing/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Routing/Tests/bootstrap.php b/src/Symfony/Component/Routing/Tests/bootstrap.php deleted file mode 100644 index 23303c04bb7e..000000000000 --- a/src/Symfony/Component/Routing/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Routing')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Routing')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Routing/phpunit.xml.dist b/src/Symfony/Component/Routing/phpunit.xml.dist index 6d25ebf91f83..830066aab59b 100644 --- a/src/Symfony/Component/Routing/phpunit.xml.dist +++ b/src/Symfony/Component/Routing/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Security/.gitignore b/src/Symfony/Component/Security/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/Security/.gitignore +++ b/src/Symfony/Component/Security/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md index 7ae97b103079..057f8445be0c 100644 --- a/src/Symfony/Component/Security/README.md +++ b/src/Symfony/Component/Security/README.md @@ -18,9 +18,6 @@ Resources You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/Security/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Security/Tests/bootstrap.php b/src/Symfony/Component/Security/Tests/bootstrap.php deleted file mode 100644 index 84ae3a67889f..000000000000 --- a/src/Symfony/Component/Security/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Security')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Security')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Security/phpunit.xml.dist b/src/Symfony/Component/Security/phpunit.xml.dist index 0560cf53346a..f45a44ec5a3d 100644 --- a/src/Symfony/Component/Security/phpunit.xml.dist +++ b/src/Symfony/Component/Security/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Serializer/.gitignore b/src/Symfony/Component/Serializer/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Serializer/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Serializer/README.md b/src/Symfony/Component/Serializer/README.md index df74a9a00112..3e808059db4d 100644 --- a/src/Symfony/Component/Serializer/README.md +++ b/src/Symfony/Component/Serializer/README.md @@ -10,4 +10,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Serializer/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Serializer/Tests/bootstrap.php b/src/Symfony/Component/Serializer/Tests/bootstrap.php deleted file mode 100644 index 3b0e811a9410..000000000000 --- a/src/Symfony/Component/Serializer/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Serializer')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Serializer')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Serializer/phpunit.xml.dist b/src/Symfony/Component/Serializer/phpunit.xml.dist index c85ffa717a28..691219da83c1 100644 --- a/src/Symfony/Component/Serializer/phpunit.xml.dist +++ b/src/Symfony/Component/Serializer/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Templating/.gitignore b/src/Symfony/Component/Templating/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Templating/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Templating/README.md b/src/Symfony/Component/Templating/README.md index 55d9c69e3d59..7c2814a2d39d 100644 --- a/src/Symfony/Component/Templating/README.md +++ b/src/Symfony/Component/Templating/README.md @@ -13,4 +13,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Templating/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Templating/Tests/bootstrap.php b/src/Symfony/Component/Templating/Tests/bootstrap.php deleted file mode 100644 index 78a2ec541be1..000000000000 --- a/src/Symfony/Component/Templating/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Templating')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Templating')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Templating/phpunit.xml.dist b/src/Symfony/Component/Templating/phpunit.xml.dist index 0fc73521c5e0..89288dd30e6b 100644 --- a/src/Symfony/Component/Templating/phpunit.xml.dist +++ b/src/Symfony/Component/Templating/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Translation/.gitignore b/src/Symfony/Component/Translation/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/Translation/.gitignore +++ b/src/Symfony/Component/Translation/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md index c5dd05222e72..4aab5f714eb6 100644 --- a/src/Symfony/Component/Translation/README.md +++ b/src/Symfony/Component/Translation/README.md @@ -30,9 +30,6 @@ http://symfony.com/doc/2.0/book/translation.html You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/Translation/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Translation/Tests/bootstrap.php b/src/Symfony/Component/Translation/Tests/bootstrap.php deleted file mode 100644 index c203e9997918..000000000000 --- a/src/Symfony/Component/Translation/Tests/bootstrap.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Translation')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Translation')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} diff --git a/src/Symfony/Component/Translation/phpunit.xml.dist b/src/Symfony/Component/Translation/phpunit.xml.dist index 65542f6a893f..1b37f2142a24 100644 --- a/src/Symfony/Component/Translation/phpunit.xml.dist +++ b/src/Symfony/Component/Translation/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Validator/.gitignore b/src/Symfony/Component/Validator/.gitignore index d1502b087b4d..44de97a36a6d 100644 --- a/src/Symfony/Component/Validator/.gitignore +++ b/src/Symfony/Component/Validator/.gitignore @@ -1,2 +1,4 @@ vendor/ composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index 620c3aa4e902..f1b255602a9d 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -115,9 +115,6 @@ http://jcp.org/en/jsr/detail?id=303 You can run the unit tests with the following command: - phpunit - -If you also want to run the unit tests that depend on other Symfony -Components, install dev dependencies before running PHPUnit: - - php composer.phar install --dev + $ cd path/to/Symfony/Component/Validator/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Validator/Tests/bootstrap.php b/src/Symfony/Component/Validator/Tests/bootstrap.php deleted file mode 100644 index be500e864202..000000000000 --- a/src/Symfony/Component/Validator/Tests/bootstrap.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Validator')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Validator')).'.php')) { - require_once $file; - } - } -}); - -if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) { - require_once $loader; -} - -if (class_exists($annotationRegistry = 'Doctrine\Common\Annotations\AnnotationRegistry')) { - $annotationRegistry::registerLoader(function($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Validator')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Validator')).'.php')) { - require_once $file; - } - } - - return class_exists($class, false); - }); -} diff --git a/src/Symfony/Component/Validator/phpunit.xml.dist b/src/Symfony/Component/Validator/phpunit.xml.dist index a29586c86b1e..c7f1cef07028 100644 --- a/src/Symfony/Component/Validator/phpunit.xml.dist +++ b/src/Symfony/Component/Validator/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > diff --git a/src/Symfony/Component/Yaml/.gitignore b/src/Symfony/Component/Yaml/.gitignore new file mode 100644 index 000000000000..44de97a36a6d --- /dev/null +++ b/src/Symfony/Component/Yaml/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/src/Symfony/Component/Yaml/README.md b/src/Symfony/Component/Yaml/README.md index 34413166991a..0864e49dca05 100644 --- a/src/Symfony/Component/Yaml/README.md +++ b/src/Symfony/Component/Yaml/README.md @@ -14,4 +14,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Yaml/ + $ composer.phar install --dev + $ phpunit diff --git a/src/Symfony/Component/Yaml/Tests/bootstrap.php b/src/Symfony/Component/Yaml/Tests/bootstrap.php deleted file mode 100644 index 985f1f22e2c6..000000000000 --- a/src/Symfony/Component/Yaml/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Yaml')).'.php')) { - require_once $file; - } - } -}); diff --git a/src/Symfony/Component/Yaml/phpunit.xml.dist b/src/Symfony/Component/Yaml/phpunit.xml.dist index d025f9e49a7e..aa77e9de77ce 100644 --- a/src/Symfony/Component/Yaml/phpunit.xml.dist +++ b/src/Symfony/Component/Yaml/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" >