-
Notifications
You must be signed in to change notification settings - Fork 51
Use new PHPCS array syntax #84
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
Conversation
cc @kukulich, is this ok and properly compatible with the SettingsHelper (thus Slevomat CS sniffs)? |
<property name="traversableTypeHints" type="array"> | ||
<element value="Doctrine\Common\Collections\Collection"/> | ||
</property> | ||
<property name="usefulAnnotations" type="array"> |
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.
@carusogabriel Btw you can use allAnnotationsAreUseful
now, see https://github.com/slevomat/coding-standard#slevomatcodingstandardtypehintstypehintdeclaration-
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.
That's probably for a separate discussion. But given that we already use forbiddenAnnotations
, we may consider this change and just expand the forbidden list for any of those that get removed by this rule.
Yes, it should be compatible. |
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.
This is a move in good direction, but PHPCS guys forgot to update their XML schema. So this PR now results in invalid XML according to vendor/squizlabs/php_codesniffer/phpcs.xsd
. :(
Reported here: squizlabs/PHP_CodeSniffer#2151
xmllint report:
|
Rebase required |
54da06d
to
187c68f
Compare
187c68f
to
4a42601
Compare
Waiting for PHPCS 3.3.2 with a fix: squizlabs/PHP_CodeSniffer@cc5c930 |
I'd wait for the new PHPCS release, as we've already marked this one in the 6.0v. |
Well, you did, I already mentioned this issue and getting it into 5.0.0 earlier this week. :) |
is the "rush" worth the benefit? what do we get by releasing something "half-valid" before |
Let's see what happens sooner: us releasing 5.0.0 or PHPCS releasing 3.3.2 (may happen this week). :) |
3.3.2 was just released, can you please rebase + require 3.3.2? Will merge then, thanks. |
4a42601
to
b9ea283
Compare
b9ea283
to
fd10597
Compare
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.
🚢
As described in the upgrade guide of PHPCS v3.3.0, there's a new array syntax in favor of the old one that was deprecated and will be removed in v4. Here's an example: