Skip to content

Commit 6fc6595

Browse files
Laravel 11.x Compatibility (#12)
* Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 * Update README.md * Update run-tests.yml --------- Co-authored-by: Pascal Baljet <pascal@protone.media>
1 parent bd4cfb2 commit 6fc6595

File tree

3 files changed

+91
-88
lines changed

3 files changed

+91
-88
lines changed

.github/workflows/run-tests.yml

Lines changed: 84 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,97 @@
11
name: run-tests
22

3-
on: [push, pull_request]
3+
on:
4+
- push
5+
- pull_request
46

57
jobs:
6-
test:
7-
runs-on: ubuntu-latest
8-
strategy:
9-
fail-fast: true
10-
matrix:
11-
php: [8.3, 8.2, 8.1]
12-
laravel: [10.*]
13-
db: [mysql, postgres, sqlite]
14-
dependency-version: [prefer-lowest, prefer-stable]
15-
include:
16-
- laravel: 10.*
17-
testbench: 8.*
8+
test:
9+
runs-on: ubuntu-latest
1810

19-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - DB ${{ matrix.db }} - ${{ matrix.dependency-version }}
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
php: [8.3, 8.2, 8.1]
15+
laravel: ["10.*", "11.*"]
16+
db: [mysql, postgres, sqlite]
17+
dependency-version: [prefer-lowest, prefer-stable]
18+
include:
19+
- laravel: 10.*
20+
testbench: 8.*
21+
- laravel: 11.*
22+
testbench: 9.*
23+
exclude:
24+
- laravel: 11.*
25+
php: 8.1
2026

21-
services:
22-
mysql:
23-
image: mysql:8.0
24-
env:
25-
MYSQL_ALLOW_EMPTY_PASSWORD: no
26-
MYSQL_USER: protone_media_db_test
27-
MYSQL_DATABASE: protone_media_db_test_mysql
28-
MYSQL_PASSWORD: secret
29-
MYSQL_ROOT_PASSWORD: secret
30-
ports:
31-
- 3306
32-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
33-
postgres:
34-
image: postgres:10.8
35-
env:
36-
POSTGRES_USER: protone_media_db_test
37-
POSTGRES_PASSWORD: secret
38-
POSTGRES_DB: protone_media_db_test_postgres
39-
ports:
40-
- 5432:5432
41-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
27+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - DB ${{ matrix.db }} - ${{ matrix.dependency-version }}
4228

43-
steps:
44-
- name: Checkout code
45-
uses: actions/checkout@v2
29+
services:
30+
mysql:
31+
image: mysql:8.0
32+
env:
33+
MYSQL_ALLOW_EMPTY_PASSWORD: no
34+
MYSQL_USER: protone_media_db_test
35+
MYSQL_DATABASE: protone_media_db_test_mysql
36+
MYSQL_PASSWORD: secret
37+
MYSQL_ROOT_PASSWORD: secret
38+
ports:
39+
- 3306
40+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
41+
postgres:
42+
image: postgres:10.8
43+
env:
44+
POSTGRES_USER: protone_media_db_test
45+
POSTGRES_PASSWORD: secret
46+
POSTGRES_DB: protone_media_db_test_postgres
47+
ports:
48+
- 5432:5432
49+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
4650

47-
- name: Cache dependencies
48-
uses: actions/cache@v2
49-
with:
50-
path: ~/.composer/cache/files
51-
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v2
5254

53-
- name: Setup PHP
54-
uses: shivammathur/setup-php@v2
55-
with:
56-
php-version: ${{ matrix.php }}
57-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
58-
coverage: none
55+
- name: Cache dependencies
56+
uses: actions/cache@v2
57+
with:
58+
path: ~/.composer/cache/files
59+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
5960

60-
- name: Install dependencies
61-
run: |
62-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
63-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
61+
- name: Setup PHP
62+
uses: shivammathur/setup-php@v2
63+
with:
64+
php-version: ${{ matrix.php }}
65+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
66+
coverage: none
6467

65-
- name: Execute tests (MySQL)
66-
run: vendor/bin/phpunit
67-
if: ${{ matrix.db == 'mysql' }}
68-
env:
69-
DB_DATABASE: protone_media_db_test_mysql
70-
DB_USERNAME: protone_media_db_test
71-
DB_PASSWORD: secret
72-
DB_PORT: ${{ job.services.mysql.ports[3306] }}
68+
- name: Install dependencies
69+
run: |
70+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
71+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
7372
74-
- name: Execute tests (PostgreSQL)
75-
run: vendor/bin/phpunit
76-
if: ${{ matrix.db == 'postgres' }}
77-
env:
78-
DB_CONNECTION: pgsql
79-
DB_DATABASE: protone_media_db_test_postgres
80-
DB_USERNAME: protone_media_db_test
81-
DB_PASSWORD: secret
82-
DB_PORT: ${{ job.services.postgres.ports[5432] }}
73+
- name: Execute tests (MySQL)
74+
run: vendor/bin/phpunit
75+
if: "${{ matrix.db == 'mysql' }}"
76+
env:
77+
DB_DATABASE: protone_media_db_test_mysql
78+
DB_USERNAME: protone_media_db_test
79+
DB_PASSWORD: secret
80+
DB_PORT: ${{ job.services.mysql.ports[3306] }}
8381

84-
- name: Execute tests (SQLite)
85-
run: vendor/bin/phpunit
86-
if: ${{ matrix.db == 'sqlite' }}
87-
env:
88-
DB_CONNECTION: sqlite
89-
DB_DATABASE: ":memory:"
82+
- name: Execute tests (PostgreSQL)
83+
run: vendor/bin/phpunit
84+
if: "${{ matrix.db == 'postgres' }}"
85+
env:
86+
DB_CONNECTION: pgsql
87+
DB_DATABASE: protone_media_db_test_postgres
88+
DB_USERNAME: protone_media_db_test
89+
DB_PASSWORD: secret
90+
DB_PORT: ${{ job.services.postgres.ports[5432] }}
91+
92+
- name: Execute tests (SQLite)
93+
run: vendor/bin/phpunit
94+
if: "${{ matrix.db == 'sqlite' }}"
95+
env:
96+
DB_CONNECTION: sqlite
97+
DB_DATABASE: ":memory:"

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ Related package: [Laravel Eloquent Where Not](https://github.com/protonemedia/la
3232

3333
❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider [sponsoring the maintenance and development](https://github.com/sponsors/pascalbaljet). Keeping track of issues and pull requests takes time, but we're happy to help!
3434

35-
## Laravel Splade
36-
37-
**Did you hear about Laravel Splade? 🤩**
38-
39-
It's the *magic* of Inertia.js with the *simplicity* of Blade. [Splade](https://github.com/protonemedia/laravel-splade) provides a super easy way to build Single Page Applications using Blade templates. Besides that magic SPA-feeling, it comes with more than ten components to sparkle your app and make it interactive, all without ever leaving Blade.
40-
4135
## Blogpost
4236

4337
If you want to know more about the background of this package, please read the blogpost: [Stop duplicating your Eloquent query scopes and constraints. Re-use them as select statements with a new Laravel package](https://protone.media/blog/stop-duplicating-your-eloquent-query-scopes-and-constraints-re-use-them-as-select-statements-with-a-new-laravel-package).
@@ -275,14 +269,15 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
275269

276270
## Other Laravel packages
277271

278-
* [`Laravel Analytics Event Tracking`](https://github.com/protonemedia/laravel-analytics-event-tracking): Laravel package to easily send events to Google Analytics.
279272
* [`Laravel Blade On Demand`](https://github.com/protonemedia/laravel-blade-on-demand): Laravel package to compile Blade templates in memory.
280273
* [`Laravel Cross Eloquent Search`](https://github.com/protonemedia/laravel-cross-eloquent-search): Laravel package to search through multiple Eloquent models.
281274
* [`Laravel FFMpeg`](https://github.com/protonemedia/laravel-ffmpeg): This package provides an integration with FFmpeg for Laravel. The storage of the files is handled by Laravel's Filesystem.
282-
* [`Laravel Form Components`](https://github.com/protonemedia/laravel-form-components): Blade components to rapidly build forms with Tailwind CSS Custom Forms and Bootstrap 4. Supports validation, model binding, default values, translations, includes default vendor styling and fully customizable!
275+
* [`Laravel MinIO Testing Tools`](https://github.com/protonemedia/laravel-minio-testing-tools): Run your tests against a MinIO S3 server.
276+
* [`Laravel Mixins`](https://github.com/protonemedia/laravel-mixins): A collection of Laravel goodies.
283277
* [`Laravel Paddle`](https://github.com/protonemedia/laravel-paddle): Paddle.com API integration for Laravel with support for webhooks/events.
278+
* [`Laravel Task Runner`](https://github.com/protonemedia/laravel-task-runner): Write Shell scripts like Blade Components and run them locally or on a remote server.
284279
* [`Laravel Verify New Email`](https://github.com/protonemedia/laravel-verify-new-email): This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.
285-
* [`Laravel WebDAV`](https://github.com/protonemedia/laravel-webdav): WebDAV driver for Laravel's Filesystem.
280+
* [`Laravel XSS Protection`](https://github.com/protonemedia/laravel-xss-protection): Laravel Middleware to protect your app against Cross-site scripting (XSS). It sanitizes request input, and it can sanatize Blade echo statements.
286281

287282
### Security
288283

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
],
1818
"require": {
1919
"php": "^8.1|^8.2|^8.3",
20-
"illuminate/support": "^10.0"
20+
"illuminate/support": "^10.0|^11.0"
2121
},
2222
"require-dev": {
2323
"mockery/mockery": "^1.4.4",
24-
"orchestra/testbench": "^8.0",
24+
"orchestra/testbench": "^8.0|^9.0",
2525
"phpunit/phpunit": "^10.4"
2626
},
2727
"autoload": {
@@ -43,4 +43,4 @@
4343
},
4444
"minimum-stability": "dev",
4545
"prefer-stable": true
46-
}
46+
}

0 commit comments

Comments
 (0)