zfcampus / zf-development-mode

ZF2 development mode module
BSD 3-Clause "New" or "Revised" License
44 stars 25 forks source link

composer development-status not able to find /vendor/autoload.php file #36

Open adamculp opened 5 years ago

adamculp commented 5 years ago

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.

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-development-mode; a new issue has been opened at https://github.com/laminas/laminas-development-mode/issues/2.