Skip to content

D11-11: Bump core version, and address some issues flagged by upgrade_status#169

Open
adam-vessey wants to merge 10 commits intomainfrom
update/d11
Open

D11-11: Bump core version, and address some issues flagged by upgrade_status#169
adam-vessey wants to merge 10 commits intomainfrom
update/d11

Conversation

@adam-vessey
Copy link
Copy Markdown
Contributor

@adam-vessey adam-vessey commented Oct 23, 2025

Builds on #168

Summary by CodeRabbit

  • Chores
    • Updated Drupal core compatibility to support Drupal 10 and 11.
    • Expanded dependency ranges: added ImageMagick v4 and Symfony v7 support.
    • Added/updated module dependencies (including the devel helper and a Saxon helper) and tightened Drush service constraints.
  • Tests
    • Updated tests and assertions for compatibility with the above changes.

@adam-vessey adam-vessey added the patch Backwards compatible bug fixes. label Oct 23, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 23, 2025

📝 Walkthrough

Walkthrough

Update Composer package constraints and Drush services constraint; widen Drupal core compatibility in many module manifests and add a few module dependencies; adjust test visibility and assertion; replace a database prefix call; and add return type declarations to several __sleep() methods.

Changes

Cohort / File(s) Summary
Composer & Drush config
composer.json
Update drupal/imagemagick to `^3.2
Root module info
dgi_migrate.info.yml
Bump core_version_requirement from `^9
Module manifests (many)
modules/.../dgi_migrate_*.info.yml
Update core_version_requirement from `^9
Added module dependencies
modules/devel/dgi_migrate_devel.info.yml, modules/dgi_migrate_foxml_standard_mods/modules/xslt/dgi_migrate_foxml_standard_mods_xslt.info.yml
Add drupal:devel to devel submodule; add dgi_saxon_helper:dgi_saxon_helper_migrate dependency to the XSLT submodule.
Test updates
modules/dgi_migrate_foxml_standard_mods/tests/src/Kernel/RoleMapperMigrationTest.php, modules/dgi_migrate_foxml_standard_mods/tests/src/Unit/RoleMapperTest.php
Change $modules visibility from public static to protected static; replace assertSame(count(...), count(...)) with assertCount(...).
PHP signature typing (__sleep)
src/MigrateBatchExecutable.php, src/Plugin/migrate/source/Migration.php, src/StompQueue.php
Add explicit return type : array to __sleep() method signatures.
DB prefix method change
src/Plugin/migrate/id_map/SmartSql.php
Replace $this->database->tablePrefix() with $this->database->getPrefix() when computing prefix length for table/map names.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop through diffs with whiskers bright,
Versions nudged to match the light.
New deps, prefixes, tests made neat—
Typehints tucked and code complete.
A rabbit's nibble, soft and light. 🐇

🚥 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 clearly describes the main changes: bumping Drupal core version requirement from 9||10 to 10||11 and addressing upgrade_status issues.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update/d11

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@adam-vessey adam-vessey changed the title D11-11: Bump core version D11-11: Bump core version, and address some issues flagged by upgrade_status Oct 28, 2025
@adam-vessey adam-vessey marked this pull request as ready for review October 28, 2025 15:02
Copy link
Copy Markdown
Contributor

@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: 1

🤖 Fix all issues with AI agents
In `@composer.json`:
- Line 34: The current Composer platform config entry for
"drush.11-12.services.yml" uses an open-ended constraint ">=11.6"; update this
to a bounded version to avoid accidentally allowing incompatible Drush major
releases (e.g., change the constraint to ">=11.6,<14.0" or another agreed upper
bound) and document the chosen bound in a brief comment or commit message;
locate the key "drush.11-12.services.yml" in composer.json and replace the
version string accordingly, ensuring composer validate passes and running a
quick compatibility test (e.g., install or update) to confirm no regressions.

Comment thread composer.json
"drush": {
"services": {
"drush.11-12.services.yml": "^11.6 || ^12",
"drush.11-12.services.yml": ">=11.6",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Drush 13 release Drupal 11 compatibility

💡 Result:

  • Drush 13.0.0 release date: August 2, 2024. [1]
  • Drupal 11 compatibility: Yes — Drush 13 is marked as supported/recommended for Drupal 11 (and compatible with Drupal 10.2+). [2]
  • Key requirement: Drush 13 requires PHP 8.3+. [2]

Sources:
[1] endoflife.date (Drush release timeline)
[2] Drush docs (Drupal compatibility table)


Revisit the open-ended Drush services constraint now that Drush 13 is released.

Drush 13 was released in August 2024 and is compatible with Drupal 11. The constraint >=11.6 does match Drush 13 as intended, but given the commit message indicated this was a "temporary/compatibility change," the constraint approach should be formally reassessed. Determine whether this open-ended constraint will remain appropriate for Drush 14+ or if it requires tightening to a specific upper bound (e.g., >=11.6,<14.0).

🤖 Prompt for AI Agents
In `@composer.json` at line 34, The current Composer platform config entry for
"drush.11-12.services.yml" uses an open-ended constraint ">=11.6"; update this
to a bounded version to avoid accidentally allowing incompatible Drush major
releases (e.g., change the constraint to ">=11.6,<14.0" or another agreed upper
bound) and document the chosen bound in a brief comment or commit message;
locate the key "drush.11-12.services.yml" in composer.json and replace the
version string accordingly, ensuring composer validate passes and running a
quick compatibility test (e.g., install or update) to confirm no regressions.

Copy link
Copy Markdown
Contributor

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/MigrateBatchExecutable.php`:
- Around line 481-485: There's an extra blank line after the ternary assignment
to $status causing lint failures; edit the method in MigrateBatchExecutable.php
where $status is set using version_compare(... ) ?
MigrationInterface::RESULT_COMPLETED : parent::checkStatus() and remove the
consecutive empty line(s) so the assignment and the following code are
contiguous (no extra blank lines).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5d4bd82c-db09-40f0-b2b2-7f2167c5a68d

📥 Commits

Reviewing files that changed from the base of the PR and between 57db7ac and 440499a.

📒 Files selected for processing (1)
  • src/MigrateBatchExecutable.php

Comment on lines +481 to 485
$status = version_compare(\Drupal::VERSION, '11.3.0', '>=') ?
MigrationInterface::RESULT_COMPLETED :
parent::checkStatus();


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix linting error: Remove extra empty line.

The pipeline is failing due to multiple consecutive empty lines (lines 484-485).

Proposed fix
   protected function checkStatus() {
     $status = version_compare(\Drupal::VERSION, '11.3.0', '>=') ?
       MigrationInterface::RESULT_COMPLETED :
       parent::checkStatus();
-
 
     if ($status === MigrationInterface::RESULT_COMPLETED) {
🧰 Tools
🪛 GitHub Actions: Code Linting

[error] 484-484: Functions must not contain multiple empty lines in a row; found 2 empty lines (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/MigrateBatchExecutable.php` around lines 481 - 485, There's an extra
blank line after the ternary assignment to $status causing lint failures; edit
the method in MigrateBatchExecutable.php where $status is set using
version_compare(... ) ? MigrationInterface::RESULT_COMPLETED :
parent::checkStatus() and remove the consecutive empty line(s) so the assignment
and the following code are contiguous (no extra blank lines).

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

Labels

patch Backwards compatible bug fixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants