Skip to content

Commit

Permalink
Merge pull request #5881 from spryker/feature/te-3901/master/get-rid-…
Browse files Browse the repository at this point in the history
…of-spryker-spryker-autoload

te-3901 Get rid of spryker/spryker(-shop)/autoload.php
  • Loading branch information
dereuromark committed Oct 2, 2019
2 parents 2df59aa + 51c73d5 commit 9955014
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 169 deletions.
6 changes: 0 additions & 6 deletions Bundles/FlysystemAws3v3FileSystem/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
parameters:
ignoreErrors:
- '#Property .+Aws3v3AdapterBuilder::\$adapter has unknown class League\\Flysystem\\AwsS3v3\\AwsS3Adapter as its type.#'
- '#Property .+Aws3v3AdapterBuilder::\$client has unknown class Aws\\S3\\S3Client as its type.#'
- '#Instantiated class Aws\\S3\\S3Client not found.#'
- '#Instantiated class League\\Flysystem\\AwsS3v3\\AwsS3Adapter not found.#'
- '#Method .+Aws3v3AdapterBuilder::build\(\) should return League\\Flysystem\\AdapterInterface but returns League\\Flysystem\\AwsS3v3\\AwsS3Adapter.#'
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace Spryker\Service\FlysystemAws3v3FileSystem\Exception;

use Exception;

class FlysystemAws3v3FileSystemException extends Exception
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

/**
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
*/

namespace Spryker\Service\FlysystemAws3v3FileSystem\Exception;

class NoBucketException extends FlysystemAws3v3FileSystemException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Aws\S3\S3Client;
use Generated\Shared\Transfer\FlysystemConfigAws3v3Transfer;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use Spryker\Service\FlysystemAws3v3FileSystem\Exception\NoBucketException;

class Aws3v3AdapterBuilder implements AdapterBuilderInterface
{
Expand Down Expand Up @@ -72,11 +73,17 @@ protected function buildS3Client()
}

/**
* @throws \Spryker\Service\FlysystemAws3v3FileSystem\Exception\NoBucketException
*
* @return $this
*/
protected function buildAdapter()
{
$this->adapter = new AwsS3Adapter($this->client, $this->adapterConfig->getBucket());
$bucket = $this->adapterConfig->getBucket();
if ($bucket === null) {
throw new NoBucketException('Bucket not set in adapter configuration.');
}
$this->adapter = new AwsS3Adapter($this->client, $bucket);

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion Bundles/Symfony/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"symfony/filesystem": "^3.0.0 || ^4.0.0",
"symfony/finder": "^3.0.0 || ^4.0.0",
"symfony/form": "^3.0.0 || ^4.0.0",
"symfony/http-kernel": "^3.0.0",
"symfony/http-kernel": "^3.0.0 || ^4.0.0",
"symfony/intl": "^3.0.0 || ^4.0.0",
"symfony/options-resolver": "^3.0.0 || ^4.0.0",
"symfony/process": "^3.0.0 || ^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion Bundles/WebProfiler/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"spryker/symfony": "^3.2.0",
"spryker/twig": "^3.4.0",
"spryker/twig-extension": "^1.0.0",
"symfony/web-profiler-bundle": "^3.0.0 || <4.2.9"
"symfony/web-profiler-bundle": "^3.0.0 || ^4.0.0"
},
"require-dev": {
"spryker/code-sniffer": "*",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
- [Spryker Architecture-Sniffer](https://github.com/spryker/architecture-sniffer)
- [Spryker Code-Sniffer](https://github.com/spryker/code-sniffer)
- [Spryker Code-Generator](https://github.com/spryker/code-generator)


133 changes: 0 additions & 133 deletions autoload.php

This file was deleted.

0 comments on commit 9955014

Please sign in to comment.