Skip to content

Commit 47b36f8

Browse files
authored
Merge pull request #11 from TappNetwork/updates_for_laravel9
Updates for Laravel 9
2 parents d04a73a + 65c84f0 commit 47b36f8

File tree

5 files changed

+24
-21
lines changed

5 files changed

+24
-21
lines changed

README.md

-18
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,6 @@ Upload large files directly to [AWS S3](https://aws.amazon.com/s3/) using [Larav
2121
composer require tapp/laravel-uppy-s3-multipart-upload
2222
```
2323

24-
**Heads up!**
25-
26-
If you are using a fresh Laravel installation with its latest version, it uses PSR-7 version 2, and currently, the AWS SDK for PHP is incompatible with this version.
27-
28-
Please follow this issue for updates: https://github.com/aws/aws-sdk-php/issues/2264
29-
30-
In the meantime, to install this package in a fresh Laravel app, use the `--update-with-dependencies` option:
31-
32-
```bash
33-
$ composer require tapp/laravel-uppy-s3-multipart-upload --update-with-dependencies
34-
```
35-
36-
Also, to install the Flysystem S3 adapter:
37-
38-
```bash
39-
$ composer require league/flysystem-aws-s3-v3:"^1.0"
40-
```
41-
4224
### Add required JS libraries
4325

4426
Add on your `package.json` file the Uppy JS libraries and AlpineJS library:

composer.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@
1616
],
1717
"require": {
1818
"php": "^7.4|^8.0",
19-
"aws/aws-sdk-php": "^3.171",
19+
"league/flysystem-aws-s3-v3": "^3.0",
2020
"spatie/laravel-package-tools": "^1.1",
2121
"illuminate/contracts": "^8.0|^9.0"
2222
},
2323
"require-dev": {
2424
"orchestra/testbench": "^6.0|^7.0",
25+
"phpstan/extension-installer": "^1.1",
26+
"phpstan/phpstan-deprecation-rules": "^1.0",
27+
"phpstan/phpstan-phpunit": "^1.0",
2528
"phpunit/phpunit": "^9.3",
2629
"spatie/laravel-ray": "^1.9",
2730
"vimeo/psalm": "^4.4"
@@ -43,7 +46,10 @@
4346
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
4447
},
4548
"config": {
46-
"sort-packages": true
49+
"sort-packages": true,
50+
"allow-plugins": {
51+
"phpstan/extension-installer": true
52+
}
4753
},
4854
"extra": {
4955
"laravel": {

phpstan-baseline.neon

Whitespace-only changes.

phpstan.neon.dist

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
includes:
2+
- phpstan-baseline.neon
3+
4+
parameters:
5+
level: 2
6+
paths:
7+
- src
8+
- config
9+
tmpDir: build/phpstan
10+
excludePaths:
11+
- ./vendor
12+
checkMissingIterableValueType: true
13+
ignoreErrors:
14+
- '#Call to an undefined method Illuminate\\Contracts\\Filesystem\\Filesystem::getClient\(\).#'
15+
- '#Call to an undefined method Throwable::getStatusCode\(\).#'

src/Http/Controllers/UppyS3MultipartController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class UppyS3MultipartController extends Controller
1515

1616
public function __construct()
1717
{
18-
$this->client = Storage::disk('s3')->getDriver()->getAdapter()->getClient();
18+
$this->client = Storage::disk('s3')->getClient();
1919

2020
$this->bucket = config('filesystems.disks.s3.bucket');
2121
}

0 commit comments

Comments
 (0)