Skip to content

Commit fbb7460

Browse files
committed
Upgrade
1 parent 561bc56 commit fbb7460

File tree

14 files changed

+114
-135
lines changed

14 files changed

+114
-135
lines changed

.gitattributes

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
33

44
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/docker export-ignore
7+
/tests export-ignore
8+
/.coveralls.yml export-ignore
9+
/.editorconfig export-ignore
510
/.gitattributes export-ignore
611
/.gitignore export-ignore
7-
/.travis.yml export-ignore
12+
/docker-compose.yml export-ignore
13+
/Makefile export-ignore
14+
/phpstan.neon export-ignore
815
/phpunit.xml.dist export-ignore
9-
/.scrutinizer.yml export-ignore
10-
/tests export-ignore
11-
/.editorconfig export-ignore
16+
/pint.json export-ignore

.github/workflows/run-fix-code-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535

3636
- uses: stefanzweifel/git-auto-commit-action@v4
3737
with:
38-
commit_message: composer fix-style
38+
commit_message: composer pint

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
composer.lock
22
vendor
33
build
4-
.phpunit.cache
5-
.php_cs.cache
6-
.php_cs.tests.cache
4+
.phpunit.result.cache
5+
phpunit.xml

.php_cs.common.php

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

.php_cs.dist

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

.php_cs.tests.php

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

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
setup:
2+
@test -s phpunit.xml || cp phpunit.xml.dist phpunit.xml
3+
@docker-compose run --rm app composer install
4+
5+
destroy:
6+
@docker-compose down --remove-orphans --volumes
7+
8+
app:
9+
@docker-compose run --rm app sh
10+
11+
test:
12+
@docker-compose run --rm app sh -c "php ./vendor/bin/phpunit"

composer.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@
2323
"illuminate/database": "^9.0 || ^10.0 || ^11.0"
2424
},
2525
"require-dev": {
26-
"friendsofphp/php-cs-fixer": "^2.18",
27-
"nunomaduro/larastan": "^0.7.2",
28-
"orchestra/testbench": "^6.7",
29-
"phpstan/phpstan-mockery": "^0.12.13",
30-
"phpstan/phpstan-phpunit": "^0.12.18",
26+
"larastan/larastan": "^2.9",
27+
"laravel/pint": "^1.20",
28+
"orchestra/testbench": "^7.11",
29+
"phpstan/phpstan-mockery": "^1.1",
30+
"phpstan/phpstan-phpunit": "^1.2",
3131
"phpunit/phpunit": "^9.5",
32-
"thecodingmachine/phpstan-safe-rule": "^1.0"
32+
"thecodingmachine/phpstan-safe-rule": "^1.0",
33+
"rector/rector": "^0.14.8"
3334
},
3435
"autoload": {
3536
"psr-4": {
@@ -52,16 +53,13 @@
5253
}
5354
},
5455
"scripts": {
55-
"analyze": "vendor/phpstan/phpstan/phpstan analyse",
56-
"check-style": [
57-
"php-cs-fixer fix --diff --diff-format=udiff --dry-run",
58-
"php-cs-fixer fix --diff --diff-format=udiff --dry-run --config=.php_cs.tests.php"
56+
"post-autoload-dump": [
57+
"@php ./vendor/bin/testbench package:discover --ansi"
5958
],
6059
"coverage": "vendor/bin/phpunit",
61-
"fix-style": [
62-
"php-cs-fixer fix",
63-
"php-cs-fixer fix --config=.php_cs.tests.php"
64-
],
60+
"phpstan": "vendor/bin/phpstan analyse",
61+
"pint": "vendor/bin/pint",
62+
"rector": "vendor/bin/rector",
6563
"test": "vendor/bin/phpunit --no-coverage"
6664
}
6765
}

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
app:
3+
build: docker
4+
volumes:
5+
- .:/var/www/html

docker/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM php:8.1-cli-alpine
2+
3+
WORKDIR /var/www/html
4+
5+
COPY --from=composer /usr/bin/composer /usr/bin/composer
6+
7+
RUN apk add --no-cache \
8+
icu-libs \
9+
&& apk add --no-cache --virtual .build-deps \
10+
$PHPIZE_DEPS \
11+
icu-dev \
12+
&& docker-php-ext-configure intl \
13+
&& docker-php-ext-install intl \
14+
&& pecl install \
15+
pcov \
16+
&& docker-php-ext-enable \
17+
pcov \
18+
&& apk del .build-deps
19+
20+
COPY conf.d /usr/local/etc/php/conf.d

0 commit comments

Comments
 (0)