Skip to content

fix: 2.21.1 follow-ups (SF3-L1 conflicts, DI-001 clock, SF-004 attribute routes) - #123

Merged
HecFranco merged 6 commits into
mainfrom
fix/2.21.1-followups
Nov 17, 2026
Merged

HecFranco merged 6 commits into
mainfrom
fix/2.21.1-followups

Conversation

@HecFranco

@HecFranco HecFranco commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

TaskBoardBundle 2.21.1 follow-ups after 2.21.0.

  1. Audit SF3-L1. Three paths let the 2.21.0 TaskTreeRefusedException conflict through as a 500. In all of them nothing was written, and that stays so.
    • The task edit form's column change now shows the task_board.flash.task_changed_meanwhile flash, as a move on the board does.
    • UI column delete and column update (retype) show the new task_board.flash.column_changed_meanwhile flash (7 locales).
    • Task API PUT / DELETE /v2/list/{id}/status/{status_id} answer 409 with the new ECODE STATUS_409 (TaskApiRefusal::STATUS_STALE). A status has no revision, so there is no current_revision. The new code is in docs/API.md and openapi.yaml.
    • New tests force the conflict through the test column transition policy (edit form; column delete in the UI and the API). A retype asks no policy, so the API retype test uses an out-of-date copy with unsaved changes, and the UI retype test uses a row lock stub.
  2. REQ-DI-001. SyncTaskWriter takes an optional Psr\Clock\ClockInterface (autowired; NativeClock by default). It uses it for the remote archive date and for the "not in the future" bound of a source's creation date (the old time()). The functional test runs on ClockSensitiveTrait::mockTime().
  3. REQ-SF-004, attribute routes (owner-approved 2026-11-17).
    • The routes are now #[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. Without that, an optional action parameter would have become a route default.
    • The loader still applies routes.*, route_prefix, multi_board.path, api.prefix, the feature switches and the tenant copies.
    • The controllers are no longer autoconfigured (rule 7). They are tagged controller.service_arguments explicitly, plus container.service_subscriber for the AbstractController ones.
    • tests/Integration/Routing/RouteCollectionFixtureTest.php compares 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.
    • Hosts keep their import (UPGRADING "To 2.21.1").

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • My code follows the project's coding standards (PSR-12)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit/integration tests pass locally with my changes
  • I have updated the documentation accordingly
  • I have updated docs/CHANGELOG.md if applicable

Testing

  • cs-check: clean. phpstan: no errors. Igor: 747/747 stateless. validate-translations: 7 locales, 938 keys each.
  • PHPUnit on SQLite with coverage: 2655 tests, 112471 assertions, 20 skipped. Statements 22510/22510 (100%).
  • Functional suite on MySQL 8.4 and PostgreSQL 16: green in CI on the head commit. Locally the MySQL run was cut at 70% (all green so far) because the machine was under load.
  • The private entity manager replay and the twin-port replay are green in CI, and so is Symfony 8.1 on PHP 8.4 and 8.5.

…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.
@HecFranco
HecFranco merged commit f8f23bf into main Nov 17, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant