-
-
Notifications
You must be signed in to change notification settings - Fork 616
Add Rector #1640
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
Add Rector #1640
Conversation
| // Class names are intentionally fully qualified here to maximise clarity - particularly because a future | ||
| // PHPUnit version may reuse a class name in a different namespace. | ||
|
|
||
| if (class_exists(\PHPUnit\Util\ThrowableToStringMapper::class)) { | ||
| if (class_exists(ThrowableToStringMapper::class)) { |
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.
It's probably OK to lose the fully-qualified names here - particularly now we know that people won't be able to use just the assertions from future PHPUnit versions anyway?
If so we should just remove the comment above.
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.
I had not realised about the comment, agree with you, removed
130b27e to
36a68cb
Compare
36a68cb to
d9723a1
Compare
d9723a1 to
e19341c
Compare
|
@acoulton do you think this is now OK? I would like to merge it so that we can continue adding more Rector rules |
acoulton
left a comment
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.
Great, thanks @carlos-granados
e19341c to
49f8d3c
Compare
Now that we have a full coding standard configuration we are ready to add the Rector tool and start using it.
We need to be careful when using it as some of the changes introduced by Rector can create BC issues so we need to evaluate all of its rules and only apply those which are safe.
This PR introduces the initial setup to use this tool and adds a couple of things:
I have separated this in two commits (tool setup and code changes) so that the code changes can be added to the blame ignore file once this PR is approved
Closes #1506