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

Use realpath() to resolve unresolved path from composer #295

Merged
merged 2 commits into from
Dec 13, 2016

Conversation

RLasinski
Copy link
Contributor

Since PR #5174 (composer/composer#5174) the paths from composer can have dots in the paths. This isn't handled by AopComposerLoader.
CachePathManager tries to replace a resolved appPath with an unresolved resourcePath.
e.g. /app/ .... /vendor/composer/../../app

My solution isn't optimal, because realpath() is called for every included file.

@jcchavezs
Copy link

+1

@@ -155,6 +155,7 @@ public function findFile($class)
$file = $this->original->findFile($class);

if ($file) {
$file = realpath($file)?:$file;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please replace realpath() with PathResolver::realpath()?

@lisachenko lisachenko merged commit eec2c71 into goaop:master Dec 13, 2016
@lisachenko
Copy link
Member

Merged, thanks!

@lisachenko lisachenko added this to the 1.2.0 milestone Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants