diff --git a/src/Asset/Service/DownloadServiceInterface.php b/src/Asset/Service/DownloadServiceInterface.php index cf4bf40a..28cafaae 100644 --- a/src/Asset/Service/DownloadServiceInterface.php +++ b/src/Asset/Service/DownloadServiceInterface.php @@ -18,12 +18,8 @@ use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ImageDownloadConfigParameter; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ElementStreamResourceNotFoundException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\EnvironmentException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ForbiddenException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidAssetFormatTypeException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidElementTypeException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\StreamResourceNotFoundException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ThumbnailResizingFailedException; use Pimcore\Model\Asset; use Symfony\Component\HttpFoundation\BinaryFileResponse; diff --git a/src/Export/Controller/Download/DeleteCsvController.php b/src/Export/Controller/Download/DeleteCsvController.php index 0b078f70..9ad74fb6 100644 --- a/src/Export/Controller/Download/DeleteCsvController.php +++ b/src/Export/Controller/Download/DeleteCsvController.php @@ -17,12 +17,12 @@ namespace Pimcore\Bundle\StudioBackendBundle\Export\Controller\Download; use OpenApi\Attributes\Delete; -use Pimcore\Bundle\StudioBackendBundle\Export\Service\DownloadServiceInterface; use Pimcore\Bundle\StudioBackendBundle\Controller\AbstractApiController; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\EnvironmentException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ForbiddenException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException; use Pimcore\Bundle\StudioBackendBundle\Export\Csv\CsvExportService; +use Pimcore\Bundle\StudioBackendBundle\Export\Service\DownloadServiceInterface; use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Parameter\Path\IdParameter; use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\DefaultResponses; use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\SuccessResponse; diff --git a/src/Export/Controller/Download/DownloadCsvController.php b/src/Export/Controller/Download/DownloadCsvController.php index 59ad9d4f..555e578b 100644 --- a/src/Export/Controller/Download/DownloadCsvController.php +++ b/src/Export/Controller/Download/DownloadCsvController.php @@ -18,13 +18,13 @@ use OpenApi\Attributes\Get; use Pimcore\Bundle\StudioBackendBundle\Asset\Attribute\Response\Header\ContentDisposition; -use Pimcore\Bundle\StudioBackendBundle\Export\Service\DownloadServiceInterface; use Pimcore\Bundle\StudioBackendBundle\Controller\AbstractApiController; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\EnvironmentException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ForbiddenException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\StreamResourceNotFoundException; use Pimcore\Bundle\StudioBackendBundle\Export\Csv\CsvExportService; +use Pimcore\Bundle\StudioBackendBundle\Export\Service\DownloadServiceInterface; use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Parameter\Path\IdParameter; use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\Content\MediaType; use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\DefaultResponses; diff --git a/src/Export/Service/DownloadService.php b/src/Export/Service/DownloadService.php index 5a125c48..c268b105 100644 --- a/src/Export/Service/DownloadService.php +++ b/src/Export/Service/DownloadService.php @@ -16,31 +16,17 @@ namespace Pimcore\Bundle\StudioBackendBundle\Export\Service; -use Exception; use League\Flysystem\FilesystemException; use League\Flysystem\FilesystemOperator; -use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ImageDownloadConfigParameter; use Pimcore\Bundle\StudioBackendBundle\Element\Service\StorageServiceInterface; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ElementStreamResourceNotFoundException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\EnvironmentException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ForbiddenException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidAssetFormatTypeException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidElementTypeException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidThumbnailException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\StreamResourceNotFoundException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ThumbnailResizingFailedException; use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Service\ExecutionEngineServiceInterface; -use Pimcore\Bundle\StudioBackendBundle\Util\Constant\Asset\FormatTypes; -use Pimcore\Bundle\StudioBackendBundle\Util\Constant\HttpResponseHeaders; use Pimcore\Bundle\StudioBackendBundle\Util\Trait\StreamedResponseTrait; use Pimcore\Bundle\StudioBackendBundle\Util\Trait\TempFilePathTrait; -use Pimcore\Model\Asset; -use Pimcore\Model\Asset\Image; -use Pimcore\Model\Element\ElementInterface; -use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\StreamedResponse; -use function in_array; use function sprintf; /** diff --git a/src/Export/Service/DownloadServiceInterface.php b/src/Export/Service/DownloadServiceInterface.php index 9fb37368..4c38fe5c 100644 --- a/src/Export/Service/DownloadServiceInterface.php +++ b/src/Export/Service/DownloadServiceInterface.php @@ -16,17 +16,10 @@ namespace Pimcore\Bundle\StudioBackendBundle\Export\Service; -use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ImageDownloadConfigParameter; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ElementStreamResourceNotFoundException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\EnvironmentException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ForbiddenException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidAssetFormatTypeException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\InvalidElementTypeException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\NotFoundException; use Pimcore\Bundle\StudioBackendBundle\Exception\Api\StreamResourceNotFoundException; -use Pimcore\Bundle\StudioBackendBundle\Exception\Api\ThumbnailResizingFailedException; -use Pimcore\Model\Asset; -use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\StreamedResponse; /** @@ -34,7 +27,6 @@ */ interface DownloadServiceInterface { - /** * @throws EnvironmentException|ForbiddenException|NotFoundException|StreamResourceNotFoundException */