diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2012-05-01 17:59:34 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2012-05-01 17:59:34 +0200 |
commit | 95a080053f8dce4f883ad91225e1bef9259fd6ac (patch) | |
tree | 51401b56d549627c744deef9f8a466142aeb46ac /Tests | |
parent | 9ed448495929292bda245fdd74753c98a35d0577 (diff) | |
parent | ffef59ac47cfb80696c545b01eeb92b12c043420 (diff) | |
download | symfony-security-95a080053f8dce4f883ad91225e1bef9259fd6ac.zip symfony-security-95a080053f8dce4f883ad91225e1bef9259fd6ac.tar.gz symfony-security-95a080053f8dce4f883ad91225e1bef9259fd6ac.tar.bz2 |
merged branch willdurand/fix-components (PR #4155)
Commits
-------
c195957 [Components] Tests/Autoloading fixes
Discussion
----------
Fix components
See #4141
----
This PR:
* configures each component to use composer to manage "dev" dependencies instead of env variables;
* adds phpunit configuration file on Filesystem component;
* fixes READMEs.
It's mergeable without any problems, but I would recommend to wait a fix in Composer in order to use `self.version` in `require`/`require-dev` sections.
Note: I kept `suggest` sections because it makes sense but this PR doesn't aim to provide useful explanations for each entry. It could be another PR, not that one.
---------------------------------------------------------------------------
by willdurand at 2012-04-30T20:43:13Z
@fabpot I reviewed each component, one by one. Now `phpunit` always works, even if tests are skipped. A simple `composer install --dev` allows to run the complete test suite. Each commit is well separated from the others. I guess, everything is ok now.
---------------------------------------------------------------------------
by Tobion at 2012-04-30T20:47:00Z
Please squash, as it makes no sense to have the same commit for each component.
---------------------------------------------------------------------------
by fabpot at 2012-05-01T14:26:11Z
Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by willdurand at 2012-05-01T14:29:38Z
done
---------------------------------------------------------------------------
by fabpot at 2012-05-01T15:48:25Z
It does not seem that the commits are squashed.
---------------------------------------------------------------------------
by willdurand at 2012-05-01T15:54:08Z
done
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/bootstrap.php | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index b154988..84ae3a6 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -10,35 +10,13 @@ */ 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 (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; +} |