new architecture for test + autoload version 2.8.22

This commit is contained in:
Julien Fastré 2017-07-04 16:29:34 +02:00
parent fae191eef7
commit c01a2c9178
138 changed files with 42 additions and 13 deletions

3
.gitignore vendored
View File

@ -6,5 +6,6 @@ parameters.yml
*.sass-cache
Resources/node_modules/
Tests/Fixtures/App/app/config/parameters.yml
/nbproject/private/
Resources/test/Fixtures/App/bootstrap.php.cache
/nbproject/private/

View File

@ -4,10 +4,10 @@
before_script:
- if [ -z ${GITHUB_TOKEN+x} ]; then composer config github-oauth.github.com $GITHUB_TOKEN; fi
- php -d memory_limit=-1 /usr/local/bin/composer install --no-interaction
- cp Tests/Fixtures/App/app/config/parameters.gitlab-ci.yml Tests/Fixtures/App/app/config/parameters.yml
- php Tests/Fixtures/App/app/console.php --env=test cache:warmup
- php Tests/Fixtures/App/app/console.php doctrine:migrations:migrate --env=test --no-interaction
- php Tests/Fixtures/App/app/console.php doctrine:fixtures:load --env=test --no-interaction
- cp Resources/test/Fixtures/App/app/config/parameters.gitlab-ci.yml Resources/test/Fixtures/App/app/config/parameters.yml
- php Resources/test/Fixtures/App/app/console.php --env=test cache:warmup
- php Resources/test/Fixtures/App/app/console.php doctrine:migrations:migrate --env=test --no-interaction
- php Resources/test/Fixtures/App/app/console.php doctrine:fixtures:load --env=test --no-interaction
stages:
- test

View File

@ -3,10 +3,8 @@
use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;
/**
* @var ClassLoader $loader
*/
$loader = require __DIR__.'/../../../../vendor/autoload.php';
/** @var ClassLoader $loader */
$loader = require __DIR__.'/../../../../../vendor/autoload.php';
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));

View File

@ -0,0 +1,27 @@
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
set_time_limit(0);
require __DIR__.'/autoload.php';
$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
if ($debug) {
Debug::enable();
}
$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
$application->run($input);

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

Some files were not shown because too many files have changed in this diff Show More