Skip to content

Commit 9cd5b7f

Browse files
authored
Laravel 8.x is supported now (#16)
1 parent bd1a644 commit 9cd5b7f

File tree

8 files changed

+54
-44
lines changed

8 files changed

+54
-44
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,32 @@ assignees: tarampampam
1818

1919
> Tell us what happens instead.
2020
21-
### Steps to reproduce the behavior:
22-
23-
> Put some code example:
24-
>
25-
> ```php
26-
> $some = new \stdClass();
27-
> echo $some;
28-
>
29-
> PHP Catchable fatal error: Object of class stdClass could not be converted to string in Command line code on line 2
30-
> PHP Stack trace:
31-
> PHP 1. {main}() Command line code:0
32-
> ```
21+
### Steps to reproduce
22+
23+
> Describe steps to behavior reproducing.
3324
3425
## System information
3526

3627
> Please, complete the following information:
3728
38-
- PHP version(s): [e.g. `7.2.6`]
39-
- Package version(s): [e.g. `3.3.0`]
29+
Key | Value
30+
----------------------- | ----
31+
PHP version | <!-- e.g. `7.2.6` -->
32+
Current package version | <!-- e.g. `3.6.0` -->
33+
RoadRunner version | <!-- e.g. `1.8.3` -->
34+
Environment | <!-- e.g. `docker`, `local`, `aws` -->
35+
36+
### RoadRunner configuration file content
37+
38+
```yaml
39+
# Paste here your `.rr.yaml` file content
40+
```
41+
42+
### Package configuration file content
43+
44+
```php
45+
# Paste here your `config/roadrunner.php` file content
46+
```
4047

4148
## Additional context
4249

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
| Q | A
2-
| ------------- | ---
3-
| Bug fix? | Yes or No
4-
| New feature? | Yes or No
5-
61
## Description
72

83
<!--

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ 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+
## v3.6.0
8+
9+
### Changed
10+
11+
- Laravel `8.x` is supported now
12+
- Minimal Laravel version now is `6.0` (Laravel `5.5` LTS got last security update August 30th, 2020)
13+
- Minimal `spiral/roadrunner` package version now is `1.8`
14+
715
## v3.5.0
816

917
### Added

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
FROM php:7.2.5-alpine
1+
FROM php:7.3.5-alpine
22

33
ENV \
44
COMPOSER_ALLOW_SUPERUSER="1" \
55
COMPOSER_HOME="/tmp/composer"
66

7-
COPY --from=composer:1.10.7 /usr/bin/composer /usr/bin/composer
7+
COPY --from=composer:1.10.10 /usr/bin/composer /usr/bin/composer
88

99
RUN set -x \
1010
&& apk add --no-cache binutils git \
1111
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc 1>/dev/null \
1212
# install xdebug (for testing with code coverage), but do not enable it
13-
&& pecl install xdebug-2.9.1 1>/dev/null \
13+
&& pecl install xdebug-2.9.6 1>/dev/null \
1414
&& apk del .build-deps \
1515
&& mkdir /src ${COMPOSER_HOME} \
1616
&& composer global require 'hirak/prestissimo' --no-interaction --no-suggest --prefer-dist \

Makefile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
# Makefile readme (ru): <http://linux.yaroslavl.ru/docs/prog/gnu_make_3-79_russian_manual.html>
33
# Makefile readme (en): <https://www.gnu.org/software/make/manual/html_node/index.html#SEC_Contents>
44

5-
dc_bin := $(shell command -v docker-compose 2> /dev/null)
6-
75
SHELL = /bin/sh
8-
RUN_APP_ARGS = --rm --user "$(shell id -u):$(shell id -g)" app
6+
RUN_APP_ARGS = --rm --user "$(shell id -u):$(shell id -g)"
97

108
.PHONY : help build latest install lowest test test-cover clean
119
.DEFAULT_GOAL : help
@@ -16,25 +14,25 @@ help: ## Show this help
1614
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
1715

1816
build: ## Build docker images, required for current package environment
19-
$(dc_bin) build
17+
docker-compose build
2018

2119
latest: clean ## Install latest php dependencies
22-
$(dc_bin) run $(RUN_APP_ARGS) composer update -n --ansi --no-suggest --prefer-dist --prefer-stable
20+
docker-compose run $(RUN_APP_ARGS) app composer update -n --ansi --no-suggest --prefer-dist --prefer-stable
2321

2422
install: clean ## Install regular php dependencies
25-
$(dc_bin) run $(RUN_APP_ARGS) composer update -n --prefer-dist --no-interaction --no-suggest
23+
docker-compose run $(RUN_APP_ARGS) app composer update -n --prefer-dist --no-interaction --no-suggest
2624

2725
lowest: clean ## Install lowest php dependencies
28-
$(dc_bin) run $(RUN_APP_ARGS) composer update -n --ansi --no-suggest --prefer-dist --prefer-lowest
26+
docker-compose run $(RUN_APP_ARGS) app composer update -n --ansi --no-suggest --prefer-dist --prefer-lowest
2927

3028
test: ## Execute php tests and linters
31-
$(dc_bin) run $(RUN_APP_ARGS) composer test
29+
docker-compose run $(RUN_APP_ARGS) app composer test
3230

3331
test-cover: ## Execute php tests with coverage
34-
$(dc_bin) run --rm --user "0:0" app sh -c 'docker-php-ext-enable xdebug && su $(shell whoami) -s /bin/sh -c "composer phpunit-cover"'
32+
docker-compose run --rm --user "0:0" app sh -c 'docker-php-ext-enable xdebug && su $(shell whoami) -s /bin/sh -c "composer phpunit-cover"'
3533

3634
shell: ## Start shell into container with php
37-
$(dc_bin) run -e "PS1=\[\033[1;32m\]\[\033[1;36m\][\u@docker] \[\033[1;34m\]\w\[\033[0;35m\] \[\033[1;36m\]# \[\033[0m\]" $(RUN_APP_ARGS) sh
35+
docker-compose run $(RUN_APP_ARGS) app sh
3836

3937
clean: ## Remove all dependencies and unimportant files
4038
-rm -Rf ./composer.lock ./vendor ./coverage

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717
"require": {
1818
"php": "^7.2",
1919
"ext-mbstring": "*",
20-
"illuminate/contracts": "^5.5 || ~6.0 || ~7.0",
21-
"illuminate/support": "^5.5 || ~6.0 || ~7.0",
22-
"illuminate/http": "^5.5 || ~6.0 || ~7.0",
23-
"illuminate/routing": "^5.5 || ~6.0 || ~7.0",
24-
"spiral/roadrunner": "~1.7",
20+
"illuminate/contracts": "~6.0 || ~7.0 || ~8.0",
21+
"illuminate/support": "~6.0 || ~7.0 || ~8.0",
22+
"illuminate/http": "~6.0 || ~7.0 || ~8.0",
23+
"illuminate/routing": "~6.0 || ~7.0 || ~8.0",
24+
"spiral/roadrunner": "~1.8",
2525
"symfony/psr-http-message-bridge": "^1.2 || ^2.0",
2626
"laminas/laminas-diactoros": "^2"
2727
},
2828
"require-dev": {
2929
"ext-pdo": "*",
3030
"ext-pdo_sqlite": "*",
3131
"ext-sqlite3": "*",
32-
"laravel/laravel": "^5.5 || ~6.0 || ~7.0",
33-
"mockery/mockery": "^1.3",
32+
"laravel/laravel": "~6.0 || ~7.0 || ~8.0",
33+
"mockery/mockery": "^1.3.1",
3434
"phpstan/phpstan": "~0.12",
35-
"phpunit/phpunit": "^6.4 || ~7.5",
35+
"phpunit/phpunit": "^8.0 || ^9.3",
3636
"spiral/code-style": "^1.0"
3737
},
3838
"autoload": {

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ services:
88
build:
99
context: .
1010
dockerfile: Dockerfile
11+
environment:
12+
PS1: '\[\033[1;32m\]\[\033[1;36m\][\u@docker] \[\033[1;34m\]\w\[\033[0;35m\] \[\033[1;36m\]# \[\033[0m\]'
1113
volumes:
1214
- /etc/passwd:/etc/passwd:ro
1315
- /etc/group:/etc/group:ro

tests/WorkerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public function testWorkerErrorHandling(): void
259259
->shouldReceive('error')
260260
->once()
261261
->withArgs(function ($error_text) use ($exception_message): bool {
262-
$this->assertContains($exception_message, $error_text);
262+
$this->assertStringContainsString($exception_message, $error_text);
263263

264264
return true;
265265
})
@@ -327,7 +327,7 @@ public function testWorkerErrorHandlingWithMaskedException(): void
327327
->shouldReceive('error')
328328
->once()
329329
->withArgs(function ($error_text): bool {
330-
$this->assertContains('Internal server error', $error_text);
330+
$this->assertStringContainsString('Internal server error', $error_text);
331331

332332
return true;
333333
})
@@ -434,7 +434,7 @@ public function test404errorResponse(): void
434434
->withArgs(function (ResponseInterface $response): bool {
435435
$this->assertSame(404, $response->getStatusCode());
436436
$this->assertNotEmpty($response->getHeaders());
437-
$this->assertContains('<html', Str::lower((string) $response->getBody()));
437+
$this->assertStringContainsString('<html', Str::lower((string) $response->getBody()));
438438

439439
return true;
440440
})
@@ -503,7 +503,7 @@ private function getHtmlResponseValidationClosure(): callable
503503
// Validate application response
504504
$this->assertSame(200, $response->getStatusCode());
505505
$this->assertNotEmpty($response->getHeaders());
506-
$this->assertContains('<html', Str::lower((string) $response->getBody()));
506+
$this->assertStringContainsString('<html', Str::lower((string) $response->getBody()));
507507

508508
return true;
509509
};

0 commit comments

Comments
 (0)