[Components] Tests/Autoloading fixes
* Switched to Composer to manage "dev" dependencies * Fixed READMEs * Excluded vendor in phpunit.xml.dist files * Fixed message in bootstrap.php files * Added autoloader for the component itself
This commit is contained in:
parent
b0a6956bdc
commit
c1959571ac
2
src/Symfony/Component/BrowserKit/.gitignore
vendored
Normal file
2
src/Symfony/Component/BrowserKit/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -18,11 +18,9 @@ provided by the HttpKernel component.
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/BrowserKit/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_PROCESS=../path/to/Process
|
php composer.phar install --dev
|
||||||
export SYMFONY_DOM_CRAWLER=../path/to/DomCrawler
|
|
||||||
|
@ -10,21 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_PROCESS' => 'Process',
|
|
||||||
'SYMFONY_DOM_CRAWLER' => 'DomCrawler',
|
|
||||||
'SYMFONY_CSS_SELECTOR' => 'CssSelector',
|
|
||||||
) 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\Component\BrowserKit')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\BrowserKit')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\BrowserKit')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\BrowserKit')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -17,7 +17,11 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2",
|
"php": ">=5.3.2",
|
||||||
"symfony/dom-crawler": "self.version"
|
"symfony/dom-crawler": "2.1.*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/process": "2.1.*",
|
||||||
|
"symfony/css-selector": "2.1.*"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/process": "self.version"
|
"symfony/process": "self.version"
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
2
src/Symfony/Component/ClassLoader/.gitignore
vendored
Normal file
2
src/Symfony/Component/ClassLoader/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -64,10 +64,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/ClassLoader/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_FINDER=../path/to/Finder
|
php composer.phar install --dev
|
||||||
|
@ -10,19 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_FINDER' => 'Finder',
|
|
||||||
) 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\Component\ClassLoader')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\ClassLoader')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\ClassLoader')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\ClassLoader')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/finder": "2.1.*"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": { "Symfony\\Component\\ClassLoader": "" }
|
"psr-0": { "Symfony\\Component\\ClassLoader": "" }
|
||||||
},
|
},
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -11,4 +11,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Config/
|
phpunit
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -45,7 +45,7 @@ Tests
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Console
|
phpunit
|
||||||
|
|
||||||
Resources
|
Resources
|
||||||
---------
|
---------
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -20,4 +20,4 @@ Current code is a port of http://codespeak.net/svn/lxml/trunk/src/lxml/cssselect
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/CssSelector/
|
phpunit
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
2
src/Symfony/Component/DependencyInjection/.gitignore
vendored
Normal file
2
src/Symfony/Component/DependencyInjection/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -68,11 +68,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/DependencyInjection/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_CONFIG=../path/to/Config
|
php composer.phar install --dev
|
||||||
export SYMFONY_YAML=../path/to/Yaml
|
|
||||||
|
@ -10,20 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_CONFIG' => 'Config',
|
|
||||||
'SYMFONY_YAML' => 'Yaml',
|
|
||||||
) 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\Component\DependencyInjection')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\DependencyInjection')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DependencyInjection')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DependencyInjection')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/yaml": "2.1.*",
|
||||||
|
"symfony/config": "2.1.*"
|
||||||
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/yaml": "self.version",
|
"symfony/yaml": "self.version",
|
||||||
"symfony/config": "self.version"
|
"symfony/config": "self.version"
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
2
src/Symfony/Component/DomCrawler/.gitignore
vendored
Normal file
2
src/Symfony/Component/DomCrawler/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -27,10 +27,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/DomCrawler/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_CSS_SELECTOR=../path/to/CssSelector
|
php composer.phar install --dev
|
||||||
|
@ -10,19 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_CSS_SELECTOR' => 'CssSelector',
|
|
||||||
) 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\Component\DomCrawler')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\DomCrawler')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DomCrawler')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\DomCrawler')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/css-selector": "2.1.*"
|
||||||
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/css-selector": "self.version"
|
"symfony/css-selector": "self.version"
|
||||||
},
|
},
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
2
src/Symfony/Component/EventDispatcher/.gitignore
vendored
Normal file
2
src/Symfony/Component/EventDispatcher/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -20,11 +20,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/EventDispatcher/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_DEPENDENCY_INJECTION=../path/to/DependencyInjection
|
php composer.phar install --dev
|
||||||
export SYMFONY_HTTP_KERNEL=../path/to/HttpKernel
|
|
||||||
|
@ -10,20 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_DEPENDENCY_INJECTION' => 'DependencyInjection',
|
|
||||||
'SYMFONY_HTTP_KERNEL' => 'HttpKernel',
|
|
||||||
) 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\Component\EventDispatcher')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\EventDispatcher')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\EventDispatcher')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\EventDispatcher')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/dependency-injection": "2.1.*"
|
||||||
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/dependency-injection": "self.version",
|
"symfony/dependency-injection": "self.version",
|
||||||
"symfony/http-kernel": "self.version"
|
"symfony/http-kernel": "self.version"
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -27,3 +27,9 @@ Filesystem provides basic utility to manipulate the file system:
|
|||||||
|
|
||||||
$filesystem->isAbsolutePath($file);
|
$filesystem->isAbsolutePath($file);
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
|
phpunit
|
||||||
|
18
src/Symfony/Component/Filesystem/Tests/bootstrap.php
Normal file
18
src/Symfony/Component/Filesystem/Tests/bootstrap.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
28
src/Symfony/Component/Filesystem/phpunit.xml.dist
Normal file
28
src/Symfony/Component/Filesystem/phpunit.xml.dist
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
bootstrap="Tests/bootstrap.php"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Symfony Filesystem Component Test Suite">
|
||||||
|
<directory>./Tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>./</directory>
|
||||||
|
<exclude>
|
||||||
|
<directory>./Tests</directory>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
@ -35,4 +35,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Finder/
|
phpunit
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
2
src/Symfony/Component/Form/.gitignore
vendored
Normal file
2
src/Symfony/Component/Form/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -21,13 +21,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Form/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher
|
php composer.phar install --dev
|
||||||
export SYMFONY_LOCALE=../path/to/Locale
|
|
||||||
export SYMFONY_VALIDATOR=../path/to/Validator
|
|
||||||
export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation
|
|
||||||
|
@ -10,22 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher',
|
|
||||||
'SYMFONY_LOCALE' => 'Locale',
|
|
||||||
'SYMFONY_VALIDATOR' => 'Validator',
|
|
||||||
'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 (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Form')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Form')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Form')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Form')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -17,8 +17,12 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2",
|
"php": ">=5.3.2",
|
||||||
"symfony/event-dispatcher": "self.version",
|
"symfony/event-dispatcher": "2.1.*",
|
||||||
"symfony/locale": "self.version"
|
"symfony/locale": "2.1.*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/validator": "2.1.*",
|
||||||
|
"symfony/http-foundation": "2.1.*"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/validator": "self.version",
|
"symfony/validator": "self.version",
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -43,4 +43,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/HttpFoundation/
|
phpunit
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
2
src/Symfony/Component/HttpKernel/.gitignore
vendored
Normal file
2
src/Symfony/Component/HttpKernel/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -84,18 +84,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/HttpKernel/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher
|
php composer.phar install --dev
|
||||||
export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation
|
|
||||||
export SYMFONY_DEPENDENCY_INJECTION=../path/to/DependencyInjection
|
|
||||||
export SYMFONY_CONSOLE=../path/to/Console
|
|
||||||
export SYMFONY_BROWSER_KIT=../path/to/BrowserKit
|
|
||||||
export SYMFONY_FINDER=../path/to/Finder
|
|
||||||
export SYMFONY_PROCESS=../path/to/Process
|
|
||||||
export SYMFONY_ROUTING=../path/to/Routing
|
|
||||||
export SYMFONY_CONFIG=../path/to/Config
|
|
||||||
|
@ -10,28 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher',
|
|
||||||
'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation',
|
|
||||||
'SYMFONY_DEPENDENCY_INJECTION' => 'DependencyInjection',
|
|
||||||
'SYMFONY_CONSOLE' => 'Console',
|
|
||||||
'SYMFONY_BROWSER_KIT' => 'BrowserKit',
|
|
||||||
'SYMFONY_FINDER' => 'Finder',
|
|
||||||
'SYMFONY_CLASS_LOADER' => 'ClassLoader',
|
|
||||||
'SYMFONY_PROCESS' => 'Process',
|
|
||||||
'SYMFONY_ROUTING' => 'Routing',
|
|
||||||
'SYMFONY_CONFIG' => 'Config',
|
|
||||||
) 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\Component\HttpKernel')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\HttpKernel')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\HttpKernel')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\HttpKernel')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -17,8 +17,18 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2",
|
"php": ">=5.3.2",
|
||||||
"symfony/event-dispatcher": "self.version",
|
"symfony/event-dispatcher": "2.1.*",
|
||||||
"symfony/http-foundation": "self.version"
|
"symfony/http-foundation": "2.1.*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/browser-kit": "2.1.*",
|
||||||
|
"symfony/class-loader": "2.1.*",
|
||||||
|
"symfony/config": "2.1.*",
|
||||||
|
"symfony/console": "2.1.*",
|
||||||
|
"symfony/dependency-injection": "2.1.*",
|
||||||
|
"symfony/finder": "2.1.*",
|
||||||
|
"symfony/process": "2.1.*",
|
||||||
|
"symfony/routing": "2.1.*"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/browser-kit": "self.version",
|
"symfony/browser-kit": "self.version",
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -19,4 +19,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Locale/
|
phpunit
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./Resources</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
|
<directory>./vendor</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -42,4 +42,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Process/
|
phpunit
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
2
src/Symfony/Component/Routing/.gitignore
vendored
Normal file
2
src/Symfony/Component/Routing/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -29,12 +29,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Routing/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_CONFIG=../path/to/Config
|
php composer.phar install --dev
|
||||||
export SYMFONY_YAML=../path/to/Yaml
|
|
||||||
export DOCTRINE_COMMON=../path/to/doctrine-common
|
|
||||||
|
@ -10,26 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_CONFIG' => 'Config',
|
|
||||||
'SYMFONY_YAML' => 'Yaml',
|
|
||||||
) 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['DOCTRINE_COMMON']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common')) {
|
|
||||||
if (file_exists($file = $_SERVER['DOCTRINE_COMMON'].'/lib/'.str_replace('\\', '/', $class).'.php')) {
|
|
||||||
require_once $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Routing')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Routing')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Routing')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Routing')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -18,9 +18,15 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/config": "2.1.*",
|
||||||
|
"symfony/yaml": "2.1.*",
|
||||||
|
"doctrine/common": ">=2.1,<2.3-dev"
|
||||||
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/config": "self.version",
|
"symfony/config": "self.version",
|
||||||
"symfony/yaml": "self.version"
|
"symfony/yaml": "self.version",
|
||||||
|
"doctrine/common": ">=2.1,<2.3-dev"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": { "Symfony\\Component\\Routing": "" }
|
"psr-0": { "Symfony\\Component\\Routing": "" }
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./vendor</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
2
src/Symfony/Component/Security/.gitignore
vendored
Normal file
2
src/Symfony/Component/Security/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -18,16 +18,9 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Security/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation
|
php composer.phar install --dev
|
||||||
export SYMFONY_HTTP_KERNEL=../path/to/HttpKernel
|
|
||||||
export SYMFONY_EVENT_DISPATCHER=../path/to/EventDispatcher
|
|
||||||
export SYMFONY_FORM=../path/to/Form
|
|
||||||
export SYMFONY_ROUTING=../path/to/Routing
|
|
||||||
export DOCTRINE_DBAL=../path/to/doctrine-dbal
|
|
||||||
export DOCTRINE_COMMON=../path/to/doctrine-common
|
|
||||||
|
@ -10,35 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_HTTP_FOUNDATION' => 'HttpFoundation',
|
|
||||||
'SYMFONY_HTTP_KERNEL' => 'HttpKernel',
|
|
||||||
'SYMFONY_EVENT_DISPATCHER' => 'EventDispatcher',
|
|
||||||
'SYMFONY_FORM' => 'Form',
|
|
||||||
'SYMFONY_ROUTING' => 'Routing',
|
|
||||||
) 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['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_COMMON']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common')) {
|
|
||||||
if (file_exists($file = $_SERVER['DOCTRINE_COMMON'].'/lib/'.str_replace('\\', '/', $class).'.php')) {
|
|
||||||
require_once $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Security')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Security')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Security')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Security')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -17,9 +17,15 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2",
|
"php": ">=5.3.2",
|
||||||
"symfony/event-dispatcher": "self.version",
|
"symfony/event-dispatcher": "2.1.*",
|
||||||
"symfony/http-foundation": "self.version",
|
"symfony/http-foundation": "2.1.*",
|
||||||
"symfony/http-kernel": "self.version"
|
"symfony/http-kernel": "2.1.*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/form": "2.1.*",
|
||||||
|
"symfony/routing": "2.1.*",
|
||||||
|
"doctrine/common": ">=2.1,<2.3-dev",
|
||||||
|
"doctrine/dbal": ">=2.1,<2.3-dev"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/class-loader": "self.version",
|
"symfony/class-loader": "self.version",
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./vendor</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
@ -10,4 +10,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Serializer/
|
phpunit
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./vendor</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
@ -13,4 +13,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Templating/
|
phpunit
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./vendor</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
2
src/Symfony/Component/Translation/.gitignore
vendored
Normal file
2
src/Symfony/Component/Translation/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -30,11 +30,9 @@ http://symfony.com/doc/2.0/book/translation.html
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Translation/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_CONFIG=../path/to/Config
|
php composer.phar install --dev
|
||||||
export SYMFONY_YAML=../path/to/Yaml
|
|
||||||
|
@ -10,20 +10,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_CONFIG' => 'Config',
|
|
||||||
'SYMFONY_YAML' => 'Yaml',
|
|
||||||
) 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\Component\Translation')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Translation')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Translation')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Translation')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
|
require_once $loader;
|
||||||
|
}
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/config": "2.1.*",
|
||||||
|
"symfony/yaml": "2.1.*"
|
||||||
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/config": "self.version",
|
"symfony/config": "self.version",
|
||||||
"symfony/yaml": "self.version"
|
"symfony/yaml": "self.version"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./vendor</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
2
src/Symfony/Component/Validator/.gitignore
vendored
Normal file
2
src/Symfony/Component/Validator/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
@ -46,13 +46,9 @@ http://jcp.org/en/jsr/detail?id=303
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Validator/
|
phpunit
|
||||||
|
|
||||||
If you also want to run the unit tests that depend on other Symfony
|
If you also want to run the unit tests that depend on other Symfony
|
||||||
Components, declare the following environment variables before running
|
Components, install dev dependencies before running PHPUnit:
|
||||||
PHPUnit:
|
|
||||||
|
|
||||||
export SYMFONY_YAML=../path/to/Yaml
|
php composer.phar install --dev
|
||||||
export SYMFONY_LOCALE=../path/to/Locale
|
|
||||||
export SYMFONY_HTTP_FOUNDATION=../path/to/HttpFoundation
|
|
||||||
export DOCTRINE_COMMON=../path/to/doctrine-common
|
|
||||||
|
@ -9,25 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register($loader = function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
foreach (array(
|
|
||||||
'SYMFONY_YAML' => 'Yaml',
|
|
||||||
'SYMFONY_LOCALE' => 'Locale',
|
|
||||||
'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['DOCTRINE_COMMON']) && 0 === strpos(ltrim($class, '/'), 'Doctrine\Common')) {
|
|
||||||
if (file_exists($file = $_SERVER['DOCTRINE_COMMON'].'/lib/'.str_replace('\\', '/', $class).'.php')) {
|
|
||||||
require_once $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Validator')) {
|
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Validator')) {
|
||||||
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Validator')).'.php')) {
|
if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Validator')).'.php')) {
|
||||||
require_once $file;
|
require_once $file;
|
||||||
@ -35,9 +17,17 @@ spl_autoload_register($loader = function ($class) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isset($_SERVER['DOCTRINE_COMMON'])) {
|
if (file_exists($loader = __DIR__.'/../vendor/autoload.php')) {
|
||||||
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) use ($loader) {
|
require_once $loader;
|
||||||
$loader($class);
|
}
|
||||||
|
|
||||||
|
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);
|
return class_exists($class, false);
|
||||||
});
|
});
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
"php": ">=5.3.2",
|
"php": ">=5.3.2",
|
||||||
"doctrine/common": ">=2.1,<2.3"
|
"doctrine/common": ">=2.1,<2.3"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/http-foundation": "2.1.*",
|
||||||
|
"symfony/locale": "2.1.*",
|
||||||
|
"symfony/yaml": "2.1.*"
|
||||||
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/http-foundation": "self.version",
|
"symfony/http-foundation": "self.version",
|
||||||
"symfony/yaml": "self.version"
|
"symfony/yaml": "self.version"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./vendor</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
@ -14,4 +14,4 @@ Resources
|
|||||||
|
|
||||||
You can run the unit tests with the following command:
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
phpunit -c src/Symfony/Component/Yaml/
|
phpunit
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./</directory>
|
<directory>./</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./Resources</directory>
|
<directory>./vendor</directory>
|
||||||
<directory>./Tests</directory>
|
<directory>./Tests</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
Reference in New Issue
Block a user