Commit da9dfb63 authored by Fabien Potencier's avatar Fabien Potencier

updated compile.php

parent baf4fac5
...@@ -33,16 +33,19 @@ class Compiler ...@@ -33,16 +33,19 @@ class Compiler
$phar->startBuffering(); $phar->startBuffering();
$finder = new Finder(); $finder = new Finder();
$finder-> $finder->files()
files()-> ->ignoreVCS(true)
ignoreVCS(true)-> ->name('*.php')
name('*.php')-> ->in(__DIR__.'/..')
exclude('tests')-> ->in(__DIR__.'/../../vendor/Symfony/Component/ClassLoader')
exclude('Bundle')-> ->in(__DIR__.'/../../vendor/Symfony/Component/EventDispatcher')
in(__DIR__.'/../..'); ->in(__DIR__.'/../../vendor/Symfony/Component/HttpFoundation')
->in(__DIR__.'/../../vendor/Symfony/Component/HttpKernel')
->in(__DIR__.'/../../vendor/Symfony/Component/Routing')
;
foreach ($finder as $file) { foreach ($finder as $file) {
$path = str_replace(realpath(__DIR__.'/../..').'/', '', realpath($file)); $path = str_replace(realpath(__DIR__.'/../..').'/', '', $file->getRealPath());
$content = Kernel::stripComments(file_get_contents($file)); $content = Kernel::stripComments(file_get_contents($file));
$phar->addFromString($path, $content); $phar->addFromString($path, $content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment