Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

composer.json autoload causes src dir to be used as fallback directory #284

@petski

Description

@petski

The current composer.json autoload directive causes Bitpay's src directory to be used as fallback autoload directory. This behavior is caused because the "key"-value of autoload/psr-4/* is "". See documentation at https://getcomposer.org/doc/04-schema.md#psr-4 (grep on fallback).

You shouldn't use this project as a fallback directory as it degrades performance of the application in which you use this package.

Easy to be fixed with this patch:

--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
     ],
     "autoload": {
         "psr-4": {
-            "": "src/"
+            "Bitpay\\": "src/"
         }
     },
     "require": {

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