Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: drop support for PHP < 8.1 #136

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/fix-styling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
Expand All @@ -21,7 +21,7 @@ jobs:
id: extract_branch

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v2.3.0
uses: stefanzweifel/git-auto-commit-action@v5.0.1
with:
commit_message: Fix styling
branch: ${{ steps.extract_branch.outputs.branch }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
name: psalm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
php-version: '8.1'
extensions: mbstring
coverage: none

- name: Cache composer dependencies

uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.1, 8.0, 7.4]
php: [8.3, 8.2, 8.1]
stability: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
extensions: mbstring
coverage: none

- name: Setup problem matchers
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: main

Expand All @@ -21,7 +21,7 @@ jobs:
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Update CHANGELOG
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
}
],
"require": {
"php": "^7.4|^8.0",
"php": "^8.1",
"ext-mbstring": "*",
"spatie/enum": "^3.11"
},
"require-dev": {
"ext-json": "*",
"nesbot/carbon": "^2.63|^3.0",
"nesbot/carbon": "^3.5",
"larapack/dd": "^1.1",
"pestphp/pest": "^1.22",
"spatie/pest-plugin-snapshots": "^1.1",
"vimeo/psalm": "^4.13"
"pestphp/pest": "^2.34",
"spatie/pest-plugin-snapshots": "^2.1",
"vimeo/psalm": "^5.24"
},
"autoload": {
"psr-4": {
Expand Down
60 changes: 31 additions & 29 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<php>
<ini name="date.timezone" value="UTC"/>
</php>
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
cacheDirectory=".phpunit.cache">
<coverage>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>

<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>

<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>

<php>
<ini name="date.timezone" value="UTC"/>
</php>

<source>
<include>
<directory>src/</directory>
</include>
</source>
</phpunit>
Loading