Skip to content

Commit fe0b7ee

Browse files
committed
Update requirements
1 parent ad13f80 commit fe0b7ee

File tree

12 files changed

+113
-112
lines changed

12 files changed

+113
-112
lines changed

.cs.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
'concat_space' => ['spacing' => 'one'],
2222
'compact_nullable_typehint' => true,
2323
'declare_equal_normalize' => ['space' => 'single'],
24+
'general_phpdoc_annotation_remove' => [
25+
'annotations' => [
26+
'author',
27+
'package',
28+
],
29+
],
2430
'increment_style' => ['style' => 'post'],
2531
'list_syntax' => ['syntax' => 'short'],
2632
'echo_tag_syntax' => ['format' => 'long'],
@@ -34,11 +40,22 @@
3440
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
3541
'ordered_imports' => [
3642
'sort_algorithm' => 'alpha',
37-
'imports_order' => ['class', 'const', 'function']
43+
'imports_order' => ['class', 'const', 'function'],
3844
],
3945
'single_line_throw' => false,
46+
'declare_strict_types' => false,
47+
'blank_line_between_import_groups' => true,
4048
'fully_qualified_strict_types' => true,
41-
'global_namespace_import' => false,
49+
'no_null_property_initialization' => false,
50+
'operator_linebreak' => [
51+
'only_booleans' => true,
52+
'position' => 'beginning',
53+
],
54+
'global_namespace_import' => [
55+
'import_classes' => true,
56+
'import_constants' => null,
57+
'import_functions' => null
58+
]
4259
]
4360
)
4461
->setFinder(

.gitattributes

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,24 @@
1212
# This could have a big impact on big deployments and/or testing.
1313
# ------------------------------------------------------------------------------
1414

15+
/tests export-ignore
1516
/build export-ignore
1617
/docs export-ignore
17-
/tests export-ignore
18-
/.cs.php export-ignore
19-
/.coveralls.* export-ignore
20-
/.editorconfig export-ignore
18+
/build.xml export-ignore
19+
/phpunit.xml export-ignore
2120
/.gitattributes export-ignore
2221
/.gitignore export-ignore
2322
/.scrutinizer.* export-ignore
24-
/.travis.* export-ignore
25-
/build.xml export-ignore
26-
/phpcs.xml export-ignore
27-
/phpstan.neon export-ignore
28-
/phpunit.xml export-ignore
23+
/.editorconfig export-ignore
2924

3025
# Define binary file attributes.
3126
# - Do not treat them as text.
3227
# - Include binary diff in patches instead of "binary files differ."
33-
*.rar binary
28+
*.pdf binary
29+
*.mo binary
30+
*.gif binary
31+
*.ico binary
32+
*.jpg binary
33+
*.jpeg binary
34+
*.png binary
3435
*.zip binary

.github/workflows/build.yml

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11
name: build
22

3-
on: [push, pull_request]
3+
on: [ push, pull_request ]
44

55
jobs:
6-
run:
7-
runs-on: ${{ matrix.operating-system }}
8-
strategy:
9-
matrix:
10-
operating-system: [ubuntu-latest]
11-
php-versions: ['7.3', '7.4', '8.1', '8.2']
12-
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
13-
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v1
17-
18-
- name: Setup PHP
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: ${{ matrix.php-versions }}
22-
extensions: mbstring, intl, zip
23-
coverage: none
24-
25-
- name: Check PHP Version
26-
run: php -v
27-
28-
- name: Check Composer Version
29-
run: composer -V
30-
31-
- name: Install dependencies for PHP 7
32-
if: matrix.php-versions < '8.0'
33-
run: composer update --prefer-dist --no-progress
34-
35-
- name: Install dependencies for PHP 8
36-
if: matrix.php-versions >= '8.0'
37-
run: composer update --prefer-dist --no-progress --ignore-platform-req=php
38-
39-
- name: Run test suite
40-
run: composer test:all
41-
env:
42-
PHP_CS_FIXER_IGNORE_ENV: 1
6+
run:
7+
runs-on: ${{ matrix.operating-system }}
8+
strategy:
9+
matrix:
10+
operating-system: [ ubuntu-latest ]
11+
php-versions: [ '8.1', '8.2' ]
12+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
extensions: mbstring, intl, zip
23+
coverage: none
24+
25+
- name: Check PHP Version
26+
run: php -v
27+
28+
- name: Check Composer Version
29+
run: composer -V
30+
31+
- name: Check PHP Extensions
32+
run: php -m
33+
34+
- name: Validate composer.json and composer.lock
35+
run: composer validate
36+
37+
- name: Install dependencies
38+
run: composer install --prefer-dist --no-progress --no-suggest
39+
40+
- name: Run test suite
41+
run: composer test:all

.gitignore

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,5 @@ composer.lock
33
nbproject/
44
vendor/
55
build/
6-
.phpunit.result.cache
7-
.php_cs.cache
8-
9-
tests/files/excluded/
10-
11-
!tests/files/excluded/
12-
tests/files/excluded/*
13-
!tests/files/excluded/empty
6+
.phpunit.cache/
7+
.phpunit.result.cache

.scrutinizer.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
filter:
2-
paths: ["src/*"]
3-
excluded_paths: ["vendor/*", "tests/*"]
2+
paths: [ "src/*" ]
3+
excluded_paths: [ "vendor/*", "tests/*" ]
44

55
checks:
66
php:
@@ -12,7 +12,10 @@ tools:
1212

1313
build:
1414
environment:
15-
php: 8.1
15+
php:
16+
version: 8.1.2
17+
ini:
18+
xdebug.mode: coverage
1619
mysql: false
1720
node: false
1821
postgresql: false
@@ -30,11 +33,9 @@ build:
3033
dependencies:
3134
before:
3235
- composer self-update
33-
- composer update --no-interaction --prefer-dist --no-progress
3436
tests:
3537
before:
36-
-
37-
command: composer test:coverage
38+
- command: composer test:coverage
3839
coverage:
3940
file: 'build/logs/clover.xml'
4041
format: 'clover'

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.4.0] - 2023-09-09
11+
12+
### Changed
13+
14+
- Update requirements
15+
1016
## [0.3.0] - 2023-05-30
1117

1218
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Note: This package does not support extracting / unpacking rar archives.
2121

2222
## Requirements
2323

24-
* PHP 7.3+ or 8.0+
24+
* PHP 8.1+
2525

2626
> The [PECL RAR package](https://www.php.net/manual/en/book.rar.php) is **NOT** required
2727

composer.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
],
1212
"homepage": "https://github.com/selective-php/rar",
1313
"require": {
14-
"php": "^7.3 || ^8.0"
14+
"php": "^8.1"
1515
},
1616
"require-dev": {
1717
"friendsofphp/php-cs-fixer": "^3",
18-
"overtrue/phplint": "^2",
1918
"phpstan/phpstan": "^1",
20-
"phpunit/phpunit": "^9",
19+
"phpunit/phpunit": "^10",
2120
"squizlabs/php_codesniffer": "^3"
2221
},
2322
"autoload": {
@@ -35,12 +34,17 @@
3534
"sort-packages": true
3635
},
3736
"scripts": {
38-
"cs:check": "php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi",
39-
"cs:fix": "php-cs-fixer fix --config=.cs.php --ansi",
37+
"cs:check": [
38+
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
39+
"php-cs-fixer fix --dry-run --format=txt --verbose --diff --config=.cs.php --ansi"
40+
],
41+
"cs:fix": [
42+
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
43+
"php-cs-fixer fix --config=.cs.php --ansi --verbose"
44+
],
4045
"sniffer:check": "phpcs --standard=phpcs.xml",
4146
"sniffer:fix": "phpcbf --standard=phpcs.xml",
4247
"stan": "phpstan analyse -c phpstan.neon --no-progress --ansi",
43-
"start": "php -S localhost:8080 -t public/",
4448
"test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always",
4549
"test:all": [
4650
"@cs:check",

phpcs.xml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,17 @@
33
<arg name="basepath" value="."/>
44
<arg name="colors"/>
55
<arg value="sp"/>
6-
<arg name="extensions" value="php"/>
76

87
<config name="ignore_warnings_on_exit" value="1"/>
98

109
<file>./src</file>
1110
<file>./tests</file>
1211

13-
<rule ref="PSR12"></rule>
12+
<rule ref="PSR12"/>
1413

15-
<!--
16-
<rule ref="Squiz.Commenting.ClassComment">
17-
<exclude name="Squiz.Commenting.ClassComment.TagNotAllowed"/>
18-
<type>warning</type>
19-
<exclude-pattern>*/tests/</exclude-pattern>
20-
</rule>
21-
<rule ref="Squiz.Commenting.ClassComment.Missing">
22-
<type>warning</type>
23-
</rule>
24-
<rule ref="Squiz.Commenting.FunctionComment.Missing">
25-
<type>warning</type>
26-
<exclude-pattern>*/config/</exclude-pattern>
27-
</rule>
28-
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
29-
<type>warning</type>
30-
</rule>
31-
<rule ref="Squiz.Commenting.FunctionComment.MissingParamComment">
32-
<type>warning</type>
33-
</rule>
3414
<rule ref="Squiz.Commenting.FunctionComment.ParamCommentNotCapital">
3515
<type>warning</type>
3616
</rule>
37-
-->
3817

3918
<rule ref="Generic.Metrics.CyclomaticComplexity">
4019
<properties>
@@ -47,4 +26,4 @@
4726
<property name="absoluteNestingLevel" value="4"/>
4827
</properties>
4928
</rule>
50-
</ruleset>
29+
</ruleset>

phpstan.neon

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
parameters:
2-
level: max
2+
level: 8
33
paths:
4-
- src
5-
- tests
6-
ignoreErrors:
7-
- '#Cannot cast mixed to int.#'
4+
- src

0 commit comments

Comments
 (0)