• Fabien Potencier's avatar
    merged branch NoDiskInDriveA/master (PR #126) · 3d8ba843
    Fabien Potencier authored
    Commits
    -------
    
    9c95e2f6 only execute phar stub on direct invocation of phar archive
    
    Discussion
    ----------
    
    Make silex.phar usable in CLI applications
    
    Currently, requiring silex.phar in a CLI application that takes arguments is not possible, as the phar stub interferes with the execution of the application. I added a check to the stub which will execute the main stub code only if the phar file is directly invoked.
    We ran into this issue when trying to reuse the dependency setup from our Silex-based web application in the Doctrine2 ORM CLI console application, which obviously requires arguments. I know Silex is not supposed to run command line applications, but being able to reuse already configured dependencies in a CLI application should be made possible.
    
    ---------------------------------------------------------------------------
    
    by igorw at 2011/07/10 15:58:36 -0700
    
    +1
    3d8ba843
Name
Last commit
Last update
doc Loading commit data...
src/Silex Loading commit data...
tests Loading commit data...
vendor Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
autoload.php Loading commit data...
compile Loading commit data...
example.htaccess Loading commit data...
phpunit.xml.dist Loading commit data...