Skip to content

Commit c31fb16

Browse files
authored
Laravel 11 Update
Laravel 11 Update
1 parent c9e945e commit c31fb16

13 files changed

+163
-127
lines changed

.github/ISSUE_TEMPLATE/bug.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Bug Report
2+
description: Report an Issue or Bug with the Package
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: What did you expect to happen?
15+
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
16+
validations:
17+
required: true
18+
19+
- type: input
20+
id: package-version
21+
attributes:
22+
label: Package Version
23+
description: What version of our Package are you running? Please be as specific as possible
24+
placeholder: 2.0.0
25+
validations:
26+
required: true
27+
- type: input
28+
id: php-version
29+
attributes:
30+
label: PHP Version
31+
description: What version of PHP are you running? Please be as specific as possible
32+
placeholder: 8.2.0
33+
validations:
34+
required: true
35+
- type: input
36+
id: laravel-version
37+
attributes:
38+
label: Laravel Version
39+
description: What version of Laravel are you running? Please be as specific as possible
40+
placeholder: 9.0.0
41+
validations:
42+
required: true
43+
- type: dropdown
44+
id: operating-systems
45+
attributes:
46+
label: Which operating systems does with happen with?
47+
description: You may select more than one.
48+
multiple: true
49+
options:
50+
- macOS
51+
- Windows
52+
- Linux
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Fix PHP code style issues
2+
3+
on: [push]
4+
5+
jobs:
6+
php-code-styling:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- name: Fix PHP code style issues
16+
uses: aglipanci/[email protected]
17+
18+
- name: Commit changes
19+
uses: stefanzweifel/git-auto-commit-action@v5
20+
with:
21+
commit_message: Fix styling

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

-29
This file was deleted.

.github/workflows/run-tests.yml

+35-36
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,59 @@
11
name: run-tests
22

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

59
jobs:
610
test:
711
runs-on: ${{ matrix.os }}
812
strategy:
913
fail-fast: true
14+
max-parallel: 1
1015
matrix:
11-
os: [ubuntu-latest]
12-
php: [7.2, 7.3, 7.4, 8.0]
13-
laravel: [6, 7, 8]
14-
dependency-version: [prefer-lowest, prefer-stable]
16+
os: [ ubuntu-latest, windows-latest ]
17+
php: [ 8.2, 8.3 ]
18+
laravel: [ 11.* ]
19+
stability: [ prefer-lowest, prefer-stable ]
1520
include:
16-
- laravel: 8
17-
testbench: 6.*
18-
- laravel: 7
19-
testbench: 5.*
20-
- laravel: 6
21-
testbench: 4.*
22-
exclude:
23-
- laravel: 6
24-
php: 8.0
25-
- laravel: 7
26-
php: 8.0
27-
- laravel: 8
28-
php: 7.2
29-
- laravel: 8
30-
php: 7.3
31-
- laravel: 8
32-
php: 8.0
33-
dependency-version: prefer-lowest
34-
35-
name: P${{ matrix.php }} - L${{ matrix.laravel }}.* - ${{ matrix.dependency-version }} - ${{ matrix.os }}
21+
- laravel: 11.*
22+
testbench: 9.*
23+
24+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3625

3726
steps:
3827
- name: Checkout code
39-
uses: actions/checkout@v2
40-
41-
- name: Cache dependencies
42-
uses: actions/cache@v2
43-
with:
44-
path: ~/.composer/cache/files
45-
key: dependencies-laravel-${{ matrix.laravel }}.*-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
28+
uses: actions/checkout@v3
4629

4730
- name: Setup PHP
4831
uses: shivammathur/setup-php@v2
4932
with:
5033
php-version: ${{ matrix.php }}
51-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
52-
coverage: pcov
34+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
35+
coverage: xdebug
36+
37+
- name: Setup problem matchers
38+
run: |
39+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
40+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
5341
5442
- name: Install dependencies
5543
run: |
56-
composer require "laravel/framework:${{ matrix.laravel }}.*" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
57-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
44+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
45+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
46+
47+
- name: Set phpunit.xml
48+
run: cp phpunit.xml.dist phpunit.xml
5849

5950
- name: Execute tests
6051
run: vendor/bin/phpunit
52+
53+
- name: Store test reports
54+
uses: actions/upload-artifact@v2
55+
with:
56+
name: Store report
57+
retention-days: 1
58+
path: |
59+
./reports

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
.idea
33
.phpunit.result.cache
4+
.phpunit.cache
45
build
56
composer.lock
67
coverage

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ using Prerender.io since the response always goes through your server.
2929
3030
## 🛠 Requirements
3131

