Skip to content

Unable to override filesystem disks #59261

@browner12

Description

@browner12

Laravel Version

13.0.0

PHP Version

8.5

Database Driver & Version

N/A

Description

I'm honestly not sure if this is a bug or a feature, as the configuration documentation doesn't really talk much about how our application level /config values interact with the vendor /config directory. During the upgrade to v13, I'm getting an error of "The [private] disk conflicts with the [local] disk at [/storage]. Each served disk must have a unique URL." This exception was introduced by #58960. I have no issue with the exception being thrown, but it did alert me to the fact there are disks being registered in my application that I knew nothing about.

My own application config registers 3 disks: "private", "internal", and "public". However, when I dump the config value of registered disks, I also get "local" and "s3". I can see these disks are coming from the vendor config file, so it seems clear the framework is merging these values. I know the question of overwriting vs merging config values is a larger scope question, but it seems odd to me that I am unable to explicitly define the only disks I want registered in my application.

I realize I can update the URL of my conflicting disks, but it also seems odd to be registering disks the user doesn't want registered in their system.

Steps To Reproduce

Create a custom filesystem disk with the following config values:

'private' => [
    'driver' => 'local',
    'root'   => storage_path('app/private'),
    'serve'  => true,
    'throw'  => false,
    'report' => false,
],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions