Skip to content
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

Update Doctrine CS requirement #2965

Merged
merged 1 commit into from
Jan 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ script: ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml
jobs:
allow_failures:
- php: nightly
- stage: Coding standard

include:
- stage: Test
Expand Down Expand Up @@ -304,7 +305,7 @@ jobs:

- stage: Pull request coding standard
if: type = pull_request
php: 7.2
php: 7.1
script:
- |
if [ $TRAVIS_BRANCH != "master" ]; then
Expand All @@ -317,6 +318,6 @@ jobs:

- stage: Coding standard
if: NOT type = pull_request
php: nightly
php: 7.1
script:
- ./vendor/bin/phpcs
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
"doctrine/common": "^2.7.1"
},
"require-dev": {
"doctrine/coding-standard": "^1.0",
"doctrine/coding-standard": "~2.0.0",
"phpunit/phpunit": "^6.3",
"phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5",
"squizlabs/php_codesniffer": "^3.0",
"symfony/console": "^2.0.5||^3.0",
"symfony/phpunit-bridge": "^3.3"
},
Expand Down
10 changes: 9 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@
<file>lib</file>
<file>tests</file>

<rule ref="Doctrine"/>
<rule ref="Doctrine">
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"/>
</rule>

<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>

<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>

<rule ref="Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase">
<exclude-pattern>lib/Doctrine/DBAL/Events.php</exclude-pattern>
</rule>
Expand Down