Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,39 @@ jobs:
composer update -n --prefer-dist
php vendor/bin/phpunit --testsuite=no-optional-deps --exclude-group=without-filesystem-message

test-php81:
docker:
- image: cimg/php:8.1

working_directory: ~/project
steps:
- checkout
- run:
name: Run tests / Symfony 5^0
command: |
rm -Rf var/*
composer update -n --prefer-dist
php vendor/bin/phpunit --testsuite=no-optional-deps --exclude-group=without-filesystem-message

test-php82:
docker:
- image: cimg/php:8.2

working_directory: ~/project
steps:
- checkout
- run:
name: Run tests / Symfony 5^0
command: |
rm -Rf var/*
composer update -n --prefer-dist
php vendor/bin/phpunit --testsuite=no-optional-deps --exclude-group=without-filesystem-message
workflows:
version: 2
test:
jobs:
- test-php74
- test-php74-with-filesystem
- test-php80
- test-php81
- test-php82
10 changes: 8 additions & 2 deletions src/Adapter/SymfonyKernelBasedAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static function create(
*/
protected function preload(): PromiseInterface
{
return resolve();
return resolve(null);
}

/**
Expand Down Expand Up @@ -293,7 +293,7 @@ private function toSymfonyUploadedFile(PsrUploadedFile $file): PromiseInterface
->file($tmpFilename)
->putContents($content)
)
: resolve();
: resolve(null);

return $promise
->then(function () use ($file, $tmpFilename, $filename) {
Expand All @@ -316,6 +316,12 @@ private function cleanTemporaryUploadedFiles(Request $request): array
{
return array_map(function (SymfonyUploadedFile $file) {
$filePath = $file->getPath().'/'.$file->getFilename();
if (
$file->getError() !== 0 ||
$filePath === '/'
) {
return resolve(null);
}

return (is_null($this->filesystem))
? resolve(unlink($filePath))
Expand Down
2 changes: 1 addition & 1 deletion tests/FakeLaminasKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function getStaticFolder(): ? string
*/
public function shutDown(): PromiseInterface
{
return resolve();
return resolve(null);
}

/**
Expand Down