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

Problem using __DIR__ in configuration #6

Open
weierophinney opened this issue Dec 31, 2019 · 1 comment
Open

Problem using __DIR__ in configuration #6

weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Contributor

The problem is here
https://github.com/zfcampus/zf-configuration/blob/master/src/ConfigResource.php#L83

$localConfig = include $this->fileName;

The DIR magic constant is parsed into the complete path ("C:\Users...")

When the file is saved, the DIR is replaced with my local path

I believe this cause this error too: zfcampus/zf-deploy#45


Originally posted by @fabiopaiva at zfcampus/zf-configuration#15

@weierophinney
Copy link
Contributor Author

This is next to impossible to solve, unfortunately. Identifying which paths might be relative to which configuration, particularly when some paths may or may not lie within the project itself, is hard enough; compounding the issue is the fact that we cannot always know what values represent paths in the first place.

The only practical solution is to keep path information out of module configuration and global configuration, and set it specifically only in project local configuration.


Originally posted by @weierophinney at zfcampus/zf-configuration#15 (comment)

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

1 participant