Fix: Convert to silverstripe-module with PSR-4 autoload; add SS6 support - #1
Open
elliot-sawyer wants to merge 1 commit into
Open
Fix: Convert to silverstripe-module with PSR-4 autoload; add SS6 support#1elliot-sawyer wants to merge 1 commit into
elliot-sawyer wants to merge 1 commit into
Conversation
- Change type from silverstripe-recipe to silverstripe-module so ClassManifest discovers Cashware\Bootswatcher classes in consuming projects - Move class files from app/src/Extensions/ and app/src/Tasks/ to app/src/ to match the flat Cashware\Bootswatcher namespace under PSR-4 - Add autoload.psr-4 mapping so Composer can resolve the extension class - Broaden silverstripe/cms require to ^5 || ^6 for SS6 compatibility - Remove project-files-installed/public-files-installed (recipe-only concepts) - Update README with composer require installation steps and theme config Co-Authored-By: Iris <positronic.iris@gmail.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.
Problem
The module was typed as
silverstripe-recipe, which means:app/src/Cashware\Bootswatcher\SiteConfigThemecan't be discovered by consuming projectsThemecolumn is never added toSiteConfigsilverstripe/recipe-cms: 5.0.0hard-pins SS5)Changes
typefromsilverstripe-recipetosilverstripe-moduleapp/src/Extensions/andapp/src/Tasks/toapp/src/to match the flatCashware\Bootswatchernamespaceautoload.psr-4mapping:"Cashware\\Bootswatcher\\": "app/src/"silverstripe/cmsrequire to^5 || ^6project-files-installed/public-files-installed(recipe-only scaffolding concepts)composer requireinstallation steps and theme config exampleTest plan
composer require elliotsawyer/bootswatcher elliotsawyer/bootswatcher-themein a fresh SS6 projectvendor/bin/sake dev/build flush=allregistersThemecolumn onSiteConfig🤖 Co-authored with Iris