Skip to content

Commit f316cf4

Browse files
authored
Merge pull request #395 from cakephp/5.x-dependencies-update
5.x dependencies update
2 parents 3227936 + 2876076 commit f316cf4

File tree

6 files changed

+26
-30
lines changed

6 files changed

+26
-30
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
php-version: ['8.1', '8.2']
18+
php-version: ['8.1', '8.2', '8.3']
1919
dependencies: ['highest']
2020
include:
2121
- php-version: '8.1'
2222
dependencies: 'lowest'
2323

2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626

2727
- name: Setup PHP
2828
uses: shivammathur/setup-php@v2
@@ -31,10 +31,9 @@ jobs:
3131
coverage: none
3232

3333
- name: Composer install
34-
uses: ramsey/composer-install@v2
34+
uses: ramsey/composer-install@v3
3535
with:
3636
dependency-versions: ${{ matrix.dependencies }}
37-
composer-options: --ignore-platform-reqs
3837

3938
- name: Run PHPUnit
4039
run: composer phpunit
@@ -54,9 +53,7 @@ jobs:
5453
coverage: none
5554

5655
- name: Composer install
57-
uses: ramsey/composer-install@v2
58-
with:
59-
composer-options: --ignore-platform-reqs
56+
uses: ramsey/composer-install@v3
6057

6158
- name: Run PHP CodeSniffer
6259
run: vendor/bin/phpcs --report=checkstyle | cs2pr

CakePHP/Sniffs/Classes/ReturnTypeHintSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function process(File $phpcsFile, $stackPtr)
5858

5959
// We skip for interface methods
6060
if (empty($tokens[$stackPtr]['scope_opener']) || empty($tokens[$stackPtr]['scope_closer'])) {
61-
return [];
61+
return;
6262
}
6363

6464
$returnTokenCode = $tokens[$startIndex]['code'];

CakePHP/Tests/Classes/ReturnTypeHintUnitTestinc.fixed renamed to CakePHP/Tests/Classes/ReturnTypeHintUnitTest.inc.fixed

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
22
namespace Beakman;
33

4-
use Other\Crap;
5-
use Other\Error as OtherError;
6-
74
class Foo
85
{
96
/**

CakePHP/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
<property name="ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach" value="true" />
217217
</properties>
218218
</rule>
219+
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration" />
219220

220221
<!-- phpcs Zend sniffs -->
221222
<rule ref="Zend.NamingConventions.ValidVariableName">

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
"require": {
2121
"php": ">=8.1.0",
2222
"phpstan/phpdoc-parser": "^1.4.5",
23-
"slevomat/coding-standard": "^8.4",
24-
"squizlabs/php_codesniffer": "^3.7.1"
23+
"slevomat/coding-standard": "^8.15",
24+
"squizlabs/php_codesniffer": "^3.9"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^7.1"
27+
"phpunit/phpunit": "^9.3.4"
2828
},
2929
"autoload": {
3030
"psr-4": {

docs/README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CakePHP ruleset
22

3-
The CakePHP standard contains 143 sniffs
3+
The CakePHP standard contains 144 sniffs
44

55
CakePHP (20 sniffs)
66
-------------------
@@ -54,7 +54,7 @@ Generic (25 sniffs)
5454
- Generic.WhiteSpace.ScopeIndent
5555

5656
PEAR (1 sniff)
57-
---------------
57+
--------------
5858
- PEAR.Functions.ValidDefaultValue
5959

6060
PSR1 (3 sniffs)
@@ -63,6 +63,18 @@ PSR1 (3 sniffs)
6363
- PSR1.Files.SideEffects
6464
- PSR1.Methods.CamelCapsMethodName
6565

66+
PSR2 (9 sniffs)
67+
---------------
68+
- PSR2.Classes.ClassDeclaration
69+
- PSR2.Classes.PropertyDeclaration
70+
- PSR2.ControlStructures.ElseIfDeclaration
71+
- PSR2.ControlStructures.SwitchDeclaration
72+
- PSR2.Files.ClosingTag
73+
- PSR2.Files.EndFileNewline
74+
- PSR2.Methods.FunctionCallSignature
75+
- PSR2.Methods.FunctionClosingBrace
76+
- PSR2.Methods.MethodDeclaration
77+
6678
PSR12 (17 sniffs)
6779
-----------------
6880
- PSR12.Classes.AnonClassDeclaration
@@ -83,19 +95,7 @@ PSR12 (17 sniffs)
8395
- PSR12.Properties.ConstantVisibility
8496
- PSR12.Traits.UseDeclaration
8597

86-
PSR2 (9 sniffs)
87-
---------------
88-
- PSR2.Classes.ClassDeclaration
89-
- PSR2.Classes.PropertyDeclaration
90-
- PSR2.ControlStructures.ElseIfDeclaration
91-
- PSR2.ControlStructures.SwitchDeclaration
92-
- PSR2.Files.ClosingTag
93-
- PSR2.Files.EndFileNewline
94-
- PSR2.Methods.FunctionCallSignature
95-
- PSR2.Methods.FunctionClosingBrace
96-
- PSR2.Methods.MethodDeclaration
97-
98-
SlevomatCodingStandard (39 sniffs)
98+
SlevomatCodingStandard (40 sniffs)
9999
----------------------------------
100100
- SlevomatCodingStandard.Arrays.TrailingArrayComma
101101
- SlevomatCodingStandard.Classes.ClassConstantVisibility
@@ -113,6 +113,7 @@ SlevomatCodingStandard (39 sniffs)
113113
- SlevomatCodingStandard.ControlStructures.NewWithParentheses
114114
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
115115
- SlevomatCodingStandard.Exceptions.DeadCatch
116+
- SlevomatCodingStandard.Functions.ArrowFunctionDeclaration
116117
- SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
117118
- SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation
118119
- SlevomatCodingStandard.Namespaces.NamespaceDeclaration
@@ -169,5 +170,5 @@ Squiz (28 sniffs)
169170
- Squiz.WhiteSpace.SuperfluousWhitespace
170171

171172
Zend (1 sniff)
172-
---------------
173+
--------------
173174
- Zend.NamingConventions.ValidVariableName

0 commit comments

Comments
 (0)