Feature Request
needs #890, #891, php-runtime/runtime#135
Assuming we can now pass env vars in box.json (#890), can find the project root in the PHAR at compile time (#891) and there exists the PHAR runtime for Symfony Runtime (#135), the workflow is like this:
- user defines the desired runtime in
box.json:
{
"env": {
"APP_RUNTIME": "Runtime\\PHAR\\Runtime"
}
}
- Box copies the runtime and kernel classes and the runtime template from the runtime into the PHAR
- Box updates
composer.json to use the runtime template as so: composer validate (check current lock file is correct), set extra.runtime.autoload_template, composer update --lock (to update the lock file hash) - the template will now be used
- Box figures out the project root and passes it to the runtime
- The runtime decorates the kernel with the runtime one, passing it the project root
This should allow the Symfony app to work within the PHAR without any changes required by the user. In the future even setting the runtime could be made not required.
Feature Request
needs #890, #891, php-runtime/runtime#135
Assuming we can now pass env vars in
box.json(#890), can find the project root in the PHAR at compile time (#891) and there exists the PHAR runtime for Symfony Runtime (#135), the workflow is like this:box.json:{ "env": { "APP_RUNTIME": "Runtime\\PHAR\\Runtime" } }composer.jsonto use the runtime template as so:composer validate(check current lock file is correct), setextra.runtime.autoload_template,composer update --lock(to update the lock file hash) - the template will now be usedThis should allow the Symfony app to work within the PHAR without any changes required by the user. In the future even setting the runtime could be made not required.