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

Composer installs crunz executable to vendor/bin instead of symlink #207

Closed
MarkLittlewood opened this issue Mar 13, 2019 · 7 comments
Closed
Labels
Milestone

Comments

@MarkLittlewood
Copy link
Contributor

Crunz version: 1.11

PHP version: 7.1.17

Ubunto:

Description
Crunz executable was installed by composer directly into vendor/bin instead of a symlink.
The $autoloadPaths then tried to go up 2 levels to find autoload.php but failed because executable was only 1 level down.

How to reproduce
Not sure, local install of crunz created a symlink, install on server created executable

Possible Solution
either add another option to $autoloadPaths that only looks one level of or find autoload.php in a way not dependant on how far down the tree it is?

Additional context

@MarkLittlewood
Copy link
Contributor Author

Further investigation, it is not composer that is causing the issue. The application is packaged up and it is that process which is converting the symlinks. The net result though is that the crunz executable is in vendor/bin rather than the symlink and so is failing to find autoload.php

@PabloKowalczyk
Copy link
Collaborator

Hello, what you mean by "application is packaged up"?

crunz executable is in vendor/bin

Looks like another autoloader possible path __DIR__ . '/../auotload.php' should do the trick?

BTW I'm wondering why Composer choose to create hard copy instead of symlink, maybe your filesystem on server doesn't support symlinks?

@PabloKowalczyk PabloKowalczyk added this to the v1.11 milestone Mar 14, 2019
@MarkLittlewood
Copy link
Contributor Author

Hi we use are using zs-client, a feature of zend server for deployments which "packages up" the application and deploys it.

I think that the additional autoloader possible path should solve the issue.,

Thanks

@PabloKowalczyk
Copy link
Collaborator

Hi we use are using zs-client, a feature of zend server for deployments which "packages up" the application and deploys it.

Everything is clear now.

I think that the additional autoloader possible path should solve the issue.,

Would you like to provide a PR for 1.11.x branch?

@MarkLittlewood
Copy link
Contributor Author

Pr created. Thankyou

@PabloKowalczyk
Copy link
Collaborator

Let's wait with "close" to PR merge.

@PabloKowalczyk
Copy link
Collaborator

Fixed in #209 (and in #210) and released in v1.11.2, thanks @MarkLittlewood.

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

No branches or pull requests

2 participants