32-
- PHP: `^7.2`
33-
- Laravel: `^6`
34-
- Prerender.io access
32+
33+
| Package | PHP | Laravel | Prerender.io access |
34+
|:-------:|:-----------:|:-------:|:-------------------:|
35+
| main | ^8.2 - ^8.3 | 11.x ||
36+
| v3.3.0 | ^8.1 - ^8.3 | 10.x ||
37+
| v3.2.0 | ^8.0 - ^8.2 | 9.x ||
38+
| v3.1.1 | ^7.3 - ^8.1 | 8.x ||
39+
3540

3641
## ⚙️ Installation
3742

composer.json

+11-8
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
}
2929
],
3030
"require": {
31-
"php": ">=7.2",
32-
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
33-
"guzzlehttp/guzzle": "^6.0|^7.0",
34-
"symfony/psr-http-message-bridge": "^1.3|^2.0"
31+
"php": "^8.2|^8.3",
32+
"guzzlehttp/guzzle": "^7.8",
33+
"illuminate/support": "^11.0",
34+
"symfony/psr-http-message-bridge": "^7.0"
3535
},
3636
"require-dev": {
37-
"friendsofphp/php-cs-fixer": "3.0.0",
38-
"orchestra/testbench": "^4.0|^5.0|^6.0",
39-
"phpunit/phpunit": "^8.4|^9.0"
37+
"friendsofphp/php-cs-fixer": "^3.50",
38+
"orchestra/testbench": "^9.0",
39+
"phpunit/phpunit": "^10.5"
4040
},
4141
"autoload": {
4242
"psr-4": {
@@ -54,7 +54,10 @@
5454
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes --config=.php-cs-fixer.dist.php"
5555
},
5656
"config": {
57-
"sort-packages": true
57+
"sort-packages": true,
58+
"allow-plugins": {
59+
"pestphp/pest-plugin": true
60+
}
5861
},
5962
"extra": {
6063
"laravel": {

config/prerender.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
'*.ttf',
133133
'*.otf',
134134
'*.woff',
135-
'*.woff2'
135+
'*.woff2',
136136
],
137137

138138
/*
@@ -178,7 +178,7 @@
178178
'nuzzel',
179179
'Discordbot',
180180
'Google Page Speed',
181-
'Qwantify'
181+
'Qwantify',
182182
],
183183

184184
];

phpunit.xml.dist

+21-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
7-
bootstrap="vendor/autoload.php"
8-
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
12-
processIsolation="false"
13-
stopOnFailure="false"
14-
executionOrder="random"
15-
failOnWarning="true"
16-
failOnRisky="true"
17-
failOnEmptyTestSuite="true"
18-
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
20-
>
21-
<testsuites>
22-
<testsuite name="CodebarAg Test Suite">
23-
<directory>tests</directory>
24-
</testsuite>
25-
</testsuites>
26-
<coverage>
27-
<include>
28-
<directory suffix=".php">./src</directory>
29-
</include>
30-
<report>
31-
<html outputDirectory="build/coverage"/>
32-
<text outputFile="build/coverage.txt"/>
33-
<clover outputFile="build/logs/clover.xml"/>
34-
</report>
35-
</coverage>
36-
<logging>
37-
<junit outputFile="build/report.junit.xml"/>
38-
</logging>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" executionOrder="random" failOnWarning="true" failOnRisky="true" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<testsuites>
4+
<testsuite name="CodebarAg Test Suite">
5+
<directory>tests</directory>
6+
</testsuite>
7+
</testsuites>
8+
<coverage>
9+
<report>
10+
<html outputDirectory="build/coverage"/>
11+
<text outputFile="build/coverage.txt"/>
12+
<clover outputFile="build/logs/clover.xml"/>
13+
</report>
14+
</coverage>
15+
<logging>
16+
<junit outputFile="build/report.junit.xml"/>
17+
</logging>
18+
<source>
19+
<include>
20+
<directory suffix=".php">./src</directory>
21+
</include>
22+
</source>
3923
</phpunit>

src/LaravelPrerenderServiceProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class LaravelPrerenderServiceProvider extends ServiceProvider
1313
public function boot(): void
1414
{
1515
$this->publishes([
16-
__DIR__ . '/../config/prerender.php' => config_path('prerender.php'),
16+
__DIR__.'/../config/prerender.php' => config_path('prerender.php'),
1717
], 'config');
1818

1919
if (config('prerender.enable')) {
@@ -30,7 +30,7 @@ public function boot(): void
3030
public function register(): void
3131
{
3232
$this->mergeConfigFrom(
33-
__DIR__ . '/../config/prerender.php',
33+
__DIR__.'/../config/prerender.php',
3434
'prerender'
3535
);
3636
}

0 commit comments

Comments
 (0)