-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Adds support for symfony/console:^6
#87
Conversation
Signed-off-by: Gary Lockett <[email protected]>
I've updated the version constraints to allow symfony v5 to still be used. The code has also been updated/reverted to reflect this. |
@froschdesign There is an abstract class |
More specifically for the above: On symfony's side:
/**
* Is this input means interactive?
*
* @return bool
*/
public function isInteractive();
/**
* Is this input means interactive?
*/
public function isInteractive(): bool; On laminas's side:
public function isInteractive(): ?bool
{
return $this->input->isInteractive();
}
public function isInteractive(): bool
{
/** @psalm-suppress RedundantCastGivenDocblockType */
return (bool) $this->input->isInteractive();
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to target the 2.0.x
branch (which we haven't opened yet).
This review is just a placeholder for that - code-wise, patch seems ok.
@internalsystemerror |
@Ocramius / @froschdesign / @internalsystemerror Probably does not need to target v2 as the change of the interface is on class marked as |
@michalbundyra |
Should I push + release? Any other reviews? :D |
symfony/console:^6
🚢 thanks @internalsystemerror! |
@michalbundyra Oh nice, I can't believe I missed that :D. Thanks all. |
Addresses #86.
Description
I'm requesting feedback regarding this implementation as it requires a BC break. In order to upgrade
symfony/console
to^6.0
there is a contract change at https://github.com/symfony/console/blob/675a4e6b05029a02ac43d3daf5aa73f039e876ea/Input/InputInterface.php#L131 whereInputInterface::isInteractive()
now contains a return type hint ofbool
. As a result I've had to add change the return type hint at https://github.com/internalsystemerror/laminas-cli/blob/725d5dbc791dd8c60865309fb35b5030a4a07a77/src/Input/AbstractParamAwareInput.php#L157.The more pressing change is that
Question
now only accepts a scalar value as the default value (whereas an array was allowed before). It is my "belief" (as I have not been able to confirm this specifically) thatQuestion
does allow multiple values on multiple lines, so$defaultValue = implode(PHP_EOL, $defaultValue)
where$defaultValue
is an array should resolve this. It is this solution that I have implemented and all tests pass as before, however I've not yet confirmed this by jumping through the code itself.Since this does require a BC break with the type hint change, I propose that this is merged into a
v2.0.0
of this package, along with any other BC breaks waiting (such as no longer usingcomposer/package-versions-deprecated
). Documentation for this change also requires adding.