composer-include-files icon indicating copy to clipboard operation
composer-include-files copied to clipboard

autoload-dev files are not autoloaded

Open garethellis36 opened this issue 7 years ago • 3 comments

I installed this plugin to address the exact issue you suggest in the README (overloading Laravel helper functions), and found that files outlined in the autoload-dev section of composer.json are not loaded.

garethellis36 avatar Jan 12 '18 15:01 garethellis36

+1

jstowey avatar Oct 15 '18 09:10 jstowey

I'm seeing the same thing;

    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
        "files": [
            "tests/macros.php"
        ]
    },

The tests/macros.php file was working perfectly until I installed the package (actually the forked version https://github.com/hopeseekr-contribs/composer-include-files).

If I had to guess i'd say it might be here: https://github.com/funkjedi/composer-include-files/blob/master/src/Composer/AutoloadGenerator.php#L87, because $paths does not seem to contain the main package files at this point.

Looking at composer, maybe https://github.com/composer/composer/blob/1.10/src/Composer/Autoload/AutoloadGenerator.php#L883 this is related 🤷‍♂️?

Without knowing anything about composer plugin development I have hit a brick wall.

stevethomas avatar Sep 23 '22 00:09 stevethomas

This project is very obviously abandoned. There are 254,597 installs of my fork of this project, 0.0.0/composer-include-files, which should be considered canon now.

https://github.com/hopeseekr-contribs/composer-include-files

As for the laravel env, check out my other project: phpexperts/laravel-env-polyfill @ https://github.com/PHPExpertsInc/Laravel57-env-polyfill/.

hopeseekr avatar Sep 17 '23 13:09 hopeseekr