theofidry / AliceDataFixtures

Nelmio Alice extension to persist the loaded fixtures.
MIT License
311 stars 71 forks source link

use a class for read values from env #216

Closed alexislefebvre closed 2 years ago

alexislefebvre commented 2 years ago

The doc of composer doesn't mention the support of files: https://getcomposer.org/doc/04-schema.md#autoload-dev

It works by using a class.

theofidry commented 2 years ago

It may be missing from the doc but it is there:

"files": {
                    "type": "array",
                    "description": "This is an array of files that are always required on every request."
                }

See the composer-schema.json file. You can also see the result in the dumped autoloading files (vendor/composer/autoload_files.php for this one)

It does require the autoloader to be dumped for it to be taken into account though.

alexislefebvre commented 2 years ago

I still have the issue after running composer dump-autoload on my local environment. And the CI is red with the same error.

Maybe the issue is that the path is not correct when reading composer.json from a subdirectory.

alexislefebvre commented 2 years ago

It occurred in https://github.com/theofidry/AliceDataFixtures/runs/7156925224?check_suite_focus=true

But you fixed it in the commit after, now the error is about Monolog: https://github.com/theofidry/AliceDataFixtures/runs/7157015613?check_suite_focus=true