Currently, the FunFunFactory tries to make most paths from the configuration, specified as relative to the deploment directory, absolute by default with the function getAbsolutePath which adds the deployment directory. This makes it hard to change path configurations in integration tests, as exemplified by the test suites MailerTemplatingFactoryTest and WebTemplatingFactoryTest, which need a public setter method for the paths on the FunFunFactory and need to call the setters before the Factory creates any other class.
A better solution for specifying project-relative directories in the configuration would be to allow placeholders in the the configuration values, that'd get replaced with the project path. To allow for easier migration from the FunFunFactory to Symfony dependency injection, we should call the placeholder %kernel.project_dir%, mimicking Symfony Configuration placeholders.
The placeholders replacement function should also allow for other placeholders, see T232762: Split sensitive information from plain configuration values for more applications and examples of placeholders.
- All directory-related configurations access uses placeholder replacement instead of getAbsolutePath
- Configuration files for (also in the infrastructure repository) contain placeholders. Most files only need the default values from config.dist.json
- Start with the getAbsolutePath method, replacing each call with a call to the new placeholder-replacement function and adding the correspoding placeholder to config.dist.json.