Skip to content

Commit e3c5bc8

Browse files
authored
Add PHP 8.1 support (#5)
* Add PHP 8.1 support * Remove PHP 7.2 support * Remove PHP 7.3 support * Upgrade to PHPUnit 9
1 parent 80abe48 commit e3c5bc8

File tree

6 files changed

+45
-33
lines changed

6 files changed

+45
-33
lines changed

.github/workflows/coverage.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: coverage
33
on: [push, pull_request]
44

55
jobs:
6-
tests:
6+
coverage:
77
runs-on: ubuntu-latest
88

99
name: Coverage
@@ -16,17 +16,17 @@ jobs:
1616
uses: actions/cache@v2
1717
with:
1818
path: ~/.composer/cache/files
19-
key: dependencies-php-7.4-illuminate-8.*-composer-${{ hashFiles('composer.json') }}
19+
key: dependencies-php-8.1-illuminate-8.*-composer-${{ hashFiles('composer.json') }}
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
2323
with:
24-
php-version: 7.4
24+
php-version: 8.1
2525
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
2626
coverage: xdebug
2727

2828
- name: Install dependencies
29-
run: composer update --prefer-dist --no-interaction --no-suggest
29+
run: composer update --prefer-dist --no-interaction
3030

3131
- name: Calculate coverage statistics
3232
run: vendor/bin/phpunit --coverage-clover 'clover.xml'

.github/workflows/tests.yml

+9-12
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
strategy:
14-
fail-fast: true
14+
fail-fast: false
1515
matrix:
16-
php: [7.2, 7.3, 7.4, 8.0]
16+
php: [7.4, 8.0, 8.1]
1717
illuminate: [6.*, 7.*, 8.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
@@ -22,14 +22,12 @@ jobs:
2222
- illuminate: 7.*
2323
testbench: 5.*
2424
- illuminate: 8.*
25-
testbench: 6.*
25+
testbench: ~6.22
2626
exclude:
27-
- php: 8.0
27+
- php: 8.1
28+
illuminate: 7.*
29+
- php: 8.1
2830
illuminate: 6.*
29-
- php: 7.4
30-
illuminate: 6.*
31-
- php: 7.2
32-
illuminate: 8.*
3331

3432
name: P${{ matrix.php }} - I${{ matrix.illuminate }} - ${{ matrix.stability }}
3533

@@ -52,10 +50,9 @@ jobs:
5250

5351
- name: Install dependencies
5452
run: |
55-
composer require "illuminate/contracts:${{ matrix.illuminate }}" --no-interaction --no-update
56-
composer require "illuminate/support:${{ matrix.illuminate }}" --no-interaction --no-update
57-
composer require "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
53+
composer require "laravel/framework:${{ matrix.illuminate }}" --no-interaction --no-update
54+
composer require "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --dev
55+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5956
6057
- name: Execute tests
6158
run: vendor/bin/phpunit --verbose

.styleci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
preset: laravel
2+
3+
disabled:
4+
- laravel_phpdoc_alignment
5+
- laravel_phpdoc_separation

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Release Notes
22

33
## [Unreleased](https://github.com/markwalet/laravel-packagist/compare/v1.2.0...master)
4+
5+
## Added
6+
- Added PHP 8.1 support.
7+
- Upgraded to PHPUnit 9.
8+
9+
## Removed
10+
- Removed PHP 7.2 support.
11+
- Removed PHP 7.3 support.
12+
413
## [v1.2.0 (2020-12-13)](https://github.com/markwalet/laravel-packagist/compare/v1.1.0...v1.2.0)
514

615
### Added

composer.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
}
1313
],
1414
"require": {
15-
"php": "^8.0|^7.2",
16-
"illuminate/contracts": "6.*|7.*|8.*",
17-
"illuminate/support": "6.*|7.*|8.*",
18-
"spatie/packagist-api": "^2.0",
19-
"ext-json": "*"
15+
"php": "~7.4|8.*",
16+
"ext-json": "*",
17+
"laravel/framework": "6.*|7.*|8.*",
18+
"phpoption/phpoption": ">=1.8",
19+
"spatie/packagist-api": "^2.0"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^8.5",
23-
"orchestra/testbench": "4.*|5.*|6.*"
22+
"phpunit/phpunit": "~9.3",
23+
"orchestra/testbench": "4.*|5.*|~6.22"
2424
},
2525
"autoload": {
2626
"psr-4": {

phpunit.xml

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/autoload.php"
34
backupGlobals="false"
45
backupStaticAttributes="false"
56
colors="true"
67
verbose="true"
78
processIsolation="false"
8-
stopOnFailure="false">
9+
stopOnFailure="false"
10+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
11+
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
12+
<include>
13+
<directory suffix=".php">./src</directory>
14+
</include>
15+
<exclude>
16+
<directory suffix=".php">./src/Exceptions/*</directory>
17+
</exclude>
18+
</coverage>
919
<testsuites>
1020
<testsuite name="Laravel Packagist Test Suite">
1121
<directory suffix="Test.php">./tests/</directory>
1222
</testsuite>
1323
</testsuites>
14-
<filter>
15-
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
16-
<directory suffix=".php">./src</directory>
17-
<exclude>
18-
<directory suffix=".php">./src/Exceptions/*</directory>
19-
</exclude>
20-
</whitelist>
21-
</filter>
2224
</phpunit>

0 commit comments

Comments
 (0)