Closed timbroder closed 7 years ago
It looks like an issue of your application code.
@Naktibalda is there a way I can tell codeception to ignore that file?
If I remove it, it runs fine
The question is why in hell this file is being loaded. I promise you, Codeception doesn't scan your directories for all possible PHP files to load them. Maybe it is loaded by Composer?
Could you run the Codeception directly:
./vendor/bin/codecept run
That didn't fix it but I was able to track it down
What happened:
My Laravel migrator was set up with run_database_migrations: true
but I had not specified database_migrations_path
and it looks like this defaults to the root of the project, where laravel was scooping up *.php file to see if it contained a migration
I think that the default of database_migrations_path
should be database/migrations where Laravel defaults it to
What do you think? I can open a PR with that
Wow, yes. Looks like a bug! Executing all PHP files is total nonsense. Thanks for tracking, yes, send a PR
The reason I left the default value for the database_migrations_path
config variable as an empty string is that this will result in the default Laravel migration path due to this code.
However, it seems this code was only added for the 5.3 release of Laravel with this commit.
From the details you specified with your issue I can see you are using Laravel 5.2, and in Laravel 5.2 and before this check is used to determine the path.
So I think the easiest fix for this problem is to set the default value for the database_migrations_path
config variable to null
instead of an empty string. Can you try this out and let me know if this solution fixes your problem?
@janhenkgerritsen sorry I saw the other thread before this one. Yes, changing the default to null fixes it.
I'll update the PR
@janhenkgerritsen PR #3991 updated with your suggestion
I just merged your PR. Thanks for taking the time to investigate this issue and submitting a PR.
What are you trying to achieve?
Run my first unit test
What do you get instead?
At the top of my _ide_helper.php file, there is an exit that doesn't seem to process with codeception. This file should be ignored
Details
composer show
)codeception.yml
unit.suite.yml