Repository navigation
Release 3.0.0 - #4
Merged
Merged
Conversation
2.0.1 imported SilverStripe\Core\Validation\ValidationException, which exists in framework 6 only, so on Silverstripe 4 and 5 a user without create permission who triggered a copy got a class-not-found fatal instead of the 'No create permissions' validation message. The class is now resolved at runtime. Kept free of other changes so it can be cherry-picked onto the 2.x line.
…on, no E_USER_ERROR - Extend AbstractGridFieldComponent, like the core row actions, so CopyButton::create() works and the Injector can replace the class. - In menu mode getGroup() now returns null when the user cannot create the record, so GridField_ActionMenu leaves the item out, as column mode already did. Before, the item was offered to everyone and refused only on click. - Throw a RuntimeException instead of user_error(..., E_USER_ERROR), which is deprecated as of PHP 8.4. - Class docblock: note that no edit form is opened after copying since 2.x.
- framework ^5 || ^6 (was ^4 || ^5 || ^6): Silverstripe 4 is end of life and no longer supported or tested; projects on it stay on 2.0.x. - php ^8.1, the floor of Silverstripe 5. - Require silverstripe/vendor-plugin ^2 || ^3 explicitly, since the module exposes css/ through it. - recipe-testing as require-dev and a tests autoload-dev namespace. - branch-alias 3.x-dev, for master and for main after the planned rename. - funding entry for the Packagist Fund link.
Covers construction through the Injector, the GridField wiring, the copy itself (written, only from the grid's own list, other actions ignored), the permission refusal with the running major's ValidationException (regression for #3), the unwritten-copy error, column and menu mode for users who can and cannot create, the rendered GridField_ActionMenu, and the CMS stylesheet config. /tests is export-ignored, so run it from a host project with a symlinked path repository.
One job per supported major at its oldest and newest PHP here (5 on 8.1/8.3, 6 on 8.3/8.4). The module is installed as a symlinked path repository because /tests is export-ignored. Both majors flush the test manifest, each in the way its framework reads. Pushes trigger on master, the current default branch.
README gains the sponsorship line, requirements, a branch/version/ Silverstripe/PHP compatibility table, ModelAdmin usage via getGridFieldConfig(), what a copy does and does not do, configuration, and how to run the tests. The onAfterDuplicate example now uses Extension (DataExtension is gone in Silverstripe 6) and the hook's real signature; the addComponent() example passes the class name instead of a short string that never matched.
handleAction() read $arguments['RecordID'] unguarded, so a replayed or hand-crafted request without it raised an 'Undefined array key' warning (pre-existing since 2.x and in upstream). It now returns early, like the existing not-in-list case. Covered by a test that captures warnings itself, so it fails the same way on PHPUnit 9 and 11.
The default branch becomes main. Every phpunit call gets --fail-on-empty-test-suite and the generated phpunit.xml gets failOnEmptyTestSuite="true", so a suite that collects nothing turns the leg red instead of passing.
The module has always declared BSD-3-Clause and carries third-party code (UniSolutions, later contributors), so the licence is kept and written out rather than changed. The default branch becomes main, so only dev-main keeps a 3.x-dev alias.
…, main/v2 branches CHANGELOG top heading dated, 2.0.2 hotfix entry, the RecordID fix, the vendor-plugin requirement (was missing), what replace means now that upstream ships its own 3.0.0. UPGRADING notes the SS5 deprecation notice on the permission-denied path. README branch table follows main/v2.
…, 2.0.x SS5 history, ship UPGRADING.md - UPGRADING step 7: framework 5.4 suppresses the ORM\ValidationException notice unless Deprecation::enable(true) is used. - README: CI runs on pushes to main and on pull requests, not on every push. - CHANGELOG: Silverstripe 5 support arrived in 2.0.1 with 6, not in 2.0.0. - RecordID comments: the bug is present before 3.0.0, including 2.0.2. - .gitattributes: stop export-ignoring UPGRADING.md, which CHANGELOG links to.
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.