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 development-status not able to find /vendor/autoload.php file #2

Closed
2 tasks done
weierophinney opened this issue Dec 31, 2019 · 1 comment
Closed
2 tasks done

Comments

@weierophinney
Copy link
Member

  • I was not able to find an open or closed issue matching what I'm seeing.
  • This is not a question. (Questions should be asked on chat (Signup here) or our forums.)

After a fresh install of Zend Expressive using $ composer create-project zendframework/zend-expressive-skeleton expressive from within the root directory of the application, try to execute any of the development-* scripts using Composer.

Command to duplicate issue

$ cd /path/to/expressive/root
$ composer development-status

Expected results

I would expect to receive "Development mode is ENABLED"

Actual results

Instead, the script is not able to find the autoload.php. This is because the script has 2 possible locations to search for /vendor/autoload.php by using __DIR__ + added locations. However, when calling composer from the application root the result of __DIR__ is /vendor/bin. Therefore the following locations will not find /vendor/autoload.php.

__DIR__ . '/../../../autoload.php';
__DIR__ . '/../vendor/autoload.php';

What is needed is __DIR__ . '/../autoload.php'.

NOTE: My experience was on Ubuntu 18.04 using /usr/bin/composer to use php via cli.


Originally posted by @adamculp at zfcampus/zf-development-mode#36

@samsonasik
Copy link
Member

fixed by #7

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