Stan linting: return types, parameters, modern services, etc.

Created on 5 December 2022, almost 3 years ago
Updated 10 December 2024, 10 months ago

This will likely break some implementations if they customised core framework.

These changes will serve to prevent others from extending on core framework and relying on certain behaviours, especially in the lead up to v3.

📌 Task
Status

Active

Version

2.3

Component

Core Framework

Created by

🇦🇺Australia dpi Perth, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia dpi Perth, Australia

    3.x WIP Changelog.

    This is a major change.

    You should update your Composer contraints to include `drupal/sms: ^3`. As usual, Composer is a requirement.

    Most direct customisations to SMS Framework will need evaluation.

    There is simply too many changes to list. To test compatibility, simply running PHPStan or PHPCS or running the code should make it obvious what needs to be changed, by way of exceptions, fatal PHP errors.

    Third party gateways will likely need minor updates to their classes themselves. While data being passed into SMS Message objects or events should be checked for type strictness.

    When passing data into SMS Framework, make sure data is exactly the right type. E.g a string-int like `$i = '1';` is not valid, compared to a true int, like `$i = 1;`

    Some classes, such as services, have been final-ized. Customisations to these classes will need to be revalulated. E.g services should be modified with service decorators, and inject new dependencies using setters. Rather than direct class inheritance (extends).

    If you notice discrepencies between what is documented and what is typed, please post a new support issue.

    The support status is as follows. 2.x branch is now end of life, it will only receive security changes. 3.x will receive feature, bugs, and security fixes.

    The 3.x roadmap continues as follows: the project intends to update to PHPStan level 9, and PHPStan Strict. This comment services as notice that API contracts may change without notice, in order to achieve this goal.

    The upcoming 4.x roadmap intends to replace and gut most code, and replace with the Symfony Notifier/Texter ( #3262737: Add a first class implementation of Symfony notifier / Texter → ) systems, the impact of this includes:

    • Many custom gateway plugin projects will not be necessary, as they are provided by SMS Framework itself, by way of Symfony. See list of gateway services provided by Symfony.
    • Most core SMS services will exist in one way or another, with equivalents.
    • Some of SMS User will be kept — Equivalent functionality should be implemented in contrib.
    • SMS Blast will be removed — Equivalent functionality should be implemented in contrib.
    • SMS Devel will be removed
    • SMS Sendtophone will be removed.
    • Migrations will be removed.
    • SMS message classes will be removed in favor of Symfony equivalents.
    • SMS entity will be removed — Equivalent record keeping functionality should be implemented in contrib.
    • The queue worker will be removed.
    • Persistence and queue workers are already supported by Symfony Messenger → , and we'll make sure SMS Framework works with that out of the box.
    • "Incoming" route and processing yet to be evaluated.
  • 🇦🇺Australia dpi Perth, Australia
  • Pipeline finished with Success
    10 months ago
    Total: 522s
    #364154
  • Pipeline finished with Success
    10 months ago
    Total: 554s
    #364155
  • 🇦🇺Australia dpi Perth, Australia
  • Merge request !30PHPStan 9 & Strict → (Merged) created by dpi
  • Issue was unassigned.
  • Status changed to Fixed 7 months ago
  • 🇦🇺Australia dpi Perth, Australia
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024