Skip to content

Commit

Permalink
Merge pull request #11 from TappNetwork/updates_for_laravel9
Browse files Browse the repository at this point in the history
Updates for Laravel 9
  • Loading branch information
andreia authored Mar 12, 2022
2 parents d04a73a + 65c84f0 commit 47b36f8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ Upload large files directly to [AWS S3](https://aws.amazon.com/s3/) using [Larav
composer require tapp/laravel-uppy-s3-multipart-upload
```

**Heads up!**

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.

Please follow this issue for updates: https://github.com/aws/aws-sdk-php/issues/2264

In the meantime, to install this package in a fresh Laravel app, use the `--update-with-dependencies` option:

```bash
$ composer require tapp/laravel-uppy-s3-multipart-upload --update-with-dependencies
```

Also, to install the Flysystem S3 adapter:

```bash
$ composer require league/flysystem-aws-s3-v3:"^1.0"
```

### Add required JS libraries

Add on your `package.json` file the Uppy JS libraries and AlpineJS library:
Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
],
"require": {
"php": "^7.4|^8.0",
"aws/aws-sdk-php": "^3.171",
"league/flysystem-aws-s3-v3": "^3.0",
"spatie/laravel-package-tools": "^1.1",
"illuminate/contracts": "^8.0|^9.0"
},
"require-dev": {
"orchestra/testbench": "^6.0|^7.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.3",
"spatie/laravel-ray": "^1.9",
"vimeo/psalm": "^4.4"
Expand All @@ -43,7 +46,10 @@
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"extra": {
"laravel": {
Expand Down
Empty file added phpstan-baseline.neon
Empty file.
15 changes: 15 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
includes:
- phpstan-baseline.neon

parameters:
level: 2
paths:
- src
- config
tmpDir: build/phpstan
excludePaths:
- ./vendor
checkMissingIterableValueType: true
ignoreErrors:
- '#Call to an undefined method Illuminate\\Contracts\\Filesystem\\Filesystem::getClient\(\).#'
- '#Call to an undefined method Throwable::getStatusCode\(\).#'
2 changes: 1 addition & 1 deletion src/Http/Controllers/UppyS3MultipartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class UppyS3MultipartController extends Controller

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

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

0 comments on commit 47b36f8

Please sign in to comment.