Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change directory where GeneratedExtensionsConfig.php is generated #4

Open
steevanb opened this issue Oct 5, 2021 · 1 comment
Open

Comments

@steevanb
Copy link

steevanb commented Oct 5, 2021

Hi,

GeneratedExtensionsConfig.php is generated in vendor/infection/extension-installer/src/GeneratedExtensionsConfig.php.

But of some projects we don't have the permission to write in this directory.
For example I install infection as composer global in a Docker image with root user then when i use this image with anoher user (same as host user, generally 1000:1000) he don't have permission to write in this directory.

Can I change this directory?
If not, can you provide a configuration to do that, or maybe use config.cache-dir configuration in composer.json?

@maks-rafalko
Copy link
Member

Hi, can you then use PHAR distribution of Infection instead of a global composer package?

In PHAR, all extensions are preinstalled, so you won't have such issue.

Can I change this directory?

it's not supported right now

If not, can you provide a configuration to do that, or maybe use config.cache-dir configuration in composer.json?

From the first look, I don't see how to do it, because now generated class is Infection\ExtensionInstaller\GeneratedExtensionsConfig and it works out of the box by utilizing PSR-4 autoloader. If we would move it outside of composer's vendor directory, PSR-4 wont' work anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants