Skip to content

Commit

Permalink
[develop] Adds Laravel 11 support (#1614) (#1635)
Browse files Browse the repository at this point in the history
* Adds L11 support

* Re-adds phpstan

* Allows Symfony Kernel 7.0

* Adds L11 to CI

* Uses only PHPUnit 10

* Re-adds testbench 8.18
  • Loading branch information
nunomaduro committed Jan 16, 2024
1 parent fbfe53d commit ecb3dc7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
fail-fast: true
matrix:
php: [8.1, 8.2, 8.3]
laravel: [10]
laravel: [10, 11]
exclude:
- php: 8.1
laravel: 11

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}

Expand All @@ -40,6 +43,6 @@ jobs:
composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/phpunit --verbose
run: vendor/bin/phpunit
env:
STRIPE_SECRET: ${{ secrets.STRIPE_SECRET }}
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@
"require": {
"php": "^8.1",
"ext-json": "*",
"illuminate/console": "^10.0",
"illuminate/contracts": "^10.0",
"illuminate/database": "^10.0",
"illuminate/http": "^10.0",
"illuminate/log": "^10.0",
"illuminate/notifications": "^10.0",
"illuminate/pagination": "^10.0",
"illuminate/routing": "^10.0",
"illuminate/support": "^10.0",
"illuminate/view": "^10.0",
"illuminate/console": "^10.0|^11.0",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/database": "^10.0|^11.0",
"illuminate/http": "^10.0|^11.0",
"illuminate/log": "^10.0|^11.0",
"illuminate/notifications": "^10.0|^11.0",
"illuminate/pagination": "^10.0|^11.0",
"illuminate/routing": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"illuminate/view": "^10.0|^11.0",
"moneyphp/money": "^4.0",
"nesbot/carbon": "^2.0",
"stripe/stripe-php": "^13.0",
"symfony/http-kernel": "^6.0",
"symfony/http-kernel": "^6.0|^7.0",
"symfony/polyfill-intl-icu": "^1.22.1"
},
"require-dev": {
"dompdf/dompdf": "^2.0",
"mockery/mockery": "^1.0",
"orchestra/testbench": "^8.14",
"orchestra/testbench": "^8.18|^9.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.0"
"phpunit/phpunit": "^10.4"
},
"suggest": {
"ext-intl": "Allows for more locales besides the default \"en\" when formatting money values.",
Expand Down
12 changes: 1 addition & 11 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
<phpunit colors="true">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
Expand Down
6 changes: 5 additions & 1 deletion src/CashierServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ protected function registerPublishing()
__DIR__.'/../config/cashier.php' => $this->app->configPath('cashier.php'),
], 'cashier-config');

$this->publishes([
$publishesMigrationsMethod = method_exists($this, 'publishesMigrations')
? 'publishesMigrations'
: 'publishes';

$this->{$publishesMigrationsMethod}([
__DIR__.'/../database/migrations' => $this->app->databasePath('migrations'),
], 'cashier-migrations');

Expand Down

0 comments on commit ecb3dc7

Please sign in to comment.