-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
An argument with name "class" already exists. #36557
Comments
I'm pretty sure that this is caused by #36513 but I don't see how that's breaking. Are you modifying the command in any way? We'll need a lot more info here. How are you calling your seeder classes? Are there internal artisan calls in your code/tests? /cc @jasonmccreary |
@driesvints I didn't change anything. The only thing that might have to do with it is tenancy/multi-tenant. But this package was not updated at the same time |
@code2prog ah I wasn't asking if you changed anything. I'm asking how you're calling the db:seed command. |
tenancy/multi-tenant#988 |
@driesvints, if you're worried about conflicts with community packages, we could try to rename it to |
Not entirely worried, was just wondering how your change broke certain use cases. |
In general that wasn't part of the public API. If people are overwriting it in that way then we can't protect against that. |
That is not true at all, rather this new change overwritten something and broke a package |
@jonquintero we can't control the ways in how someone overwrites this. If you're overwriting a command and adding arguments of your own then you should be aware that an upstream change can break it. This is different from, for example, method signatures which are part of the public API of a codebase. |
@driesvints I understand your point and it is totally valid, but my point is that this new change #36513 overwritten something that the mentioned package had been using for a long time and broke it, reverting to a previous version fixes the problem (8.31.0). What's great about all this? That forces developers to update their packages and not forget about them |
@jonquintero you can't expect us to keep in mind every single way someone overwrites something in the framework. If we had to do that we had to do new major releases each week just to make sure that no small change breaks something in a third party app. |
@driesvints I know and you are right, that what I said: What's great about all this? That forces developers to update their packages and not forget about them |
ah sorry, I misunderstood you there 👍 |
Tbh, I really hope Laravel is not gonna think too much about community packages and all the stuff they do; would be a mess and they would not be able to add anything anymore to the ecosystem. The PR they did was perfect, it's simply up to us to fix the package, thanks for finding this problem and taking the time to investigate and discuss this topic 🙏 |
For the sake of reference, I'm adding here another constellation that breaks.
I'm having the same error, without having
|
Description:
After upgrade laravel/framework from v. 8.31.0 to 8.32.1 throw error in console
An argument with name "class" already exists.
after dump-autoload. Reverting to a previous version fixes the problemSteps To Reproduce:
composer upgrade laravel/framework
The text was updated successfully, but these errors were encountered: