Skip to content

Normalize autoload path separators to forward slashes (Unix-like systems compatibility) - #65

Open
IvanCraft623 wants to merge 1 commit into
CortexPE:masterfrom
LatamPMDevs:no-backslashes
Open

Normalize autoload path separators to forward slashes (Unix-like systems compatibility)#65
IvanCraft623 wants to merge 1 commit into
CortexPE:masterfrom
LatamPMDevs:no-backslashes

Conversation

@IvanCraft623

Copy link
Copy Markdown
Contributor

The autoload section in composer.json declares PSR-4 paths using
Windows-style backslashes:

"psr-4": {"CortexPE\\Commando\\": ["src\\CortexPE\\Commando\\"]}

Forward slashes are the standard for autoload paths in composer.json, regardless of the operating system. Using backslashes in path values is non-standard and breaks on Unix-like systems.

The Composer schema documentation for PSR-4 exclusively uses forward slashes in all its examples:

"autoload": {
    "psr-4": {
        "Monolog\\": "src/",
        "Vendor\\Namespace\\": ""
    }
}

This can be seen in a real CI failure caused by this exact issue:
https://github.com/IvanCraft623/RankSystem/actions/runs/30519132597/job/90795453857

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.

1 participant