Repository navigation
fix: 2.21.1 follow-ups (SF3-L1 conflicts, DI-001 clock, SF-004 attribute routes) - #123
Merged
Merged
Conversation
…outes Dump of the 2.21.0 route loader output (default configuration, every optional feature, custom prefix / names / paths with tenant copies, a multi-board list at the root, the Task API at its default and a custom prefix) as the fixture of REQ-SF-004.
…EQ-DI-001) The remote archive date and the not-in-the-future bound of a source's creation date came from a bare new DateTimeImmutable() / time(). The writer now takes an optional Psr\Clock\ClockInterface (autowired to the framework's clock service, NativeClock when built by hand).
…meanwhile (audit SF3-L1)
Three paths let the 2.21.0 TaskTreeRefusedException conflict through as a
500; nothing was written in any of them:
- the task edit form's column change: the "task changed meanwhile" flash,
as a move on the board;
- column delete and column update (retype) in the board UI: new flash
task_board.flash.column_changed_meanwhile (7 locales);
- PUT / DELETE /v2/list/{id}/status/{status_id}: 409 with the new ECODE
STATUS_409 (a status has no revision, so no current_revision).
Tests force the conflict through the test column transition policy (edit
form, column delete in the UI and the API), an out-of-date copy with
unsaved changes (API retype) and a row lock stub (UI retype).
…F-004) The manage UI, provider connection, multi-board and Task API routes move to #[Route] attributes on the controllers. The type: nowo_task_board loader reads them through an internal ControllerAttributeRouteLoader (which keeps only the defaults the attributes declare) and still applies the configured names and paths, route_prefix, multi_board.path, api.prefix, the feature switches and the tenant copies, so the collection is the 2.21.0 one route for route (fixture test). The controllers are no longer autoconfigured (rule 7) and are tagged controller.service_arguments (and container.service_subscriber) explicitly. Hosts keep their route import.
…flict - ControllerAttributeRouteLoader reads the attribute's public $defaults (Route::getDefaults() is gone in Symfony 8). - The API retype conflict test changes the request's copy of the task once the controller is chosen, so it also holds with the private entity manager.
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.
Description
TaskBoardBundle 2.21.1 follow-ups after 2.21.0.
TaskTreeRefusedExceptionconflict through as a 500. In all of them nothing was written, and that stays so.task_board.flash.task_changed_meanwhileflash, as a move on the board does.task_board.flash.column_changed_meanwhileflash (7 locales).PUT/DELETE /v2/list/{id}/status/{status_id}answer 409 with the new ECODESTATUS_409(TaskApiRefusal::STATUS_STALE). A status has no revision, so there is nocurrent_revision. The new code is indocs/API.mdandopenapi.yaml.SyncTaskWritertakes an optionalPsr\Clock\ClockInterface(autowired;NativeClockby default). It uses it for the remote archive date and for the "not in the future" bound of a source's creation date (the oldtime()). The functional test runs onClockSensitiveTrait::mockTime().#[Route]attributes on the controllers. Thetype: nowo_task_boardloader reads them through an internalControllerAttributeRouteLoader, which keeps only the defaults the attributes declare. Without that, an optional action parameter would have become a route default.routes.*,route_prefix,multi_board.path,api.prefix, the feature switches and the tenant copies.controller.service_argumentsexplicitly, pluscontainer.service_subscriberfor theAbstractControllerones.tests/Integration/Routing/RouteCollectionFixtureTest.phpcompares the router collection with a dump taken from v2.21.0 before the change (first commit). The dump covers 6 scenarios: default, all features, custom prefix / names / tenancy, multi-board at root, API at the default prefix, API at a custom prefix with templates. It compares name, order, path, methods, requirements, defaults, options, host, schemes and condition.No BC break. FrankenPHP worker mode is unaffected: the loader and the attribute reader are stateless, and Igor reports 747/747 OK.
Type of Change
Checklist
docs/CHANGELOG.mdif applicableTesting
cs-check: clean.phpstan: no errors. Igor: 747/747 stateless.validate-translations: 7 locales, 938 keys each.