Skip to content

Update php-csfixer rules to address problem in 2.7 & new multiline rule #449

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 2 commits into from
Oct 2, 2017

Conversation

erayd
Copy link
Contributor

@erayd erayd commented Sep 30, 2017

What

  • Configure to ignore processing of yoda_style rules
  • Explicitly set multiline comment mode
  • Update comment syntax for multiline // prefix
  • Explicitly run PHP-5.3 Travis tests on precise

Why

  • yoda_style in 2.7 is dangerous and may result in logic errors. In some cases, it also results in invalid syntax.

  • multiline comments prefixed with // now seem to be misaligned, and this cannot be disabled, so have changed the relevant comment.

  • trusty is now the default PHP testing distro on Travis, and it does not support PHP-5.3.

 * yoda_style in 2.7 is dangerous and may result in logic errors. In
 some cases, it also results in invalid syntax.

 * multiline comments prefixed with // now seem to be misaligned, and
 this cannot be disabled, so have changed the relevant comment.
@shmax
Copy link
Collaborator

shmax commented Sep 30, 2017

LGTM

Copy link
Collaborator

@bighappyface bighappyface left a comment

Choose a reason for hiding this comment

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

+1 for d52247c

@bighappyface bighappyface merged commit 90d340b into jsonrainbow:6.0.0-dev Oct 2, 2017
erayd added a commit to erayd/json-schema that referenced this pull request Oct 3, 2017
…le (jsonrainbow#449)

* Update php-csfixer rules to address problem in 2.7 & new multiline rule

 * yoda_style in 2.7 is dangerous and may result in logic errors. In
 some cases, it also results in invalid syntax.

 * multiline comments prefixed with // now seem to be misaligned, and
 this cannot be disabled, so have changed the relevant comment.

* PHP-5.3 is not available on trusty, so explicitly specify precise for 5.3
bighappyface pushed a commit that referenced this pull request Oct 3, 2017
* Update php-csfixer rules to address problem in 2.7 & new multiline rule (#449)

* Update php-csfixer rules to address problem in 2.7 & new multiline rule

 * yoda_style in 2.7 is dangerous and may result in logic errors. In
 some cases, it also results in invalid syntax.

 * multiline comments prefixed with // now seem to be misaligned, and
 this cannot be disabled, so have changed the relevant comment.

* PHP-5.3 is not available on trusty, so explicitly specify precise for 5.3

* Add proper recursive handling for $ref resolution base (#448)

Fixes #447

Note that this patch does not check whether a given container is
actually a schema when recursing into it. In most cases this will
not matter, however it does mean that in some edge cases it will
attempt to resolve a `$ref` in a context where ref is actually not
part of the spec. Limiting resolution to schema-context containers
is outside the scope of this patch, but can be added later.
@erayd erayd deleted the update-php-cs-fixer-rules branch October 5, 2017 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants