Hello,
I'm in the process of integrating phpDocumentor into Nix. While a detailed explanation of how Nix functions isn't necessary for this discussion, don't hesitate to ask any questions in the thread if this is not the case, I'll be glad to answer them.
When phpDocumentor is installed using Nix, the files are placed into an immutable (read-only) store. This results in all files and directories of the application being read-only.
As phpDocumentor is a Symfony-based application, it necessitates the creation of a var/ directory to store cache when running.
Users can modify the cache directory by altering the APP_CACHE_DIR environment variable, and the log directory by changing the APP_LOG_DIR variable.
I've attempted to run phpDocumentor while adjusting the location of these variables. However, it persistently defaults to using var/.
This make sense since it is hardcoded in kernel.php.
In the default Symfony kernel, those environment variables are not ignored.
I guess adding a very simple condition should fix the issue.
Expected behavior
The application should use APP_CACHE_DIR and APP_CACHE_LOG.
Actual behavior
The application keeps writing in its own var/ directory and ignore APP_CACHE_DIR and APP_CACHE_LOG.
Steps to reproduce the problem
You can test by yourself by doing:
APP_CACHE_DIR=/tmp/foo/cache APP_LOG_DIR=/tmp/foo/log ./bin/phpdoc
Your environment
Linux
- Version used: 3.3.1
- Install method: git clone
- PHP version: 8.1
- Operating system and version (e.g. Ubuntu 20.04, Windows 10): NixOS 23.05
Hello,
I'm in the process of integrating
phpDocumentorinto Nix. While a detailed explanation of how Nix functions isn't necessary for this discussion, don't hesitate to ask any questions in the thread if this is not the case, I'll be glad to answer them.When
phpDocumentoris installed using Nix, the files are placed into an immutable (read-only) store. This results in all files and directories of the application being read-only.As
phpDocumentoris a Symfony-based application, it necessitates the creation of avar/directory to store cache when running.Users can modify the cache directory by altering the
APP_CACHE_DIRenvironment variable, and the log directory by changing theAPP_LOG_DIRvariable.I've attempted to run
phpDocumentorwhile adjusting the location of these variables. However, it persistently defaults to usingvar/.This make sense since it is hardcoded in
kernel.php.In the default Symfony kernel, those environment variables are not ignored.
I guess adding a very simple condition should fix the issue.
Expected behavior
The application should use
APP_CACHE_DIRandAPP_CACHE_LOG.Actual behavior
The application keeps writing in its own
var/directory and ignoreAPP_CACHE_DIRandAPP_CACHE_LOG.Steps to reproduce the problem
You can test by yourself by doing:
Your environment
Linux