Skip to content

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Jul 20, 2015

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

TODO:

  • Add PHP CodeSniffer rule
  • Add tests

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
@deeky666
Copy link
Member

@doctrine/team-doctrine2 I guess with this PR it's about time to decide whether we enforce a leading space or leave it for PSR-2 compat.

@phansys
Copy link
Contributor Author

phansys commented Jun 26, 2016

@deeky666, @Ocramius; is this library used anywhere? Almost one year ago I've opened doctrine/orm#1470, getting this feedback:

Can't add it to the build atm: would need to first fix most issues

Now, checking the status of these PRs again, I found that the unit tests don't work due an issue with PHP_CodeSniffer:

PHP Fatal error: 'continue' not in the 'loop' or 'switch' context.

Here we have a constraint for the 1.x branch (my resolved version is 1.5.2), which seems to be not maintained anymore: squizlabs/PHP_CodeSniffer#1046. I looked at whole 1.x versions of the dependency, and this bug is present in all of them, so narrowing the constraint to a more restrictive version is also not the solution.
While I'm trying to help, it's hard to do in this way. I've made a new phpunit run after updating the squizlabs/php_codesniffer constraint to ^2.0, but all the tests are failing, I assume that there are some changes between these versions which aren't backguard compatible:

FAILURES!
Tests: 203, Assertions: 0, Failures: 200, Skipped: 3.

Please, note that I haven't experience with PHP_CodeSniffer, so any hint is very appreciated.

@Ocramius
Copy link
Member

Totally missed this. Indeed, the project won't run with 2.x, but should... Can't help further myself tho: I know as much as you do about PHP_CodeSniffer...

@sovaalexandr
Copy link

@doctrine/team-doctrine2 any progress on #7 (comment) ? Now I'm getting violation when try to

Add spaces around a negation if condition if ( ! $cond)

@lcobucci
Copy link
Member

Sniffs implemented on #8 (along with PHPCS v3 compatibility).

@lcobucci lcobucci closed this Aug 20, 2017
@lcobucci lcobucci self-assigned this Aug 20, 2017
@phansys phansys deleted the import_from_doctrine_doctrine2 branch August 21, 2017 01:24
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