Skip to content

Commit

Permalink
Merge pull request #23 from biigle/laravel-11
Browse files Browse the repository at this point in the history
Implement compatibility with Laravel 11
  • Loading branch information
mzur authored Jul 12, 2024
2 parents 9881936 + 3de0126 commit d86edcf
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
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

0 comments on commit d86edcf

Please sign in to comment.