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

autoload-dev files are not autoloaded #7

Open
garethellis36 opened this issue Jan 12, 2018 · 3 comments
Open

autoload-dev files are not autoloaded #7

garethellis36 opened this issue Jan 12, 2018 · 3 comments

Comments

@garethellis36
Copy link

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
Copy link

jstowey commented Oct 15, 2018

+1

@stevethomas
Copy link

stevethomas commented Sep 23, 2022

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
Copy link

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

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

4 participants