Skip to content

ShortScalarCastFixer - Change binary cast to string cast as well #3780

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

Conversation

ntzm
Copy link
Contributor

@ntzm ntzm commented May 23, 2018

Not sure if this fixer is the best place for this

@keradus
Copy link
Member

keradus commented May 23, 2018

imo a feature, thus 2.12

@ntzm ntzm changed the base branch from 2.11 to master May 23, 2018 12:34
@julienfalque
Copy link
Member

The default behavior of the fixer is changing, shouldn't we add an option?

@ntzm
Copy link
Contributor Author

ntzm commented May 24, 2018

Agreed, will update shortly

@keradus
Copy link
Member

keradus commented May 24, 2018

👎 for option, but I agree it's always fuzzy
it's not that we now change possible behaviour, we simply fix more cases, imo it;s good without option
we simply fix more cases, "rule" remains the same, "fixer" that implements it implement it more completely.

@julienfalque , do you remember #3445 ? it was not just refactoring, it was refactoring to cover (detect & fix) more edge cases. but we didn't introduce any option shall newly detected cases be fixed or not, we just took it as good coin - we fix more.

@julienfalque
Copy link
Member

#3445 is not a good example IMO as it was a bugfix (it didn't aim to cover more cases, it aimed to fix cases that didn't work as they should have). I think a better example would be #3478. But yes, it's really fuzzy. 👍 for tweaking the default behavior directly.

@keradus
Copy link
Member

keradus commented May 24, 2018

in #3445 we had to adjust existing unittests to follow new impelemntation, thus it was "behaviuor change", but ultimately not "rule change"

#3478 is good example as well ;)

@keradus keradus added this to the 2.12.0 milestone May 24, 2018
@ntzm
Copy link
Contributor Author

ntzm commented May 24, 2018

So keep this PR as-is?

@keradus keradus added the RTM Ready To Merge label May 24, 2018
@julienfalque
Copy link
Member

Yes, sorry if you started working on something :/

Travis is failing on 7.2 but I'm not sure this is related to changes from this PR.

@ntzm
Copy link
Contributor Author

ntzm commented May 24, 2018

Nope I didn't no worries! Thanks

@SpacePossum
Copy link
Contributor

SpacePossum commented May 25, 2018

The test failed because of a time out.
Ignore my the rest of my old comment, failed to read the test script...

@keradus keradus removed the RTM Ready To Merge label May 27, 2018
@keradus keradus changed the title Change binary cast to string cast in short_scalar_cast ShortScalarCastFixer - Change binary cast to string cast as well May 27, 2018
@keradus keradus force-pushed the short-scalar-cast-binary-to-string branch from 855084f to 5ac307d Compare May 27, 2018 21:55
@keradus
Copy link
Member

keradus commented May 27, 2018

Thank you @ntzm.

@keradus keradus merged commit 5ac307d into PHP-CS-Fixer:master May 27, 2018
keradus added a commit that referenced this pull request May 27, 2018
…t as well (ntzm)

This PR was squashed before being merged into the 2.12-dev branch (closes #3780).

Discussion
----------

ShortScalarCastFixer - Change binary cast to string cast as well

Not sure if this fixer is the best place for this

Commits
-------

5ac307d ShortScalarCastFixer - Change binary cast to string cast as well
@ntzm ntzm deleted the short-scalar-cast-binary-to-string branch May 28, 2018 08:32
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.

None yet

4 participants