Skip to content

Commit

Permalink
Merge pull request #69 from mbabker/laravel-9-support
Browse files Browse the repository at this point in the history
Add support for Laravel 9
  • Loading branch information
freekmurze authored Feb 9, 2022
2 parents 46dc162 + 2636d88 commit 2ecf96e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
php: [8.1, 8.0]
laravel: [8.*, 9.*]
laravel: [9.*, 8.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"require": {
"php": "^8.0",
"ext-json": "*",
"illuminate/contracts": "^8.71",
"illuminate/filesystem": "^8.71",
"illuminate/support": "^8.71",
"league/commonmark": "^1.0",
"illuminate/contracts": "^8.71|^9.0",
"illuminate/filesystem": "^8.71|^9.0",
"illuminate/support": "^8.71|^9.0",
"league/commonmark": "^1.0|^2.0",
"spatie/yaml-front-matter": "^2.0",
"symfony/yaml": "^4.0|^5.0"
"symfony/yaml": "^4.0|^5.0|^6.0"
},
"require-dev": {
"league/flysystem": "^1.0.8",
"orchestra/testbench": "^6.23",
"league/flysystem": "^1.0.8|^3.0",
"orchestra/testbench": "^6.23|^7.0",
"phpunit/phpunit": "^9.4"
},
"config": {
Expand Down
9 changes: 7 additions & 2 deletions tests/Concerns/UsesFilesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@
use Illuminate\Filesystem\FilesystemAdapter;
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem as Flysystem;
use League\Flysystem\Local\LocalFilesystemAdapter;

trait UsesFilesystem
{
protected function createFilesystem(): FilesystemManagerContract
{
$adapter = new Local(__DIR__.'/../fixtures/content');
if (class_exists(LocalFilesystemAdapter::class)) {
$adapter = new LocalFilesystemAdapter(__DIR__.'/../fixtures/content');
} else {
$adapter = new Local(__DIR__.'/../fixtures/content');
}

$flysystem = new Flysystem($adapter);

$adapter = new FilesystemAdapter($flysystem);
$adapter = new FilesystemAdapter($flysystem, $adapter);

return new class($adapter) implements FilesystemManagerContract {
private $adapter;
Expand Down

0 comments on commit 2ecf96e

Please sign in to comment.