Skip to content

Commit 8f533ae

Browse files
Merge pull request #6 from enflow/laravel10
2 parents 7482a20 + 40317be commit 8f533ae

14 files changed

+140
-114
lines changed

.gitattributes

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
# Path-based git attributes
21
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
32

43
# Ignore all test and documentation with "export-ignore".
5-
/.gitattributes export-ignore
6-
/.gitignore export-ignore
7-
/.travis.yml export-ignore
8-
/phpunit.xml.dist export-ignore
9-
/tests export-ignore
4+
/.editorconfig export-ignore
5+
/.gitattributes export-ignore
6+
/.github export-ignore
7+
/.gitignore export-ignore
8+
/.php-cs-fixer.dist.php export-ignore
9+
/example export-ignore
10+
/phpunit.xml.dist export-ignore
11+
/tests export-ignore
12+
13+
# All test snapshots and text stubs must have LF line endings
14+
tests/**/__snapshots__/** text eol=lf
15+
tests/**/stubs/** text eol=lf
16+
tests/**/stubs/**/*.jpg binary
17+
tests/**/stubs/**/*.png binary

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
labels:
12+
- "dependencies"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: dependabot-auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
14+
- name: Dependabot metadata
15+
id: metadata
16+
uses: dependabot/[email protected]
17+
with:
18+
github-token: "${{ secrets.GITHUB_TOKEN }}"
19+
20+
- name: Auto-merge Dependabot PRs for semver-minor updates
21+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
22+
run: gh pr merge --auto --merge "$PR_URL"
23+
env:
24+
PR_URL: ${{github.event.pull_request.html_url}}
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: Auto-merge Dependabot PRs for semver-patch updates
28+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
29+
run: gh pr merge --auto --merge "$PR_URL"
30+
env:
31+
PR_URL: ${{github.event.pull_request.html_url}}
32+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Fix PHP code style issues
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
jobs:
9+
php-code-styling:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
ref: ${{ github.head_ref }}
17+
18+
- name: Fix PHP code style issues
19+
uses: aglipanci/[email protected]
20+
21+
- name: Commit changes
22+
uses: stefanzweifel/git-auto-commit-action@v4
23+
with:
24+
commit_message: Fix styling

.github/workflows/php-cs-fixer.yml

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

.github/workflows/run-tests.yml

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,50 @@
11
name: run-tests
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
48

59
jobs:
610
test:
711
runs-on: ${{ matrix.os }}
812
strategy:
913
fail-fast: true
1014
matrix:
11-
os: [ubuntu-latest, windows-latest]
12-
php: [8.1]
13-
laravel: [9.*, 8.*]
14-
dependency-version: [prefer-lowest, prefer-stable]
15+
os: [ubuntu-latest]
16+
php: [8.2]
17+
laravel: [10.*]
18+
stability: [prefer-lowest, prefer-stable]
1519
include:
16-
- laravel: 9.*
17-
testbench: 7.*
18-
- laravel: 8.*
19-
testbench: ^6.23
20+
- laravel: 10.*
21+
testbench: 8.*
2022

21-
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
23+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2224

2325
steps:
24-
- name: Checkout code
25-
uses: actions/checkout@v2
26-
27-
- name: Cache dependencies
28-
uses: actions/cache@v2
29-
with:
30-
path: ~/.composer/cache/files
31-
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
32-
33-
- name: Setup PHP
34-
uses: shivammathur/setup-php@v2
35-
with:
36-
php-version: ${{ matrix.php }}
37-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
38-
coverage: none
39-
40-
- name: Install dependencies
41-
run: |
42-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
43-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
44-
- name: Execute tests
45-
run: vendor/bin/phpunit
26+
- name: Checkout code
27+
uses: actions/checkout@v3
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
34+
coverage: none
35+
36+
- name: Setup problem matchers
37+
run: |
38+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
39+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
40+
41+
- name: Install dependencies
42+
run: |
43+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
44+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
45+
46+
- name: List Installed Dependencies
47+
run: composer show -D
48+
49+
- name: Execute tests
50+
run: vendor/bin/phpunit

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
.php-cs-fixer.cache
2-
.phpunit.result.cache
1+
.phpunit.cache
32
composer.lock
3+
coverage
4+
docs
5+
phpunit.xml
6+
psalm.xml
47
vendor

.php-cs-fixer.dist.php

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

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
}
1010
],
1111
"require": {
12-
"php": "^8.1",
12+
"php": "^8.2",
1313
"livewire/livewire": "^2.2"
1414
},
1515
"require-dev": {
16-
"orchestra/testbench": "^7.0",
17-
"phpunit/phpunit": "^9.5",
18-
"rcrowe/twigbridge": "^0.13.1",
19-
"friendsofphp/php-cs-fixer": "^3.2"
16+
"laravel/pint": "^1.0",
17+
"orchestra/testbench": "^8.0",
18+
"phpunit/phpunit": "^10.0",
19+
"rcrowe/twigbridge": "^0.14.1"
2020
},
2121
"suggest": {
2222
"rcrowe/twigbridge": "For adding Twig support to your Laravel application"
@@ -42,7 +42,7 @@
4242
}
4343
},
4444
"scripts": {
45-
"test": "vendor/bin/phpunit",
46-
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
45+
"format": "vendor/bin/pint",
46+
"test": "vendor/bin/phpunit"
4747
}
4848
}

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
33
<coverage>
44
<include>
55
<directory suffix=".php">src/</directory>

0 commit comments

Comments
 (0)