Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flysystem_s3
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
flysystem_s3
Merge requests
!1
Issue
#3182941
: Stop assuming a request always exists
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3182941
: Stop assuming a request always exists
issue/flysystem_s3-3182941:3182941-error-when-using
into
8.x-1.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Dieter Holvoet
requested to merge
issue/flysystem_s3-3182941:3182941-error-when-using
into
8.x-1.x
4 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#3182941
0
0
Merge request reports
Compare
8.x-1.x
8.x-1.x (base)
and
latest version
latest version
851e3290
1 commit,
4 years ago
1 file
+
7
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Flysystem/S3.php
+
7
−
5
Options
@@ -159,12 +159,14 @@ class S3 implements FlysystemPluginInterface, ContainerFactoryPluginInterface {
* The Flysystem configuration.
*/
public
static
function
mergeConfiguration
(
ContainerInterface
$container
,
array
$configuration
)
{
$protocol
=
$container
->
get
(
'request_stack'
)
->
getCurrentRequest
()
->
getScheme
();
$request
=
$container
->
get
(
'request_stack'
)
->
getCurrentRequest
();
return
$configuration
+=
[
'protocol'
=>
$protocol
,
if
(
$request
&&
!
isset
(
$configuration
[
'protocol'
]))
{
$configuration
[
'protocol'
]
=
$request
->
getScheme
();
}
return
$configuration
+
[
'region'
=>
'us-east-1'
,
'endpoint'
=>
NULL
,
];
Loading