Skip to content
Snippets Groups Projects

Convert system_requirements() into OOP hooks

Closes #3493718

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Derek Wright
  • Derek Wright
  • Initial drive-by on the easy stuff. GitLab spared me from looking at system.install or the new classes by default. :laughing:

  • Derek Wright left review comments

    left review comments

  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • nicxvan
  • nicxvan
  • nicxvan added 1 commit
  • Derek Wright changed title from Conversion to Convert system_requirements() into OOP hooks
    changed title from Conversion to Convert system_requirements() into OOP hooks
  • nicxvan added 44 commits

    added 44 commits

    Compare with previous version

  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • nicxvan added 1 commit

    added 1 commit

    • d1b49942 - Ensure install.inc is loaded for function

    Compare with previous version

  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • nicxvan resolved all threads

    resolved all threads

  • Derek Wright
  • Derek Wright
  • Derek Wright left review comments

    left review comments

  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • Derek Wright resolved all threads

    resolved all threads

  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Sascha Grossenbacher
  • Sascha Grossenbacher left review comments

    left review comments

  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • nicxvan
  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • nicxvan
  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • nicxvan resolved all threads

    resolved all threads

  • Michael Strelan
  • nicxvan
  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • nicxvan resolved all threads

    resolved all threads

  • 389 389 }
    390 390 $install_state['database_verified'] = install_verify_database_settings($site_path);
    391 391 // A valid settings.php has database settings and a hash_salt value. Other
    392 // settings will be checked by system_requirements().
    392 // settings will be checked by
    393 // \Drupal\system\Install\SystemRequirements.
    • Comment on lines +392 to +393

      This is still within the 80 char limit:

      Suggested change
      392 // settings will be checked by
      393 // \Drupal\system\Install\SystemRequirements.
      392 // settings will be checked by \Drupal\system\Install\SystemRequirements.
    • Please register or sign in to reply
  • 45 * Implements hook_runtime_requirements().
    46 */
    47 #[Hook('runtime_requirements')]
    48 public function runtimeRequirements(): array {
    49 return $this->checkRequirements('runtime');
    50 }
    51
    52 /**
    53 * Check requirements.
    54 *
    55 * @param string $phase
    56 * The phase to check for.
    57 *
    58 * @return array
    59 * Requirements.
    60 */
    • Comment on lines +52 to +60

      I know these things are documented elsewhere, and that this is just a protected helper method, but the descriptions are not really useful at all. Maybe something like this would be better?

      Suggested change
      52 /**
      53 * Check requirements.
      54 *
      55 * @param string $phase
      56 * The phase to check for.
      57 *
      58 * @return array
      59 * Requirements.
      60 */
      52 /**
      53 * Check requirements for a given phase.
      54 *
      55 * @param string $phase
      56 * The phase in which requirements are checked, as documented in
      57 * hook_requirements().
      58 *
      59 * @return array
      60 * An associative array of requirements, as documented in
      61 * hook_requirements().
      62 */

      Otherwise I'd rather leave off the docblock if we were allowed to.

    • Author Developer

      I can look at this, but these docs are not correct, this isn't for hook_requirements but for hook_runtime_requirements and hook_update_requirements.

    • Please register or sign in to reply
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Michael Strelan
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading