Skip to content

Refactor plugin from trait to AdapterFactory and add adapter for GCS and R2 - #8

Merged
steinkel merged 10 commits into
CakeDC:2.next-cake5from
flohdez:2.next-cake5
May 28, 2026
Merged

Refactor plugin from trait to AdapterFactory and add adapter for GCS and R2#8
steinkel merged 10 commits into
CakeDC:2.next-cake5from
flohdez:2.next-cake5

Conversation

@flohdez

@flohdez flohdez commented May 22, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@flohdez flohdez changed the title Refactor login from trait to AdapterFactory and add adapter for GCS and R2 Refactor plugin from trait to AdapterFactory and add adapter for GCS and R2 May 22, 2026

@steinkel steinkel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Failing Unit Tests (confirmed locally)

Running vendor/bin/phpunit on this branch produces 7 errors, 9 passing:

5 × GcsAdapterTest — all fail with:

PHPUnit\Framework\MockObject\Generator\UnknownTypeException:
  Class or interface "Google\Cloud\Storage\StorageObject" does not exist

google/cloud-storage is only in suggest, not require-dev, so SDK classes are unavailable after a plain composer install. Fix: move it to require-dev.

2 × R2AdapterTesttestCreatePresignedRequestReturnsPsrRequest and testPresignedUrlReturnsString fail with:

TypeError: Aws\S3\S3Client::__construct(): Argument #1 ($args) must be of type array, null given
  at src/Storage/R2Adapter.php:35

See inline comment [2] for the full explanation.

Comment thread src/Controller/FilesController.php Outdated
Comment thread tests/TestCase/Storage/R2AdapterTest.php
Comment thread src/Model/Table/FilesTable.php Outdated
Comment thread src/Storage/R2Adapter.php Outdated
Comment thread src/Controller/FilesController.php Outdated
Comment thread config/uppy.php Outdated
Comment thread src/Storage/S3Adapter.php Outdated
Comment thread src/Storage/StorageAdapterInterface.php Outdated
@flohdez flohdez removed their assignment May 26, 2026
@flohdez
flohdez requested a review from steinkel May 26, 2026 16:42
@steinkel

Copy link
Copy Markdown
Member

1 minor issue to fix phpcs

@steinkel
steinkel merged commit 31631c4 into CakeDC:2.next-cake5 May 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants