Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Revert StringInput bc break from #45088 #45240

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

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

bobthecow
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix bobthecow/psysh#703
License MIT
Doc PR -

Fix a backwards compatibility break introduced in #45088 and released in v4.4.37, v5.3.14, v5.4.3 and v6.0.3.

I went with REGEX_UNQUOTED_STRING by analog to the REGEX_QUOTED_STRING constant name, but don't have a strong opinion on what it should be called :)

@nicolas-grekas
Copy link
Member

Are you using the constant and the changed value breaks your stuff? What about making the new constant private instead?

@bobthecow
Copy link
Contributor Author

PsySH extends StringInput for its ShellInput (which basically adds the ability to have a "code" chunk that gets treated literally). It had to implement its own tokenize method and was referencing these two constants, since it had so much in common.

If you don't want this to be part of the public API, it'd make sense to make the new one private. I don't think anyone else was silly enough to use it, but there are a lot of PsySH versions going back years that depend on the previous public constants so let's at least keep them working :)

@nicolas-grekas
Copy link
Member

Thanks for the PR and the details. I'm fine as is :)

Copy link
Contributor

@fancyweb fancyweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the constant really deprecated though? Just adding a comment won't be enough I guess.

@bobthecow
Copy link
Contributor Author

Even if it were possible (I'm not sure it is) any more aggressive deprecation than a comment would violate semver.

@fancyweb
Copy link
Contributor

I mean in 6.1. Either we don't deprecate it at all and we remove that comment or we need a strategy on 6.1 to effectively be able to remove the constant in 7.0. I just don't remember if just adding a @deprecated comment is enough for a constant.

@bobthecow
Copy link
Contributor Author

I'm not sure what you normally do, but I found several other comment-only deprecation notes that I modeled this after.

@bobthecow bobthecow force-pushed the console-stringinput branch from ad6c725 to aab2f2a Compare January 30, 2022 21:24
@fancyweb
Copy link
Contributor

Thank you @bobthecow.

@fancyweb fancyweb merged commit 1276d32 into symfony:4.4 Jan 31, 2022
@bobthecow
Copy link
Contributor Author

Thank you!

@bobthecow bobthecow deleted the console-stringinput branch February 28, 2022 16:38
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.

4 participants