Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Problem using __DIR__ in configuration #15

Open
fabiopaiva opened this issue Sep 3, 2015 · 2 comments
Open

Problem using __DIR__ in configuration #15

fabiopaiva opened this issue Sep 3, 2015 · 2 comments

Comments

@fabiopaiva
Copy link

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

@weierophinney
Copy link
Member

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.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-configuration; a new issue has been opened at laminas-api-tools/api-tools-configuration#6.

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

No branches or pull requests

2 participants