Open arhimede opened 10 months ago
Command options/arguments are not yet readable where we inject our FileLocker
mechanism, because Symfony parses them right before executing the command's execute
method. Due to this, we're left with the following methods:
Symfony\Component\Console\Command::command()
)$_SERVER['argv']
):
bin/cli.php
) reads arguments and passes them down the line until they reach FileLocker
FileLocker
reads the arguments itself from $_SERVER
One difference worth mentioning is that the second method is unable to identify arguments and options' short names.
Examples (consider a command having an argument called action
and an option called limit
):
l
): php bin/cli.php app:command foo --l=100
command-app-command-action-foo-limit-100.lock
command-app-command-foo-l-100.lock
limit
): php bin/cli.php app:command foo --limit=100
command-app-command-action-foo-limit-100.lock
command-app-command-foo-limit-100.lock
Note:
bin/cli.php
), so implementing the extended lock system in our projects would require updating dot-cli and the boostrap file.@MarioRadu @roli85 @cPintiuta give your opinion about that please
see if we need to extend the lock file with actions or aditional paramethers