Roadmap 2.0.0 release
As part of the maintenance roadmap, this issue tracks a structured refactor of the Tagify module to be fully Drupal 11/12 oriented and to adopt PHP 8.3 as the baseline. The current release (`1.2.x`) declares `^8.8 || ^9 || ^10 || ^11`, which forces the code to remain compatible with old APIs and PHP versions. Dropping legacy support unlocks modern PHP and Drupal patterns and reduces long-term maintenance cost. ## Goals - Set the supported core constraint to `^11.1 || ^12`. - Raise the minimum PHP requirement to 8.3 and use modern language features. - Remove deprecated API usage so the module is clean against Drupal 11/12. - Improve type safety and testability across the codebase. ## Proposed scope **PHP 8.3 modernisation** - Add scalar/return/property type declarations everywhere they are missing. - Use constructor property promotion in services, plugins and form classes. - Replace array-based config/option handling with typed enums or readonly classes where it makes sense. - Apply `match()` expressions, named arguments, nullsafe operators and first-class callable syntax where they improve readability. - Declare `declare(strict_types=1);` in all PHP files. **Drupal 11/12 readiness** - Audit and remove all deprecated API calls (run `drupal-check` / `phpstan` with the Drupal deprecation rules at Drupal 11/12 level). - Migrate any remaining hooks to OOP hook classes (#[Hook] attribute) where applicable. - Replace annotations with PHP attributes for plugins (FieldWidget, FormElement, etc.). - Verify dependency injection: no `\Drupal::` static calls in services/plugins. - Confirm JS/CSS libraries and `*.libraries.yml` align with Drupal 11/12 (no jQuery dependencies where avoidable; verify Tagify component asset handling). - Review submodules (Tagify User List, Tagify Facets, Iconify Icons, Tagify Icons) for the same. **Tooling & quality gates** - Add/upgrade GitLab CI to run PHPStan (level max), PHPCS (Drupal + DrupalPractice), and PHPUnit against Drupal 11/12 + PHP ^8.3. - Ensure existing tests pass and add coverage for the widget, form element and select widget where missing. ## Branching strategy - Land non-BC refactors on a new `2.0.x` branch targeting `^11.1` || ^12 and PHP ^8.3. - Keep `1.2.x` in maintenance/security-only mode for legacy sites. ## Tasks 1. Foundation / branching ✅ - ~~Create `2.0.x` branch and set core/PHP constraints~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590673 - ~~Set up CI quality gates for Drupal 11/12 / PHP 8.3~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590674 2. Drupal 11/12 deprecation removal ✅ - ~~Audit and remove deprecated API usage (drupal-check / PHPStan D11/12)~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590675 - ~~Convert plugin annotations to PHP attributes~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590676 - ~~Migrate procedural hooks to OOP hook classes (`#[Hook]`)~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590677 - ~~Remove `\Drupal::` static calls from injectable classes~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590678 3. PHP 8.3 modernization ✅ - ~~Add `declare(strict_types=1)` and full type declarations~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590679 - ~~Apply constructor property promotion~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590680 - ~~Modernize control flow and option handling~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590681 4. Frontend / assets ✅ - ~~Audit `libraries.yml` and JS for Drupal 11/12 alignment~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590682 5. Testing ✅ - ~~Increase test coverage for widget, form element, and select widget~~ - https://git.drupalcode.org/project/tagify/-/work_items/3590683 ## Notes This is a tracking/roadmap issue. Sub-tasks should be created as child issues (e.g. "Convert plugin annotations to attributes", "Remove deprecated API usage", "Raise PHP requirement to ^8.3") and linked here.
issue