Fix/classmap Autoloading#1
Merged
Merged
Conversation
WordPress-style class-hyphenated-name.php filenames do not comply with PSR-4, causing Composer to skip all four plugin classes during autoload generation. classmap scans files and maps classes regardless of filename. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch resolves a classmap autoloading issue in the Waygate plugin and establishes foundational developer documentation for AI-assisted contributions. The autoloader was switched from PSR-4 to classmap in
composer.json, which corrects class resolution failures that arose from the plugin's file naming convention (class-*.php) not aligning with PSR-4's strict file-to-class-name mapping requirements. Alongside the fix, aCLAUDE.mdfile was introduced to document project architecture, commands, and contribution conventions for Claude Code sessions. The changelog was updated to record these changes under v0.3.0.Autoloader Fix:
composer.jsonwith a classmap entry targeting theincludes/directory, ensuring allclass-*.phpfiles are correctly discovered regardless of naming convention.Developer Documentation:
CLAUDE.mdwith comprehensive guidance covering project overview, required commands (Composer, PHPUnit, PHPCS, PHP lint), class responsibilities, initialization order, and external dependencies.CLAUDE.mdto clarify how to group and split commits by logical change, using the v0.3.0 patch itself as a worked example.Repository Hygiene:
.gitignoreto exclude the PR creation shell script, preventing ephemeral tooling files from being tracked in version history.CHANGELOG.mdupdated to document the v0.3.0 release, covering the autoloader fix and documentation additions.Files Changed:
.gitignore(Modified)CHANGELOG.md(Modified)composer.json(Modified)CLAUDE.md(Added)