Skip to content
Snippets Groups Projects
Unverified Commit 0cb41093 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3513879 by nicxvan: Convert experimental_module_requirements_test_requirements to new Class

(cherry picked from commit 01eecd5c)
parent fbe37854
Branches
Tags
19 merge requests!13399Edit robots.txt to disallow search pages without a trailing slash,!13385Issue #3549904 by xiff: Taxonomy term [term:published_status] token not available,!13375Issue #3535199 by alexpott, godotislate: Saving untrusted config results in memory leak,!13373ckeditor5.api.php fix @encode,!13234Issue #3533030 by catch, mondrake: Move QuickStart tests to build tests,!13231Issue #3533030 by catch, mondrake: Move QuickStart tests to build tests,!13182Provide offending asset path in asset preprocess error messages.,!13164Issue #3545027 Fixed typehints in ContextDefinition's $label and $description.,!13121Issue #3530262 by mohit_aghera, kim.pepper, quietone, xjm: Add mohit_aghera as...,!13086Issue #3525642 by amateescu, smustgrave: The active workspace is not persisted...,!13015Issue #3465041 by prudloff, xjm, smustgrave, larowlan:...,!12812Issue #3527142 by andypost, catch, longwave, xjm: Update Composer and...,!12811Issue #3527142 by andypost, catch, longwave, xjm: Update Composer and...,!12686Draft: Issue #3535330: Assets paths in CSS no longer rewritten when aggregation is enabled,!12661Issue #3255804 by godotislate, longwave, berdir, alexpott, catch, andypost,...,!12660Issue #3255804 by godotislate, longwave, berdir, alexpott, catch, andypost,...,!12618Issue #3522970 by longwave, smustgrave: Remove unused BrowserTestBase::$originalContainer,!9182Representative Node Views fails due to invalid SQL,!4367Issue #2671162: Also use text editor (CKEditor) for "summary" of a text field
Pipeline #537696 passed with warnings
Pipeline: drupal

#537713

    Pipeline: drupal

    #537711

      Pipeline: drupal

      #537709

        +4
        <?php
        /**
        * @file
        * Experimental Test Requirements module to test hook_requirements().
        */
        declare(strict_types=1);
        use Drupal\Core\Extension\Requirement\RequirementSeverity;
        /**
        * Implements hook_requirements().
        */
        function experimental_module_requirements_test_requirements(): array {
        $requirements = [];
        if (\Drupal::state()->get('experimental_module_requirements_test_requirements', FALSE)) {
        $requirements['experimental_module_requirements_test_requirements'] = [
        'severity' => RequirementSeverity::Error,
        'description' => t('The Experimental Test Requirements module can not be installed.'),
        ];
        }
        return $requirements;
        }
        <?php
        declare(strict_types=1);
        namespace Drupal\experimental_module_requirements_test\Install\Requirements;
        use Drupal\Core\Extension\InstallRequirementsInterface;
        use Drupal\Core\Extension\Requirement\RequirementSeverity;
        /**
        * Install time requirements for the Experimental Requirements Test module.
        */
        class ExperimentalModuleRequirementsTestRequirements implements InstallRequirementsInterface {
        /**
        * {@inheritdoc}
        */
        public static function getRequirements(): array {
        $requirements = [];
        if (\Drupal::state()->get('experimental_module_requirements_test_requirements', FALSE)) {
        $requirements['experimental_module_requirements_test_requirements'] = [
        'severity' => RequirementSeverity::Error,
        'description' => t('The Experimental Test Requirements module can not be installed.'),
        ];
        }
        return $requirements;
        }
        }
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please to comment