Skip to content

Module setup: requirements never enforced by core, empty error on failed install, PHP 8.2/8.4 deprecations in w2p_System_Setup #550

Open

Description

@caseysoftware

Three small problems in w2p_System_Setup that add-on modules run into:

  1. $config['requirements'] is never enforced by core. _meetsRequirements() only runs if the module's own install() calls it. modules/system/modules/domodsql.php doesn't check requirements before install() or upgrade(). Links and ProjectDesigner still call the deprecated _checkRequirements(), which logs a notice. Suggest domodsql checks requirements before install/upgrade, and the two core setups switch to _meetsRequirements().
  2. An empty error on failure. When install() returns false without filling _errors, domodsql calls $AppUI->setMsg($setup->getErrors(), …) with null, so the user sees an empty error. Fall back to a generic "Module install failed" message.
  3. $_query isn't declared ($this->_query is set in the constructor), which is a dynamic-property deprecation on PHP 8.2+. The constructor's w2p_Core_CAppUI $AppUI = null style parameters are implicitly nullable, which PHP 8.4 deprecates. Use ?w2p_Core_CAppUI.

Found while updating the Notebook add-on for 5.0 (master 8727ad5c).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions