Skip to content

Feature: upgrade to Laravel 11 #7

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

Merged
merged 1 commit into from
Mar 3, 2025
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
60 changes: 32 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Tests

on:
push:
branches: [ main, develop ]
branches:
- main
- develop
pull_request:
branches: [ main, develop ]
branches:
- main
- develop

jobs:
build:
Expand All @@ -14,31 +18,31 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.1, 8.2]
laravel: [10]
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 11 ]

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
tools: composer:v2
coverage: none
ini-values: error_reporting=E_ALL, zend.assertions=1

- name: Set Laravel Version
run: composer require "laravel/framework:^${{ matrix.laravel }}" --no-update -n

- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer install --no-suggest --prefer-dist -n -o

- name: Execute tests
run: vendor/bin/phpunit
- name: Checkout Code
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, gd
tools: composer:v2
coverage: none
ini-values: error_reporting=E_ALL, zend.assertions=1

- name: Set Laravel Version
run: composer require "illuminate/support:^${{ matrix.laravel }}" --no-update

- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vendor/
composer.lock
.phpunit.result.cache
.phpunit.cache/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file. This project adheres to
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).

## Unreleased

### Changed

- Minimum PHP is now 8.2.
- Minimum Laravel is now 11.

## [2.0.0] - 2023-06-20

### Changed
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
}
],
"require": {
"php": "^8.1",
"illuminate/support": "^10.0",
"laravel-json-api/eloquent": "^3.0",
"tenantcloud/laravel-boolean-softdeletes": "^5.0"
"php": "^8.2",
"illuminate/support": "^11.0",
"laravel-json-api/eloquent": "^4.0",
"tenantcloud/laravel-boolean-softdeletes": "^6.0"
},
"require-dev": {
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^9.6.9"
"orchestra/testbench": "^9.0",
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-4": {
Expand All @@ -46,7 +46,7 @@
},
"extra": {
"branch-alias": {
"dev-develop": "2.x-dev"
"dev-develop": "3.x-dev"
}
},
"minimum-stability": "stable",
Expand Down
47 changes: 10 additions & 37 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,41 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 Cloud Creativity Limited
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false"
beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="vendor/autoload.php" colors="true"
processIsolation="false" stopOnError="false" stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/lib/Unit/</directory>
Expand All @@ -51,4 +19,9 @@
<ini name="error_reporting" value="E_ALL"/>
<env name="DB_CONNECTION" value="testing"/>
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/lib/Acceptance/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function setUp(): void
/**
* @return array
*/
public function trashedProvider(): array
public static function trashedProvider(): array
{
return [
'trashed' => [true],
Expand Down