Comments (3)
Reproducible and should concern all versions.
But it's quite easy to explain. command
is (currently) reserved for the internal command name.
In my opinion, the solution should be as @cavias has described.
In the simplest case, command
is treated as a reserved name and an exception is thrown when an argument is added with it.
Of course, it would be nicer if you could also use command
as the argument name.
Renaming the internal command name would be a breaking change and would not completely rule out further collisions.
A separation of argument and command name handling should be possible to a limited extent by taking the position into account during tokenizing (command name is always in the first position).
This would work in ArgvInput, but not for ArrayInput (used, for example, to call other commands).
There, the name of the command/argument/option is used as the key, example['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar'].
from symfony.
I would consider command
a "reserved" argument name.
If we can do something to make it more explicit and ease understanding it, without breaking existing code (even if that code works by chance/luck), let's do it.
But to be honest, such edge cases exist for sure and we definitely don't want to break them, nor ask them to find another way to solve their need especially as it is likely to be more involving than just renaming command
to something else in their application (thinking to OSS or proprietary tools using/extending/hacking the console, there's a lot).
That said, if you don't have a real use case I suggest not putting much effort into this and eventually close.
from symfony.
I would consider
command
a "reserved" argument name. If we can do something to make it more explicit and ease understanding it, without breaking existing code (even if that code works by chance/luck), let's do it.But to be honest, such edge cases exist for sure and we definitely don't want to break them, nor ask them to find another way to solve their need especially as it is likely to be more involving than just renaming
command
to something else in their application (thinking to OSS or proprietary tools using/extending/hacking the console, there's a lot).That said, if you don't have a real use case I suggest not putting much effort into this and eventually close.
I ran into this because I wanted to have an argument named "command" because of some custom usecase. But I just changed the argument into some other name as the name of the argument is arbitrary.
The main issue I had is that I spend an hour figuring out why my other arguments were failing to register for no obvious reason, only to find this bug.
And I imagine someone else will run into this as well in the future, which is why I recommend this is resolved somehow.
from symfony.
Related Issues (20)
- [RFC] include a new dev dependency `twig-cs-fixer` in the codebase HOT 6
- [DoctrineBridge] Possible cirtucal references of lazy-service (listener) HOT 3
- [Messenger][Doctrine] cleanup only the configured queue_name
- BicValidator/IbanValidator value normalization HOT 1
- [DependencyInjection] Can not replace arguments if none have been configured yet - InlineAutowire HOT 3
- [Routing] Output IDN domains instead of punycode for `UrlGeneratorInterface::ABSOLUTE_URL`
- [Ldap] UpdateOperation toArray() function throws exception when using LDAP_MODIFY_BATCH_REMOVE_ALL operation type HOT 4
- [Messenger][AMQP] Allow to opt out to autosetup delay exchange in configuration HOT 1
- [Validator] Class "Locale" not found HOT 1
- The configuration of packages in the application is ignored after they are applied inside `prependExtension` the bundle HOT 4
- [symfony/yaml] Yaml::dump cannot properly parse array of arrays / nested arrays HOT 1
- Add a flag to sort debug:router output by alphabetical order, according to a column name
- SQS Messenger Component with special chars in the DSN HOT 4
- [Config] ParamConfigurator is not longer respected as scalar-string-value HOT 3
- Session variables are not persisted correctly
- [scheduler] support stateful option when defining recurring messages via #[AsPeriodicTask] / #[AsCronTask] attributes HOT 2
- [Serializer] Performance degradation HOT 3
- [HttpFoundation] Fatal Error Parsing Empty Accept Header
- #[MapUploadedFile] Missing or Invalid 'name' Parameter Causes Type Error HOT 6
- [Security Bundle] Unable to log in via API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symfony.