Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Laravel 11 support #100

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes
args: --config=.php-cs-fixer.php --allow-risky=yes

- name: Extract branch name
shell: bash
Expand Down
39 changes: 8 additions & 31 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: run-tests

on: [push, pull_request]
on:
- push
- pull_request

jobs:
test:
Expand All @@ -9,41 +11,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.2, 8.0, 7.4, 7.3, 8.1]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*]
php: [8.1, 8.2]
laravel: [10.*, 11.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*
- laravel: 6.*
testbench: 4.*
exclude:
- laravel: 10.*
php: 8.0
- laravel: 10.*
php: 7.4
- laravel: 10.*
php: 7.3
- laravel: 9.*
php: 7.4
- laravel: 9.*
php: 7.3
- laravel: 7.*
php: 8.2
- laravel: 7.*
php: 8.1
- laravel: 6.*
php: 8.2
- laravel: 8.*
php: 8.2
dependency-version: prefer-lowest
- laravel: 6.*
- laravel: 11.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
Expand Down
8 changes: 5 additions & 3 deletions .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
->ignoreDotFiles(true)
->ignoreVCS(true);

return PhpCsFixer\Config::create()
$config = new PhpCsFixer\Config();

return $config
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
],
"require": {
"php": "^7.3|^8.0",
"illuminate/support": "^6.18|^7.0|^8.0|^9.0|^10.0",
"spatie/server-side-rendering": "^0.3"
"illuminate/support": "^10.0|^11.0",
"spatie/server-side-rendering": "dev-main"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0"
"phpunit/phpunit": "^9.0|^10.0",
"orchestra/testbench": "^8.0|^9.0"
},
"autoload": {
"psr-4": {
Expand Down
33 changes: 16 additions & 17 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
<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">
<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false">
<testsuites>
<testsuite name="Spatie Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/NodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function setUp(): void
{
parent::setUp();

$this->app->instance('path.public', __DIR__.'/public');
$this->app->usePublicPath(__DIR__.'/public');
}

protected function getPackageProviders($app)
Expand Down
Loading