Skip to content

Commit

Permalink
Merge pull request #395 from cakephp/5.x-dependencies-update
Browse files Browse the repository at this point in the history
5.x dependencies update
  • Loading branch information
dereuromark committed Aug 3, 2024
2 parents 3227936 + 2876076 commit f316cf4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 30 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2']
php-version: ['8.1', '8.2', '8.3']
dependencies: ['highest']
include:
- php-version: '8.1'
dependencies: 'lowest'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -31,10 +31,9 @@ jobs:
coverage: none

- name: Composer install
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --ignore-platform-reqs

- name: Run PHPUnit
run: composer phpunit
Expand All @@ -54,9 +53,7 @@ jobs:
coverage: none

- name: Composer install
uses: ramsey/composer-install@v2
with:
composer-options: --ignore-platform-reqs
uses: ramsey/composer-install@v3

- name: Run PHP CodeSniffer
run: vendor/bin/phpcs --report=checkstyle | cs2pr
2 changes: 1 addition & 1 deletion CakePHP/Sniffs/Classes/ReturnTypeHintSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function process(File $phpcsFile, $stackPtr)

// We skip for interface methods
if (empty($tokens[$stackPtr]['scope_opener']) || empty($tokens[$stackPtr]['scope_closer'])) {
return [];
return;
}

$returnTokenCode = $tokens[$startIndex]['code'];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php
namespace Beakman;

use Other\Crap;
use Other\Error as OtherError;

class Foo
{
/**
Expand Down
1 change: 1 addition & 0 deletions CakePHP/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
<property name="ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration" />

<!-- phpcs Zend sniffs -->
<rule ref="Zend.NamingConventions.ValidVariableName">
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"require": {
"php": ">=8.1.0",
"phpstan/phpdoc-parser": "^1.4.5",
"slevomat/coding-standard": "^8.4",
"squizlabs/php_codesniffer": "^3.7.1"
"slevomat/coding-standard": "^8.15",
"squizlabs/php_codesniffer": "^3.9"
},
"require-dev": {
"phpunit/phpunit": "^7.1"
"phpunit/phpunit": "^9.3.4"
},
"autoload": {
"psr-4": {
Expand Down
33 changes: 17 additions & 16 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CakePHP ruleset

The CakePHP standard contains 143 sniffs
The CakePHP standard contains 144 sniffs

CakePHP (20 sniffs)
-------------------
Expand Down Expand Up @@ -54,7 +54,7 @@ Generic (25 sniffs)
- Generic.WhiteSpace.ScopeIndent

PEAR (1 sniff)
---------------
--------------
- PEAR.Functions.ValidDefaultValue

PSR1 (3 sniffs)
Expand All @@ -63,6 +63,18 @@ PSR1 (3 sniffs)
- PSR1.Files.SideEffects
- PSR1.Methods.CamelCapsMethodName

PSR2 (9 sniffs)
---------------
- PSR2.Classes.ClassDeclaration
- PSR2.Classes.PropertyDeclaration
- PSR2.ControlStructures.ElseIfDeclaration
- PSR2.ControlStructures.SwitchDeclaration
- PSR2.Files.ClosingTag
- PSR2.Files.EndFileNewline
- PSR2.Methods.FunctionCallSignature
- PSR2.Methods.FunctionClosingBrace
- PSR2.Methods.MethodDeclaration

PSR12 (17 sniffs)
-----------------
- PSR12.Classes.AnonClassDeclaration
Expand All @@ -83,19 +95,7 @@ PSR12 (17 sniffs)
- PSR12.Properties.ConstantVisibility
- PSR12.Traits.UseDeclaration

PSR2 (9 sniffs)
---------------
- PSR2.Classes.ClassDeclaration
- PSR2.Classes.PropertyDeclaration
- PSR2.ControlStructures.ElseIfDeclaration
- PSR2.ControlStructures.SwitchDeclaration
- PSR2.Files.ClosingTag
- PSR2.Files.EndFileNewline
- PSR2.Methods.FunctionCallSignature
- PSR2.Methods.FunctionClosingBrace
- PSR2.Methods.MethodDeclaration

SlevomatCodingStandard (39 sniffs)
SlevomatCodingStandard (40 sniffs)
----------------------------------
- SlevomatCodingStandard.Arrays.TrailingArrayComma
- SlevomatCodingStandard.Classes.ClassConstantVisibility
Expand All @@ -113,6 +113,7 @@ SlevomatCodingStandard (39 sniffs)
- SlevomatCodingStandard.ControlStructures.NewWithParentheses
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
- SlevomatCodingStandard.Exceptions.DeadCatch
- SlevomatCodingStandard.Functions.ArrowFunctionDeclaration
- SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
- SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation
- SlevomatCodingStandard.Namespaces.NamespaceDeclaration
Expand Down Expand Up @@ -169,5 +170,5 @@ Squiz (28 sniffs)
- Squiz.WhiteSpace.SuperfluousWhitespace

Zend (1 sniff)
---------------
--------------
- Zend.NamingConventions.ValidVariableName

0 comments on commit f316cf4

Please sign in to comment.