diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..212ba769998d2ec8bbddb5f476d7916691dcea4c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,31 @@ +include: + - project: $_GITLAB_TEMPLATES_REPO + ref: $_GITLAB_TEMPLATES_REF + file: + - '/includes/include.drupalci.main.yml' + - '/includes/include.drupalci.variables.yml' + - '/includes/include.drupalci.workflows.yml' +variables: + OPT_IN_TEST_PREVIOUS_MAJOR: 1 + OPT_IN_TEST_NEXT_MINOR: 1 + OPT_IN_TEST_NEXT_MAJOR: 0 + RUN_JOB_UPGRADE_STATUS: 0 + _CSPELL_WORDS: "epam,epam’s,levitsky,quickedit" +cspell: + allow_failure: false +phpcs: + allow_failure: false +phpstan: + allow_failure: false +phpstan (next minor): + allow_failure: true +phpstan (next major): + allow_failure: false +phpunit (previous major): + allow_failure: false +phpunit (next minor): + allow_failure: false +phpunit (next major): + allow_failure: false +upgrade status: + allow_failure: false diff --git a/README.md b/README.md index dec6104683ab37e5ac0c9ee7b46a35e509b49b64..803fa1356151c669152362e6cf5ff2f0088dcd32 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,4 @@ Current maintainers: This project has been sponsored by: * EPAM Systems - Since 1993, EPAM Systems, Inc. (NYSE:EPAM) has leveraged its software engineering expertise to become a leading global product development, digital platform engineering, and top digital and product design agency. Through its ‘Engineering DNA’ and innovative strategy, consulting, and design capabilities, EPAM works in collaboration with its customers to deliver next-gen solutions that turn complex business challenges into real business outcomes. EPAM’s global teams serve customers in more than 30 countries across North America, Europe, Asia and Australia. As a recognized market leader in multiple categories among top global independent research agencies, EPAM was one of only four technology companies to appear on Forbes 25 Fastest Growing Public Tech Companies list every year of publication since 2013 and was the only IT services company featured on Fortune’s 100 Fastest-Growing Companies list of 2019. - Learn more at www.epam.com diff --git a/composer.json b/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..c3d2b04c3275219e510b6ed5b4def1a6033ebc5c --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "name": "drupal/text_field_formatter", + "description": "A simple empty page solution. Assists in creating empty menu callbacks mostly used for pages that only consist of blocks.", + "type": "drupal-module", + "license": "GPL-2.0-or-later", + "homepage": "https://www.drupal.org/project/text_field_formatter", + "support": { + "issues": "https://www.drupal.org/project/issues/text_field_formatter", + "source": "https://git.drupalcode.org/project/text_field_formatter" + } + } + \ No newline at end of file diff --git a/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php b/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php index beedb8cdf8e9415650e67683f4975a1589b83d57..a3a2f0a336ef16ac3f39f9c6975ca2f3895cb2ad 100644 --- a/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php +++ b/src/Plugin/Field/FieldFormatter/TextFieldFormatter.php @@ -81,17 +81,19 @@ class TextFieldFormatter extends StringFormatter { * @param \Drupal\Core\Utility\Token $token * The token service. */ - public function __construct($plugin_id, - $plugin_definition, - FieldDefinitionInterface $field_definition, - array $settings, - $label, - $view_mode, - array $third_party_settings, - EntityTypeManagerInterface $entity_type_manager, - ModuleHandlerInterface $module_handler, - MessengerInterface $messenger, - Token $token) { + public function __construct( + $plugin_id, + $plugin_definition, + FieldDefinitionInterface $field_definition, + array $settings, + $label, + $view_mode, + array $third_party_settings, + EntityTypeManagerInterface $entity_type_manager, + ModuleHandlerInterface $module_handler, + MessengerInterface $messenger, + Token $token, + ) { parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $entity_type_manager); $this->moduleHandler = $module_handler; @@ -372,7 +374,7 @@ class TextFieldFormatter extends StringFormatter { $attributes = explode("\r\n", $attributes); foreach ($attributes as $attribute) { $attribute = explode("|", $attribute); - $prepared[$attribute[0]] = isset($attribute[1]) ? $attribute[1] : ''; + $prepared[$attribute[0]] = $attribute[1] ?? ''; } } diff --git a/text_field_formatter.info.yml b/text_field_formatter.info.yml index b81686a169aa3b1023651ef24c3ca5c16bd606b6..4ec8ea7ca1fe3cb9ebaab8c65f6359221ef983e8 100644 --- a/text_field_formatter.info.yml +++ b/text_field_formatter.info.yml @@ -1,5 +1,5 @@ name: 'Text Field Formatter' type: module description: 'This is the extension of the plain text field formatter with additional wrappers, classes and attributes.' -core_version_requirement: ">=8" +core_version_requirement: ^10.2 || ^11.0 package: 'Field formatters'