|
1 #!/usr/bin/env php |
|
2 <?php |
|
3 |
|
4 /* |
|
5 * This file is part of the Symfony Standard Edition. |
|
6 * |
|
7 * (c) Fabien Potencier <fabien@symfony.com> |
|
8 * |
|
9 * For the full copyright and license information, please view the LICENSE |
|
10 * file that was distributed with this source code. |
|
11 */ |
|
12 |
|
13 if (!$baseDir = realpath(__DIR__.'/../../../../../../..')) { |
|
14 exit('Looks like you don\'t have a standard layout.'); |
|
15 } |
|
16 |
|
17 require_once $baseDir.'/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php'; |
|
18 |
|
19 /* |
|
20 * This file is part of the Symfony package. |
|
21 * |
|
22 * (c) Fabien Potencier <fabien@symfony.com> |
|
23 * |
|
24 * For the full copyright and license information, please view the LICENSE |
|
25 * file that was distributed with this source code. |
|
26 */ |
|
27 |
|
28 use Symfony\Component\ClassLoader\UniversalClassLoader; |
|
29 use Symfony\Component\ClassLoader\ClassCollectionLoader; |
|
30 |
|
31 $loader = new UniversalClassLoader(); |
|
32 $loader->registerNamespaces(array('Symfony' => $baseDir.'/vendor/symfony/src')); |
|
33 $loader->register(); |
|
34 |
|
35 $file = $baseDir.'/app/bootstrap.php.cache'; |
|
36 if (file_exists($file)) { |
|
37 unlink($file); |
|
38 } |
|
39 |
|
40 ClassCollectionLoader::load(array( |
|
41 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface', |
|
42 // Cannot be included because annotations will parse the big compiled class file |
|
43 //'Symfony\\Component\\DependencyInjection\\ContainerAware', |
|
44 'Symfony\\Component\\DependencyInjection\\ContainerInterface', |
|
45 'Symfony\\Component\\DependencyInjection\\Container', |
|
46 'Symfony\\Component\\HttpKernel\\HttpKernelInterface', |
|
47 'Symfony\\Component\\HttpKernel\\KernelInterface', |
|
48 'Symfony\\Component\\HttpKernel\\Kernel', |
|
49 'Symfony\\Component\\ClassLoader\\ClassCollectionLoader', |
|
50 'Symfony\\Component\\ClassLoader\\UniversalClassLoader', |
|
51 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle', |
|
52 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface', |
|
53 'Symfony\\Component\\Config\\ConfigCache', |
|
54 // cannot be included as commands are discovered based on the path to this class via Reflection |
|
55 //'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle', |
|
56 ), dirname($file), basename($file, '.php.cache'), false, false, '.php.cache'); |
|
57 |
|
58 file_put_contents($file, "<?php\n\nnamespace { require_once __DIR__.'/autoload.php'; }\n\n".substr(file_get_contents($file), 5)); |