Repository navigation
Release 5.1.0 - #7
Merged
Merged
Conversation
- composer: silverstripe/framework ^5 || ^6 (PHP ^8.1), vendor-plugin ^2 || ^3, and restruct/silverstripe-simpler ~0.2 || ^1 so the simpler line matching each major resolves. The previous ~1.0 constraint matched no released simpler version, so no 5.0.x tag could be installed from Packagist. - _config.php: get the editor config through HTMLEditorConfig::get(), which exists on both majors, and only add the plugin/button when it is a TinyMCE config (Shortcodable::is_tinymce_config()). Naming SilverStripe\TinyMCE\TinyMCEConfig directly fataled every boot on Silverstripe 6 without silverstripe/htmleditor-tinymce, which recipe-cms 6 does not include. - config.yml: load simpler's modal through its AdminExtension (simpler_include_modal), as the 4.x line already does; simpler-silverstripe.js alone does not provide simpler.modal. editor_css is declared per TinyMCEConfig class, each guarded by classexists. - suggest silverstripe/htmleditor-tinymce; add the funding property.
placehold.img interpolated its request variables into the SVG unescaped (only txt went through htmlentities). Sizes now accept a positive integer or 100%, colours 3 or 6 hex digits, and invalid values fall back to the default_placeholder config; font and text are escaped for XML. Text is escaped with htmlspecialchars instead of htmlentities, whose named HTML entities are undefined in XML and broke the SVG for any non-ASCII shortcode text. The action now returns its response instead of calling output() itself.
Tests cover shortcode registration with the parser (configured tag and callback, short-name fallbacks), the tag/label maps, the TinyMCE plugin and button on the cms editor, the block-level wrapper rewrite in ShortcodeParserExtension, and the admin/shortcodable endpoints: CMS permission, the dialog form, placeholder resolution and sizing, and the SVG placeholder including regression tests for its parameter escaping. CI builds a host project per Silverstripe major with the module symlinked (tests/ is export-ignore), runs the suite and a consumer-shape database test, and boots the app. It replaces the Silverstripe 3 era .travis.yml.
README: sponsorship line, requirements (including silverstripe/htmleditor-tinymce on Silverstripe 6), installation, the compatibility table for the one-line 5.x, every configuration option with its default, the placeholder image parameters and how to run the tests. Corrects the block-level option name to shortcode_close_parent, which is what the code reads, and points the shortcode docs links at Silverstripe 6. Adds CHANGELOG.md and UPGRADING.md.
placehold.img cast ff and txt to string without checking they were scalar, so ?ff[]=x or ?txt[]=x raised 'Array to string conversion'. A non-scalar value is now invalid input and falls back to the default font and the "<w> x <h>" text, as w/h/bg/fg already did.
txtsize was floor-checked but never capped, so ?txtsize=999999 went into the SVG as-is. It is now capped at default_placeholder.full_height, the tallest canvas the placeholder is ever rendered at, the same way w and h are capped at full_width and full_height.
Only the height cap was covered, so dropping min($w, full_width) went unnoticed.
Asserts editor_css on the TinyMCEConfig class this Silverstripe major provides includes the module's editor.css (the entry is declared per namespace behind classexists guards), and that LeftAndMain has simpler's AdminExtension with simpler_include_modal set, which the shortcode dialog depends on.
README and UPGRADING now say the module requires restruct/silverstripe-simpler 1.0.0 or later on Silverstripe 6, instead of referring to a 1.x line that has no release yet.
SS_PHPUNIT_FLUSH is not read by framework 5, and flush=1 cannot follow --testsuite, so the SS5 legs never flushed. They now run path-first with flush=1; the SS6 legs keep SS_PHPUNIT_FLUSH=1. The simpler dev-main alias is marked for removal once simpler 1.0.0 is tagged.
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.
See CHANGELOG.md.