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

Implement compatibility with Laravel 11 #23

Merged
merged 3 commits into from
Jul 12, 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
9 changes: 5 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
php-versions: ['8.1', '8.2']
laravel-versions: ['^9.0', '^10.0']
php-version: ['8.2']
laravel-version: ['^11.0']

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ matrix.php-version }}

- name: Setup Laravel
run: composer require -W --dev laravel/laravel:${{ matrix.laravel-versions }}
run: composer require -W --dev laravel/laravel:${{ matrix.laravel-version }}

- name: Run tests
run: ./vendor/bin/phpunit
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor/
.phpunit.result.cache
composer.lock
.phpunit.cache
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"type": "library",
"license": "MIT",
"require": {
"illuminate/console": "^9.0 || ^10.0",
"illuminate/filesystem": "^9.0 || ^10.0",
"illuminate/support": "^9.0 || ^10.0",
"symfony/finder": "^6.0",
"illuminate/console": "^11.0",
"illuminate/filesystem": "^11.0",
"illuminate/support": "^11.0",
"symfony/finder": "^7.0",
"guzzlehttp/guzzle": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^10.0",
"mockery/mockery": "^1.2",
"laravel/laravel": "^9.0 || ^10.0"
"laravel/laravel": "^11.0"
},
"authors": [
{
Expand Down
12 changes: 6 additions & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" forceCoversAnnotation="false" beStrictAboutCoversAnnotation="false" beStrictAboutOutputDuringTests="true" beStrictAboutTodoAnnotatedTests="true" verbose="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" beStrictAboutOutputDuringTests="true" cacheDirectory=".phpunit.cache" requireCoverageMetadata="false" beStrictAboutCoverageMetadata="false">
<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>
</phpunit>
4 changes: 2 additions & 2 deletions tests/FileCacheServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class FileCacheServiceProviderTest extends TestCase
public function testScheduledCommand()
{
config(['file-cache.prune_interval' => '*/5 * * * *']);
$schedule = $this->app[Schedule::class];
$event = $schedule->events()[0];
$events = $this->app[Schedule::class]->events();
$event = end($events);
$this->assertStringContainsString('prune-file-cache', $event->command);
$this->assertEquals('*/5 * * * *', $event->expression);
}
Expand Down
Loading