• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tempestphp / tempest-framework / 14424434409

13 Apr 2025 12:08AM UTC coverage: 80.172% (-1.0%) from 81.217%
14424434409

Pull #1149

github

web-flow
Merge 3b7a05345 into 0c553d46c
Pull Request #1149: feat(storage): add storage component

198 of 432 new or added lines in 22 files covered. (45.83%)

11746 of 14651 relevant lines covered (80.17%)

104.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Tempest/Storage/src/Config/R2StorageConfig.php
1
<?php
2

3
namespace Tempest\Storage\Config;
4

5
use League\Flysystem\AwsS3V3\AwsS3V3Adapter;
6
use League\Flysystem\FilesystemAdapter;
7

8
final class R2StorageConfig implements StorageConfig
9
{
10
    public string $adapter = AwsS3V3Adapter::class;
11

NEW
12
    public function __construct(
×
13
        /**
14
         * Name of the bucket.
15
         */
16
        public string $bucket,
17

18
        /**
19
         * Endpoint to your S3 storage, without the bucket suffix.
20
         */
21
        public string $endpoint,
22

23
        /**
24
         * Access key ID, found in the S3 client compatibility section.
25
         */
26
        public string $accessKeyId,
27

28
        /**
29
         * Secret access key, found in the S3 client compatibility section.
30
         */
31
        public string $secretAccessKey,
32

33
        /**
34
         * If specified, scope operations to that path.
35
         */
36
        public ?string $prefix = null,
37

38
        /**
39
         * Whether the storage is read-only.
40
         */
41
        public bool $readonly = false,
42

43
        /**
44
         * Other options.
45
         */
46
        public array $options = [],
NEW
47
    ) {}
×
48

NEW
49
    public function createAdapter(): FilesystemAdapter
×
50
    {
NEW
51
        return new S3StorageConfig(
×
NEW
52
            bucket: $this->bucket,
×
NEW
53
            region: 'auto',
×
NEW
54
            endpoint: $this->endpoint,
×
NEW
55
            accessKeyId: $this->accessKeyId,
×
NEW
56
            secretAccessKey: $this->secretAccessKey,
×
NEW
57
            sessionToken: null,
×
NEW
58
            prefix: $this->prefix,
×
NEW
59
            readonly: $this->readonly,
×
NEW
60
            usePathStyleEndpoint: true,
×
NEW
61
            options: $this->options,
×
NEW
62
        )->createAdapter();
×
63
    }
64
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc