-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Problem with manual running of Artisan tasks #1165
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
Conversation
When running an Artisan task from within your application using `Command::run`, it fails when the same task is ran more than once. Every time the task is resolved, its file is included using `require` leading to duplicate class definitions. By using `require_once` this problem is avoided.
Nice catch. 👍 |
Travis is reporting that this is failing, any ideas why? Apart from that I think this is a good catch, I've not run tasks like this before. |
I have no idea why this would fail. I don't yet have the tests installed so I can't run the tests myself, however I suspect it was a one-time glitch while running the tests. I don't know if an exit status of 1 indicates a test failure, or another failure? I use this method because I have some code which uses exec("php $artisan $task &> /dev/null &"); However, if |
Looks like they had some internal problems there. Usually, you'd expect to see some output from PHPUnit when tests are failing... |
Yes, that's what I'm thinking. Note however that this is a change that affects running tasks themselves, so if this has broken the running of tasks, the test task can't be run either ;) |
Just updated from 3.2.3 to 3.2.7 and ran the unit tests, all fine here.
|
It makes sense to me, let's see if this kills the tests ;) |
Problem with manual running of Artisan tasks
Added ability to pass Closure to union statement in query builder
When running an Artisan task from within your application using
Command::run
, it fails when the same task is ran more than once. Every time the task is resolved, its file is included usingrequire
leading to duplicate class definitions. By usingrequire_once
this problem is avoided.