Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 9ebfce3

Browse files
committed
Merge branch '2.8'
* 2.8: simplified code extract autoloading out from bootstrap
2 parents 018263a + 090dd87 commit 9ebfce3

File tree

5 files changed

+21
-10
lines changed

5 files changed

+21
-10
lines changed

app/autoload.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
use Doctrine\Common\Annotations\AnnotationRegistry;
44
use Composer\Autoload\ClassLoader;
55

6+
error_reporting(error_reporting() & ~E_USER_DEPRECATED);
7+
68
/**
79
* @var ClassLoader $loader
810
*/

app/console

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use Symfony\Bundle\FrameworkBundle\Console\Application;
5+
use Symfony\Component\Console\Input\ArgvInput;
6+
use Symfony\Component\Debug\Debug;
7+
48
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
59
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
610
//umask(0000);
711

812
set_time_limit(0);
913

10-
require_once __DIR__.'/bootstrap.php.cache';
14+
/**
15+
* @var Composer\Autoload\ClassLoader $loader
16+
*/
17+
$loader = require __DIR__.'/../app/autoload.php';
1118
require_once __DIR__.'/AppKernel.php';
1219

13-
use Symfony\Bundle\FrameworkBundle\Console\Application;
14-
use Symfony\Component\Console\Input\ArgvInput;
15-
use Symfony\Component\Debug\Debug;
16-
1720
$input = new ArgvInput();
1821
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
1922
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';

app/phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
66
backupGlobals="false"
77
colors="true"
8-
bootstrap="bootstrap.php.cache"
8+
bootstrap="autoload.php"
99
>
1010
<testsuites>
1111
<testsuite name="Project Test Suite">

web/app.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<?php
22

3-
use Symfony\Component\ClassLoader\ApcClassLoader;
43
use Symfony\Component\HttpFoundation\Request;
54

6-
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
5+
/**
6+
* @var Composer\Autoload\ClassLoader $loader
7+
*/
8+
$loader = require __DIR__.'/../app/autoload.php';
9+
include_once __DIR__.'/bootstrap.php.cache';
710

811
// Enable APC for autoloading to improve performance.
912
// You should change the ApcClassLoader first argument to a unique prefix
1013
// in order to prevent cache key conflicts with other applications
1114
// also using APC.
1215
/*
13-
$apcLoader = new ApcClassLoader(sha1(__FILE__), $loader);
16+
$apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader);
1417
$loader->unregister();
1518
$apcLoader->register(true);
1619
*/

web/app_dev.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
1919
}
2020

21-
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
21+
/**
22+
* @var Composer\Autoload\ClassLoader $loader
23+
*/
24+
$loader = require __DIR__.'/../app/autoload.php';
2225
Debug::enable();
2326

2427
require_once __DIR__.'/../app/AppKernel.php';

0 commit comments

Comments
 (0)