funkjedi / composer-include-files

Include files at a higher priority than autoload files.
MIT License
121 stars 21 forks source link

autoload-dev files are not autoloaded #7

Open garethellis36 opened 6 years ago

garethellis36 commented 6 years ago

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.

jstowey commented 6 years ago

+1

stevethomas commented 2 years ago

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.

hopeseekr commented 1 year ago

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/.