Commit 8d33dc7a authored by Igor Wiedler's avatar Igor Wiedler

Fix compiler, paths and namespaces got messed up when it was renamed

parent 62f26f1e
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require_once __DIR__.'/../vendor/autoload.php'; require_once __DIR__.'/../vendor/autoload.php';
use Silex\Compiler\Util; use Silex\Util\Compiler;
$compiler = new Compiler(); $compiler = new Compiler();
$compiler->compile(); $compiler->compile();
...@@ -48,32 +48,34 @@ class Compiler ...@@ -48,32 +48,34 @@ class Compiler
$phar->startBuffering(); $phar->startBuffering();
$root = __DIR__.'/../../..';
$finder = new Finder(); $finder = new Finder();
$finder->files() $finder->files()
->ignoreVCS(true) ->ignoreVCS(true)
->name('*.php') ->name('*.php')
->notName('Compiler.php') ->notName('Compiler.php')
->exclude('Tests') ->exclude('Tests')
->in(__DIR__.'/..') ->in($root.'/src')
->in(__DIR__.'/../../vendor/pimple/pimple/lib') ->in($root.'/vendor/pimple/pimple/lib')
->in(__DIR__.'/../../vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher') ->in($root.'/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher')
->in(__DIR__.'/../../vendor/symfony/http-foundation/Symfony/Component/HttpFoundation') ->in($root.'/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation')
->in(__DIR__.'/../../vendor/symfony/http-kernel/Symfony/Component/HttpKernel') ->in($root.'/vendor/symfony/http-kernel/Symfony/Component/HttpKernel')
->in(__DIR__.'/../../vendor/symfony/routing/Symfony/Component/Routing') ->in($root.'/vendor/symfony/routing/Symfony/Component/Routing')
->in(__DIR__.'/../../vendor/symfony/browser-kit/Symfony/Component/BrowserKit') ->in($root.'/vendor/symfony/browser-kit/Symfony/Component/BrowserKit')
->in(__DIR__.'/../../vendor/symfony/css-selector/Symfony/Component/CssSelector') ->in($root.'/vendor/symfony/css-selector/Symfony/Component/CssSelector')
->in(__DIR__.'/../../vendor/symfony/dom-crawler/Symfony/Component/DomCrawler') ->in($root.'/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler')
; ;
foreach ($finder as $file) { foreach ($finder as $file) {
$this->addFile($phar, $file); $this->addFile($phar, $file);
} }
$this->addFile($phar, new \SplFileInfo(__DIR__.'/../../LICENSE'), false); $this->addFile($phar, new \SplFileInfo($root.'/LICENSE'), false);
$this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/autoload.php')); $this->addFile($phar, new \SplFileInfo($root.'/vendor/autoload.php'));
$this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/composer/ClassLoader.php')); $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/ClassLoader.php'));
$this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/composer/autoload_namespaces.php')); $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_namespaces.php'));
$this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/composer/autoload_classmap.php')); $this->addFile($phar, new \SplFileInfo($root.'/vendor/composer/autoload_classmap.php'));
// Stubs // Stubs
$phar->setStub($this->getStub()); $phar->setStub($this->getStub());
......
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