Skip to content

Commit c0b2715

Browse files
authored
Laravel 9 (#78)
1 parent 6583f2b commit c0b2715

File tree

10 files changed

+44
-98
lines changed

10 files changed

+44
-98
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ name: tests
22

33
on:
44
push:
5-
branches:
6-
- master
7-
tags-ignore:
8-
- '**'
9-
paths-ignore:
10-
- '**.md'
5+
branches: [master, main]
6+
tags-ignore: ['**']
7+
paths-ignore: ['**.md']
118
pull_request:
12-
paths-ignore:
13-
- '**.md'
9+
paths-ignore: ['**.md']
1410
schedule:
1511
- cron: '0 0 * * 1' # once in a week, docs: <https://git.io/JvxXE#onschedule>
1612

@@ -24,7 +20,7 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
2420
matrix:
2521
setup: ['basic', 'lowest']
2622
php: ['7.4', '8.0']
27-
rr: ['2.3.1'] # Releases: <https://github.com/spiral/roadrunner-binary/releases>
23+
rr: ['2.7.6'] # Releases: <https://github.com/roadrunner-server/roadrunner/releases>
2824
coverage: ['true']
2925
include:
3026
- php: '7.4'
@@ -35,15 +31,17 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
3531
setup: 'lowest'
3632
rr: '2.0.0'
3733
coverage: 'false'
34+
- php: '8.1'
35+
setup: 'basic'
36+
rr: '2.7.6'
37+
coverage: 'false'
3838
steps:
39-
- name: Check out code
40-
uses: actions/checkout@v2
39+
- uses: actions/checkout@v2
4140

4241
- name: Install RoadRunner Binary
4342
run: docker run --rm -v "/:/rootfs:rw" --entrypoint "" spiralscout/roadrunner:${{ matrix.rr }} cp /usr/bin/rr /rootfs/usr/bin/rr
4443

45-
- name: Setup PHP, with composer and extensions
46-
uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
44+
- uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
4745
with:
4846
php-version: ${{ matrix.php }}
4947
extensions: xdebug
@@ -91,11 +89,9 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
9189
name: Check Code Style
9290
runs-on: ubuntu-20.04
9391
steps:
94-
- name: Check out code
95-
uses: actions/checkout@v2
92+
- uses: actions/checkout@v2
9693

97-
- name: Setup PHP, with composer and extensions
98-
uses: shivammathur/setup-php@v2
94+
- uses: shivammathur/setup-php@v2
9995
with:
10096
php-version: 7.4
10197

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
66

7+
## UNRELEASED
8+
9+
### Added
10+
11+
- Laravel 9 support [#78]
12+
13+
### Removed
14+
15+
- Laravel 6 and 7 is no longer supported [#78]
16+
17+
[#78]:https://github.com/spiral/roadrunner-laravel/pull/78
18+
719
## v5.6.0
820

921
### Added

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ FROM php:8.1.2-alpine
44
ENV COMPOSER_HOME="/tmp/composer"
55

66
# Image page: <https://hub.docker.com/_/composer>
7-
COPY --from=composer:2.1.14 /usr/bin/composer /usr/bin/composer
7+
COPY --from=composer:2.2.6 /usr/bin/composer /usr/bin/composer
88

99
# Image page: <https://hub.docker.com/r/spiralscout/roadrunner>
10-
COPY --from=spiralscout/roadrunner:2.6.1 /usr/bin/rr /usr/bin/rr
10+
COPY --from=spiralscout/roadrunner:2.7.6 /usr/bin/rr /usr/bin/rr
1111

1212
RUN set -x \
1313
&& apk add --no-cache binutils git \
1414
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc 1>/dev/null \
1515
# install xdebug (for testing with code coverage), but do not enable it
1616
&& pecl install xdebug-3.1.2 1>/dev/null \
17-
&& docker-php-ext-install sockets pcntl \
17+
# install PHP extensions (CFLAGS usage reason - https://bit.ly/3ALS5NU)
18+
&& CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install -j$(nproc) sockets pcntl \
1819
&& apk del .build-deps \
1920
&& mkdir --parents --mode=777 /src ${COMPOSER_HOME}/cache/repo ${COMPOSER_HOME}/cache/files \
2021
&& ln -s /usr/bin/composer /usr/bin/c \

composer.json

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,24 @@
1717
"require": {
1818
"php": "^7.4 || ^8.0",
1919
"composer-runtime-api": "^2.0",
20-
"illuminate/auth": "~6.0 || ~7.0 || ~8.0",
21-
"illuminate/broadcasting": "~6.0 || ~7.0 || ~8.0",
22-
"illuminate/cache": "~6.0 || ~7.0 || ~8.0",
23-
"illuminate/contracts": "~6.0 || ~7.0 || ~8.0",
24-
"illuminate/cookie": "~6.0 || ~7.0 || ~8.0",
25-
"illuminate/database": "~6.0 || ~7.0 || ~8.0",
26-
"illuminate/http": "~6.0 || ~7.0 || ~8.0",
27-
"illuminate/mail": "~6.0 || ~7.0 || ~8.0",
28-
"illuminate/notifications": "~6.0 || ~7.0 || ~8.0",
29-
"illuminate/pipeline": "~6.0 || ~7.0 || ~8.0",
30-
"illuminate/queue": "~6.0 || ~7.0 || ~8.0",
31-
"illuminate/routing": "~6.0 || ~7.0 || ~8.0",
32-
"illuminate/session": "~6.0 || ~7.0 || ~8.0",
33-
"illuminate/support": "~6.0 || ~7.0 || ~8.0",
34-
"illuminate/translation": "~6.0 || ~7.0 || ~8.0",
35-
"illuminate/validation": "~6.0 || ~7.0 || ~8.0",
36-
"illuminate/view": "~6.0 || ~7.0 || ~8.0",
37-
"nyholm/psr7": "^1.2",
38-
"spiral/roadrunner-http": "^2.0",
39-
"spiral/roadrunner-worker": "^2.0.3",
40-
"symfony/console": "^4.3.4 || ^5.0",
41-
"symfony/psr-http-message-bridge": "^1.2 || ^2.0"
20+
"laravel/framework": "~8.0 || ~9.0",
21+
"nyholm/psr7": "^1.5",
22+
"spiral/roadrunner-http": "^2.0.4",
23+
"spiral/roadrunner-worker": "^2.1.5",
24+
"symfony/psr-http-message-bridge": "^2.0"
4225
},
4326
"require-dev": {
4427
"guzzlehttp/guzzle": "^6.3 || ~7.0",
45-
"inertiajs/inertia-laravel": "^0.4.2",
28+
"inertiajs/inertia-laravel": "^0.4.2 || ^0.5",
4629
"tightenco/ziggy": "^1.4.0",
47-
"laravel/laravel": "~6.0 || ~7.0 || ~8.0",
48-
"laravel/scout": "~8.0 || ~9.0",
30+
"laravel/laravel": "~8.0 || ~9.0",
31+
"laravel/scout": "~9.0",
4932
"laravel/socialite": "^5.0",
5033
"laravel/telescope": "^4.5",
51-
"mockery/mockery": "^1.3.2",
52-
"phpstan/phpstan": "~1.2",
53-
"phpunit/phpunit": "^8.0 || ^9.3",
54-
"livewire/livewire": "^2.7"
34+
"livewire/livewire": "^2.7",
35+
"mockery/mockery": "~1.3.3 || ^1.4.2",
36+
"phpstan/phpstan": "~1.4",
37+
"phpunit/phpunit": "^9.3.3"
5538
},
5639
"autoload": {
5740
"psr-4": {

phpunit.xml.dist

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@
2929
</report>
3030
</coverage>
3131

32-
<!-- deprecated -->
33-
<logging>
34-
<log type="coverage-html" target="./coverage/html"/>
35-
<log type="coverage-xml" target="./coverage/xml"/>
36-
<log type="coverage-clover" target="./coverage/clover.xml"/>
37-
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
38-
</logging>
39-
<filter>
40-
<whitelist>
41-
<directory suffix=".php">./src</directory>
42-
</whitelist>
43-
</filter>
44-
<!-- /deprecated -->
45-
4632
<php>
4733
<server name="APP_KEY" value="base64:+hY09mlBag/d7Qhq2SjE/i2iUzZBS1dGObLqcHZU2Ac=" force="true"/>
4834
<server name="APP_URL" value="http://unit-test" force="true"/>

src/Console/Commands/WorkerFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function make(string $mode = self::MODE_AUTO, ...$args): WorkerInterface
4848
}
4949

5050
if (\array_key_exists($mode, $map = $this->getWorkersMap())) {
51-
/** @var string $class */
5251
$class = $map[$mode];
5352
$worker = new $class(...$args);
5453

src/Listeners/RebindMailManagerListener.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ class RebindMailManagerListener implements ListenerInterface
1919
*/
2020
public function handle($event): void
2121
{
22-
// MailManager was introduced in laravel >= v7.0
23-
if (!\class_exists(MailManager::class)) {
24-
return;
25-
}
26-
2722
if ($event instanceof WithApplication) {
2823
$app = $event->application();
2924

tests/Unit/Listeners/FixSymfonyFileMovingListenerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public function testHandle(): void
3333
$this->assertFileExists($old_file_path);
3434
$this->assertTrue($function_location($old_file_path, $new_file_path));
3535
$this->assertFileExists($new_file_path);
36-
$this->assertFileNotExists($old_file_path);
36+
$this->assertFileDoesNotExist($old_file_path);
3737
$rnd_file_path1 = $tmp_dir . DIRECTORY_SEPARATOR . Str::random();
3838
$rnd_file_path2 = $tmp_dir . DIRECTORY_SEPARATOR . Str::random();
3939
$this->assertFalse($function_location($rnd_file_path1, $rnd_file_path2));
40-
$this->assertFileNotExists($rnd_file_path1);
41-
$this->assertFileNotExists($rnd_file_path2);
40+
$this->assertFileDoesNotExist($rnd_file_path1);
41+
$this->assertFileDoesNotExist($rnd_file_path2);
4242
}
4343

4444
/**

tests/Unit/Listeners/RebindMailManagerListenerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ class RebindMailManagerListenerTest extends AbstractListenerTestCase
1919
*/
2020
public function testHandle(): void
2121
{
22-
if (!\class_exists(MailManager::class)) {
23-
$this->markTestSkipped("MailManager was introduced in laravel >= v7.0");
24-
}
25-
2622
$app_clone = clone $this->app;
2723

2824
/* @var \Illuminate\Mail\MailManager $mail_manager */

tests/WorkerTest.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)