Skip to content

Moved MetaTag trait to the root namespace.#523

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/move-metatags-trait
Jan 22, 2026
Merged

Moved MetaTag trait to the root namespace.#523
AlexSkrypnyk merged 1 commit intomainfrom
feature/move-metatags-trait

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Jan 22, 2026

Summary by CodeRabbit

  • Refactor

    • MetatagTrait has been restructured to be available in a generic namespace rather than being Drupal-specific only. Import paths have been updated accordingly.
  • Documentation

    • Updated documentation, migration guides, examples, and feature tests to reflect the namespace restructuring.

✏️ Tip: You can customize this high-level summary in your review settings.

@AlexSkrypnyk AlexSkrypnyk enabled auto-merge (rebase) January 22, 2026 08:33
@AlexSkrypnyk AlexSkrypnyk added this to the v3.5 milestone Jan 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Walkthrough

MetatagTrait is moved from the Drupal-specific namespace (DrevOps\BehatSteps\Drupal) to the generic root namespace (DrevOps\BehatSteps). This involves updating the trait's namespace declaration, imports, annotations, and associated documentation across multiple files without functional logic changes.

Changes

Cohort / File(s) Summary
Documentation Updates
MIGRATION.md, README.md, STEPS.md
Updated trait indices and references to reflect the namespace change from Drupal\MetatagTrait to MetatagTrait; reclassified trait from Drupal-specific to generic steps index
Source Code
src/MetatagTrait.php
Namespace declaration updated from DrevOps\BehatSteps\Drupal to DrevOps\BehatSteps
Test & Feature Configuration
tests/behat/bootstrap/FeatureContext.php, tests/behat/features/metatag.feature
Updated trait import statement and trait annotations from DrevOps\BehatSteps\Drupal\MetatagTrait to DrevOps\BehatSteps\MetatagTrait

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

PR: Requires more work

Suggested reviewers

  • skipper-vp

Poem

🐰 A trait hops from the Drupal nest,
Now living in the generic crest,
Namespace changed, but logic stays,
MetaTags shine in simpler ways! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving MetatagTrait from the Drupal-specific namespace to the root namespace across all files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@STEPS.md`:
- Around line 1272-1277: The blockquote under the MetatagTrait heading has extra
spaces after the '>' and the following list items are mis-indented; update the
blockquote line (the line starting with ">  Assert `<meta>` tags in page
markup.") to use a single space after '>' ("> Assert ...") and normalize the
unordered list indentation so each list item is consistently indented (use a
single level of indentation, e.g., two spaces) to satisfy markdownlint rules
MD027 and MD007; ensure the heading "MetatagTrait" and references to [Source]
and [Example] remain unchanged.

In `@tests/behat/features/metatag.feature`:
- Line 13: Add a descriptive tag (e.g., `@metatag`) to the feature/scenario tags
so tests can be run selectively; update the existing tag line that currently
contains "@trait:MetatagTrait" in tests/behat/features/metatag.feature (and the
similar occurrence at the other location around line 36) to include "@metatag"
alongside the current tags (e.g., "@metatag `@trait`:MetatagTrait" or add a
separate "@metatag" tag on the same block) so runners can target these tests
directly.

Comment on lines +1272 to +1277
## MetatagTrait

[Source](src/MetatagTrait.php), [Example](tests/behat/features/metatag.feature)

> Assert `<meta>` tags in page markup.
> - Assert presence and content of meta tags with proper attribute handling.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix markdownlint blockquote spacing and list indentation.
markdownlint flags MD027/MD007 here; adjust the blockquote to use single-space alignment and proper list indentation.

🔧 Proposed fix
->  Assert `<meta>` tags in page markup.
->  - Assert presence and content of meta tags with proper attribute handling.
+> Assert `<meta>` tags in page markup.
+> - Assert presence and content of meta tags with proper attribute handling.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## MetatagTrait
[Source](src/MetatagTrait.php), [Example](tests/behat/features/metatag.feature)
> Assert `<meta>` tags in page markup.
> - Assert presence and content of meta tags with proper attribute handling.
## MetatagTrait
[Source](src/MetatagTrait.php), [Example](tests/behat/features/metatag.feature)
> Assert `<meta>` tags in page markup.
> - Assert presence and content of meta tags with proper attribute handling.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

1276-1276: Multiple spaces after blockquote symbol

(MD027, no-multiple-space-blockquote)


1277-1277: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1277-1277: Multiple spaces after blockquote symbol

(MD027, no-multiple-space-blockquote)

🤖 Prompt for AI Agents
In `@STEPS.md` around lines 1272 - 1277, The blockquote under the MetatagTrait
heading has extra spaces after the '>' and the following list items are
mis-indented; update the blockquote line (the line starting with ">  Assert
`<meta>` tags in page markup.") to use a single space after '>' ("> Assert ...")
and normalize the unordered list indentation so each list item is consistently
indented (use a single level of indentation, e.g., two spaces) to satisfy
markdownlint rules MD027 and MD007; ensure the heading "MetatagTrait" and
references to [Source] and [Example] remain unchanged.

| content | width |

@trait:Drupal\MetatagTrait
@trait:MetatagTrait
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider adding a descriptive tag (e.g., @metatag) for selective runs.
This helps targeted execution alongside @api/@trait. Based on learnings, add a descriptive tag where appropriate.

Also applies to: 36-36

🤖 Prompt for AI Agents
In `@tests/behat/features/metatag.feature` at line 13, Add a descriptive tag
(e.g., `@metatag`) to the feature/scenario tags so tests can be run selectively;
update the existing tag line that currently contains "@trait:MetatagTrait" in
tests/behat/features/metatag.feature (and the similar occurrence at the other
location around line 36) to include "@metatag" alongside the current tags (e.g.,
"@metatag `@trait`:MetatagTrait" or add a separate "@metatag" tag on the same
block) so runners can target these tests directly.

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b47c251) to head (ca386bb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #523   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         2351      2351           
=========================================
  Hits          2351      2351           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexSkrypnyk AlexSkrypnyk merged commit ce90af6 into main Jan 22, 2026
6 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/move-metatags-trait branch January 22, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant