Skip to content

Commit 353c937

Browse files
authored
Merge pull request #3 from php-collective/next
Prepare 8.1 release
2 parents 3817200 + 9dfad58 commit 353c937

File tree

5 files changed

+10
-34
lines changed

5 files changed

+10
-34
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
php-version:
17-
- '7.4'
17+
- '8.1'
1818
- '8.2'
1919

2020
steps:
@@ -59,7 +59,7 @@ jobs:
5959
fail-fast: false
6060
matrix:
6161
php-version:
62-
- '7.4'
62+
- '8.1'
6363

6464
steps:
6565
- name: Setup PHP

PhpCollective/Sniffs/Internal/DisallowFunctionsSniff.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class DisallowFunctionsSniff extends AbstractSniff
2828
/**
2929
* @var string
3030
*/
31-
protected const PHP_MIN = '7.4';
31+
protected const PHP_MIN = '8.1';
3232

3333
/**
3434
* This property can be filled with the current PHP version in use.
@@ -43,20 +43,6 @@ class DisallowFunctionsSniff extends AbstractSniff
4343
* @var array<string, array<string>>
4444
*/
4545
protected static $methods = [
46-
// https://github.com/symfony/polyfill-php80
47-
'8.0' => [
48-
'str_contains',
49-
'str_starts_with',
50-
'str_ends_with',
51-
'get_debug_type',
52-
'get_resource_id',
53-
'fdiv',
54-
'preg_last_error_msg',
55-
],
56-
// https://github.com/symfony/polyfill-php81
57-
'8.1' => [
58-
'array_is_list',
59-
],
6046
];
6147

6248
/**

PhpCollectiveStrict/ruleset.xml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,23 @@
1414
<exclude name="PhpCollectiveStrict.TypeHints.ParameterTypeHint.UselessAnnotation"/>
1515
<exclude name="PhpCollectiveStrict.TypeHints.ParameterTypeHint.UselessDocComment"/>
1616
<properties>
17-
<property name="enableMixedTypeHint" value="false"/>
18-
<property name="enableUnionTypeHint" value="false"/>
19-
<property name="enableIntersectionTypeHint" value="false"/>
20-
<property name="enableNeverTypeHint" value="false"/>
17+
<property name="enableStandaloneNullTrueFalseTypeHints" value="false"/>
2118
</properties>
2219
</rule>
2320
<rule ref="PhpCollectiveStrict.TypeHints.ReturnTypeHint">
2421
<exclude name="PhpCollectiveStrict.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
2522
<exclude name="PhpCollectiveStrict.TypeHints.ReturnTypeHint.UselessAnnotation"/>
2623
<exclude name="PhpCollectiveStrict.TypeHints.ReturnTypeHint.UselessDocComment"/>
2724
<properties>
28-
<property name="enableStaticTypeHint" value="false"/>
29-
<property name="enableMixedTypeHint" value="false"/>
30-
<property name="enableUnionTypeHint" value="false"/>
31-
<property name="enableIntersectionTypeHint" value="false"/>
32-
<property name="enableNeverTypeHint" value="false"/>
25+
<property name="enableStandaloneNullTrueFalseTypeHints" value="false"/>
3326
</properties>
3427
</rule>
3528
<rule ref="PhpCollectiveStrict.TypeHints.PropertyTypeHint">
3629
<exclude name="PhpCollectiveStrict.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
3730
<exclude name="PhpCollectiveStrict.TypeHints.PropertyTypeHint.UselessAnnotation"/>
3831
<exclude name="PhpCollectiveStrict.TypeHints.PropertyTypeHint.UselessDocComment"/>
3932
<properties>
40-
<property name="enableNativeTypeHint" value="false"/>
41-
<property name="enableMixedTypeHint" value="false"/>
42-
<property name="enableUnionTypeHint" value="false"/>
43-
<property name="enableIntersectionTypeHint" value="false"/>
33+
<property name="enableStandaloneNullTrueFalseTypeHints" value="false"/>
4434
</properties>
4535
</rule>
4636
</ruleset>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PhpCollective Code Sniffer
22
[![CI](https://github.com/php-collective/code-sniffer/workflows/CI/badge.svg)](https://github.com/php-collective/code-sniffer/actions?query=workflow%3ACI+branch%3Amaster)
33
[![Latest Stable Version](https://poser.pugx.org/php-collective/code-sniffer/v/stable.svg)](https://packagist.org/packages/php-collective/code-sniffer)
4-
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg)](https://php.net/)
4+
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)
55
[![PHPStan](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat)](https://phpstan.org/)
66
[![License](https://poser.pugx.org/php-collective/code-sniffer/license.svg)](https://packagist.org/packages/php-collective/code-sniffer)
77
[![Total Downloads](https://poser.pugx.org/php-collective/code-sniffer/d/total.svg)](https://packagist.org/packages/php-collective/code-sniffer)

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
}
2323
],
2424
"require": {
25-
"php": ">=7.4",
26-
"slevomat/coding-standard": "^7.2.0 || ^8.0.1",
25+
"php": ">=8.1",
26+
"slevomat/coding-standard": "^8.0.1",
2727
"squizlabs/php_codesniffer": "^3.6.2"
2828
},
2929
"require-dev": {
3030
"phpstan/phpstan": "^1.0.0",
31-
"phpunit/phpunit": "^9.5"
31+
"phpunit/phpunit": "^10.3"
3232
},
3333
"autoload": {
3434
"psr-4": {

0 commit comments

Comments
 (0)