Skip to content

[Console] allow answer to be trimmed by adding a flag #32731

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

Closed
wants to merge 1 commit into from
Closed

[Console] allow answer to be trimmed by adding a flag #32731

wants to merge 1 commit into from

Conversation

phil-davis
Copy link
Contributor

Q A
Branch? 3.4
Bug fix? yes - I can't get at the real answer string with leading/trailing spaces ;)
New feature? no - but maybe ;)
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets none
License MIT
Doc PR symfony/symfony-docs#... will be needed for 3.4 if it goes ahead, similar to docs for 4.4

According to #23210 (comment) we add a new flag in the Question class to be able to not trim the answer.

This is a "backport" request for #31626 - the code is completely backward-compatible, any existing use gets the answer trimmed. So this setTrimmable(false) ability would only come into effect if someone modifies their code to use it. All existing code using Symfony 3.4 will work without change.

I am proposing that this can be called a bug, because without this change the caller does not and cannot get the complete answer. The change here fixes the bug in a backward-compatible way, by preserving the existing trim behaviour by default, and providing the option for the caller to disable the trim behaviour.

(I have got the CI passing in PHP5.* now - so I am resubmitting to at least "document" what code works against 3.4, and maybe get it accepted! Or most likely someone will just close this because it is considered a feature and not allowed for 3.4)

@chalasr
Copy link
Member

chalasr commented Jul 27, 2019

As explained in your previous PR, this expands the public API and involves code changes for being used. Per semver:

Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API.

Closing as this does not qualify as a bugfix, thanks for your understanding.
Hope to see you in another PR.

@chalasr chalasr closed this Jul 27, 2019
@phil-davis
Copy link
Contributor Author

That's fine, I understand.
"Unfortunately" there will be no 3.5 release to put this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants