Answer the question
In order to leave comments, you need to log in
Building symfony 4.1 into a phar package anyone have experience?
Building symfony 4.1 into phar package to work from console?
There are several console applications implemented on symfony, I want to build them as a phar package.
When assembling, I used box with this config
{
"chmod": "0755",
"directories": ["src"],
"finder": [
{
"name": "*.php",
"exclude": ["test", "tests"],
"in": "src/vendor"
}
],
"main": "src/bin/console",
"output": "hello.phar",
"stub": true
}
php hello.phar
PHP Fatal error: Uncaught Symfony\Component\Dotenv\Exception\PathException: Unable to read the "phar:///home/username/test/project/hello.phar/src/.env" environment file. in phar:///home/username/test/project/hello.phar/src/vendor/symfony/dotenv/Dotenv.php:54
Stack trace:
#0 phar:///home/username/test/project/hello .phar/src/config/bootstrap.php(25): Symfony\Component\Dotenv\Dotenv->load('phar:///home/us...')
#1 phar:///home/username/ test/project/hello.phar/src/bin/console(27): require('phar:///home/us...')
#2 /home/username/test/project/hello.phar(10) : require('phar:///home/us...')
#3 {main}
thrown in phar:///home/username/test/project/hello.phar/src/vendor/symfony/dotenv/Dotenv .php on line 54
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question