Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Jul 24, 2025

Closes #1761
Closes #1613

Summary by CodeRabbit

  • New Features

    • Added a configuration option to control the maximum number of entities cached in memory, allowing for better memory management during long-running processes.
  • Bug Fixes

    • Improved handling of method name extraction in test utilities to ensure proper indexing.
  • Style

    • Updated suppression annotations for static analysis tools to use consistent syntax.
    • Refactored environment variable retrieval for efficiency and clarity in configuration files.
  • Documentation

    • Clarified and streamlined comments and instructions in default settings files.
  • Chores

    • Upgraded Drupal core and development dependencies.
    • Enhanced static analysis and code refactoring tool configurations.
    • Modernized PHPUnit test metadata by replacing annotation-style comments with PHP 8 attribute syntax across multiple test classes.
  • Tests

    • Temporarily disabled a Valkey integration test pending resolution of a related Drush issue.

@coderabbitai
Copy link

coderabbitai bot commented Jul 24, 2025

"""

Walkthrough

This change updates Drupal core and related development dependencies in composer.json, adjusts static analysis and code refactoring tools, refines suppression annotation syntax, optimizes environment variable usage, adds a new memory cache parameter, and revises documentation comments. No functional code logic is altered beyond these configuration and annotation improvements.

Changes

File(s) Change Summary
composer.json Bumped Drupal core and dev dependencies; added/updated static analysis and refactoring tools.
tests/phpunit/Drupal/SettingsTestCase.php
web/modules/.../MockTrait.php
Updated suppression annotation syntax for PHPMD warnings; minor array handling improvement in MockTrait.
tests/phpunit/* (CircleCiConfigTest.php, DatabaseSettingsTest.php, EnvironmentSettingsTest.php, SwitchableSettingsTest.php)
web/modules/custom/ys_base/tests/src/* (Unit/ExampleTest.php, Kernel/ExampleTest.php, Functional/ExampleTest.php)
web/themes/custom/your_site_theme/tests/src/* (Unit/ExampleTest.php, Kernel/ExampleTest.php, Functional/ExampleTest.php)
Converted PHPUnit docblock annotations to PHP 8 attribute syntax for grouping and data providers.
web/sites/default/default.services.yml Added entity.memory_cache.slots parameter with documentation.
web/sites/default/default.settings.php Revised documentation comments; removed outdated sample blocks.
web/sites/default/includes/providers/settings.acquia.php Added PHPStan ignore directive before require statement.
web/sites/default/includes/providers/settings.container.php
web/sites/default/includes/providers/settings.lagoon.php
Optimized retrieval of environment variables by using intermediate variables.
.vortex/tests/bats/_helper.workflow.bash Disabled assert_valkey test by commenting out internal commands pending Drush issue resolution.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Composer
    participant Drupal
    participant StaticTools

    Developer->>Composer: Update composer.json dependencies
    Composer->>Drupal: Install/upgrade core and dev packages
    Composer->>StaticTools: Install/upgrade PHPStan, Rector
    Developer->>Drupal: Adjust config and annotations
    Drupal->>Drupal: Apply new memory cache parameter
    StaticTools->>Drupal: Analyze code with updated rules
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

PR: Ready to be merged

Poem

A hop, a skip, a version bump,
Drupal core now takes a jump.
Annotations neat and tidy,
Static tools all bright and shiny.
Caches tuned, configs clear,
This rabbit brings upgrades near! 🐇✨
"""

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 phpcs (3.7.2)
tests/phpunit/CircleCiConfigTest.php

ERROR: Referenced sniff "Drupal" does not exist

Run "phpcs --help" for usage information

tests/phpunit/Drupal/DatabaseSettingsTest.php

ERROR: Referenced sniff "Drupal" does not exist

Run "phpcs --help" for usage information

tests/phpunit/Drupal/EnvironmentSettingsTest.php

ERROR: Referenced sniff "Drupal" does not exist

Run "phpcs --help" for usage information

  • 13 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e2b9f2 and cd31314.

⛔ Files ignored due to path filters (55)
  • .vortex/installer/tests/Fixtures/install/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/DatabaseSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deps_updates_provider_ci_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.acquia.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/timezone_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (19)
  • .vortex/tests/bats/_helper.workflow.bash (1 hunks)
  • composer.json (2 hunks)
  • tests/phpunit/CircleCiConfigTest.php (3 hunks)
  • tests/phpunit/Drupal/DatabaseSettingsTest.php (1 hunks)
  • tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (2 hunks)
  • tests/phpunit/Drupal/SwitchableSettingsTest.php (6 hunks)
  • web/modules/custom/ys_base/tests/src/Functional/ExampleTest.php (3 hunks)
  • web/modules/custom/ys_base/tests/src/Kernel/ExampleTest.php (3 hunks)
  • web/modules/custom/ys_base/tests/src/Traits/MockTrait.php (1 hunks)
  • web/modules/custom/ys_base/tests/src/Unit/ExampleTest.php (3 hunks)
  • web/sites/default/default.services.yml (1 hunks)
  • web/sites/default/default.settings.php (2 hunks)
  • web/sites/default/includes/providers/settings.acquia.php (1 hunks)
  • web/sites/default/includes/providers/settings.container.php (1 hunks)
  • web/sites/default/includes/providers/settings.lagoon.php (2 hunks)
  • web/themes/custom/your_site_theme/tests/src/Functional/ExampleTest.php (3 hunks)
  • web/themes/custom/your_site_theme/tests/src/Kernel/ExampleTest.php (3 hunks)
  • web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot
composer.json (2)

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot

web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (2)

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.github/workflows/build-test-deploy.yml:1-4
Timestamp: 2025-06-01T08:08:59.071Z
Learning: Test fixture files (typically located in directories containing "fixture" or "test") should not be reviewed for code quality issues as they may intentionally contain incomplete, invalid, or malformed data for testing purposes.

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/tests/Fixtures/install/hosting_acquia/docs/deployment.md:6-8
Timestamp: 2025-06-01T08:09:18.993Z
Learning: Do not review files in test fixture directories (e.g., files under paths containing /tests/Fixtures/ or similar test fixture patterns). These files are used for testing purposes and should remain as-is.

🧬 Code Graph Analysis (3)
.vortex/tests/bats/_helper.workflow.bash (1)
.vortex/tests/bats/_helper.bash (1)
  • step (1321-1324)
tests/phpunit/Drupal/DatabaseSettingsTest.php (1)
tests/phpunit/Drupal/SettingsTestCase.php (1)
  • SettingsTestCase (16-371)
tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)
tests/phpunit/Drupal/SettingsTestCase.php (1)
  • SettingsTestCase (16-371)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: vortex-test-workflow (1)
🔇 Additional comments (47)
web/sites/default/default.services.yml (1)

241-244: LGTM! Well-documented entity memory cache configuration.

The addition of entity.memory_cache.slots parameter with a default value of 1000 is a good configuration enhancement. The comprehensive documentation clearly explains the memory vs. performance trade-off, which will help administrators make informed decisions when tuning this parameter for their specific use cases.

web/sites/default/includes/providers/settings.acquia.php (1)

24-24: Appropriate PHPStan suppression for environment-specific file.

The suppression is correctly placed to handle the Acquia-specific settings file that may not exist in all environments. This prevents false positives during static analysis while maintaining the conditional file loading logic.

tests/phpunit/Drupal/SettingsTestCase.php (1)

132-132: LGTM! Updated PHPMD suppression syntax for compatibility.

The addition of quotes around the PHPMD warning names aligns with modern PHPMD syntax requirements. This ensures compatibility with updated static analysis tooling while maintaining the same suppression behavior.

Also applies to: 311-311

web/sites/default/includes/providers/settings.container.php (1)

15-16: Good optimization! Reduced redundant environment variable calls.

Storing the environment variable in a local variable and reusing it eliminates redundant getenv() calls and improves code readability. This is a clean refactoring that maintains functionality while being more efficient.

Also applies to: 20-20

composer.json (1)

16-17: Excellent dependency updates aligned with PR objectives.

The updates successfully achieve the stated goals:

  • Drupal core upgraded to 11.2.2 (from 11.1.8)
  • Modern static analysis tooling with PHPStan 2.x and Rector 2.x
  • Appropriate version constraints maintained

These changes support the codebase modernization evident throughout the PR, including the static analysis improvements and syntax updates in other files.

Also applies to: 38-38, 41-41, 47-47, 49-49

web/sites/default/default.settings.php (2)

70-73: LGTM: Documentation simplification.

The removal of @code and @endcode tags from the database configuration instructions improves readability while maintaining clarity.


315-315: LGTM: Accurate module reference correction.

Correcting the reference from "Update Manager" to "Update Status" accurately reflects the module responsible for update fetching functionality in Drupal 11.2.

web/sites/default/includes/providers/settings.lagoon.php (2)

35-39: LGTM: Optimized environment variable usage.

The refactoring to store LAGOON_GIT_BRANCH in a local variable before use eliminates redundant getenv() calls and improves code readability while maintaining the same logic.


64-68: LGTM: Consistent environment variable optimization.

Similar optimization for LAGOON_ROUTES follows the same pattern as the Git branch handling, providing consistency and performance benefits.

web/modules/custom/ys_base/tests/src/Kernel/ExampleTest.php (3)

7-8: LGTM: PHPUnit attribute imports added.

The necessary use statements for PHP 8 attributes are correctly imported to support the modernization from docblock annotations.


17-17: LGTM: Class-level group attribute modernization.

The conversion from @group YsBase annotation to #[Group('YsBase')] attribute follows PHPUnit's modern PHP 8 attribute syntax.


23-24: LGTM: Method-level PHPUnit attribute modernization.

The conversion of @dataProvider and @group annotations to their corresponding PHP 8 attributes (#[DataProvider(...)] and #[Group(...)]) modernizes the test metadata while preserving all functionality. The testMultiplication method correctly maintains both group attributes.

Also applies to: 50-51, 78-80

web/modules/custom/ys_base/tests/src/Traits/MockTrait.php (2)

33-34: LGTM: PHPMD suppression annotation modernization.

The addition of double quotes around PHPMD warning names follows the updated annotation syntax standards.


37-37: LGTM: Array key extraction improvement.

Using array_values() ensures the filtered method names array has consecutive numeric keys, which is a good practice.

.vortex/tests/bats/_helper.workflow.bash (1)

841-870: LGTM: Temporary test skip with clear reasoning.

The Valkey test has been appropriately disabled with a clear reference to the blocking Drush issue (drush-ops/drush#6306). The approach of commenting out the test logic while preserving the code structure allows for easy re-enabling once the Drush dependency is updated.

tests/phpunit/Drupal/DatabaseSettingsTest.php (3)

7-9: PHPUnit 10 attribute imports correctly added.

The imports for DataProvider and Group attributes from PHPUnit\Framework\Attributes are properly added to support the modernized test annotation syntax.


15-15: Class-level group annotation modernized correctly.

The class-level @group drupal_settings docblock annotation has been properly replaced with the native PHP 8 attribute #[Group('drupal_settings')], aligning with PHPUnit 10 conventions.


21-21: Method-level data provider annotation modernized correctly.

The @dataProvider dataProviderDatabases docblock annotation has been correctly replaced with the #[DataProvider('dataProviderDatabases')] attribute, maintaining the same functionality while using modern PHPUnit syntax.

tests/phpunit/Drupal/EnvironmentSettingsTest.php (3)

7-9: PHPUnit 10 attribute imports correctly added.

The necessary imports for DataProvider and Group attributes are properly added to support the modernized annotation syntax.


23-23: Class-level group annotation modernized correctly.

The transition from @group drupal_settings docblock annotation to #[Group('drupal_settings')] attribute follows PHPUnit 10 best practices.


29-29: Method-level data provider annotation modernized correctly.

The data provider annotation has been correctly updated from docblock syntax to the native PHP 8 attribute #[DataProvider('dataProviderEnvironmentTypeDetection')].

web/modules/custom/ys_base/tests/src/Functional/ExampleTest.php (2)

7-7: PHPUnit attribute import correctly added.

The import for Group attribute is properly added to support the modernized test grouping syntax.


16-16: Class and method-level group annotations modernized correctly.

The group annotations have been properly updated from docblock syntax to PHP 8 attributes: #[Group('YsBase')] and #[Group('addition')].

Also applies to: 36-36

tests/phpunit/CircleCiConfigTest.php (3)

6-7: PHPUnit 10 attribute imports correctly added.

The necessary imports for DataProvider and Group attributes are properly added to support the modernized test annotation syntax.


22-22: Class-level group annotation modernized correctly.

The transition from @group ci docblock annotation to #[Group('ci')] attribute follows PHPUnit 10 conventions.


49-49: Method-level data provider annotations modernized correctly.

Both data provider annotations have been correctly updated from docblock syntax to native PHP 8 attributes: #[DataProvider('dataProviderDeployBranchRegex')] and #[DataProvider('dataProviderDeployTagRegex')].

Also applies to: 223-223

web/themes/custom/your_site_theme/tests/src/Functional/ExampleTest.php (2)

7-7: PHPUnit attribute import correctly added.

The import for Group attribute is properly added to support the modernized test grouping syntax.


16-16: Class and method-level group annotations modernized correctly.

The group annotations have been properly updated from docblock syntax to PHP 8 attributes: #[Group('YourSiteTheme')] and #[Group('addition')].

Also applies to: 36-36

tests/phpunit/Drupal/SwitchableSettingsTest.php (6)

7-9: PHPUnit attribute imports added correctly.

The imports for DataProvider and Group attributes support the modernization to PHPUnit 10+ syntax.


19-19: Class-level group converted to PHP 8 attribute.

The conversion from @group drupal_settings docblock annotation to #[Group('drupal_settings')] attribute follows PHPUnit 10+ best practices.


85-85: DataProvider attribute modernized correctly.

The conversion from @dataProvider annotation to #[DataProvider('dataProviderConfigSplit')] attribute is consistent with PHPUnit 10+ syntax.


172-172: DataProvider attribute applied correctly.

The #[DataProvider('dataProviderEnvironmentIndicator')] attribute properly replaces the docblock annotation.


340-340: DataProvider attribute updated appropriately.

The #[DataProvider('dataProviderShield')] attribute correctly modernizes the test metadata declaration.


572-572: DataProvider attribute converted properly.

The #[DataProvider('dataProviderStageFileProxy')] attribute follows the consistent modernization pattern.

web/modules/custom/ys_base/tests/src/Unit/ExampleTest.php (5)

7-9: PHPUnit attribute imports added correctly.

The imports for DataProvider and Group attributes enable the modernization to PHPUnit 10+ syntax.


17-17: Class-level group attribute applied correctly.

The #[Group('YsBase')] attribute properly replaces the docblock annotation for test grouping.


23-25: Method attributes converted appropriately.

The combination of #[DataProvider('dataProviderAdd')] and #[Group('addition')] attributes correctly modernizes the test metadata.


50-52: Multiple attributes applied correctly.

The #[DataProvider('dataProviderSubtract')] and #[Group('unit:subtraction')] attributes follow the consistent modernization pattern.


78-81: Multiple group attributes modernized correctly.

The test method uses multiple attributes: #[DataProvider('dataProviderMultiplication')], #[Group('multiplication')], and #[Group('skipped')], which correctly replaces the previous docblock annotations.

web/themes/custom/your_site_theme/tests/src/Kernel/ExampleTest.php (5)

7-9: PHPUnit attribute imports added correctly.

The imports for DataProvider and Group attributes support the PHPUnit 10+ attribute syntax modernization.


17-17: Class-level group attribute applied correctly.

The #[Group('YourSiteTheme')] attribute properly replaces the docblock annotation for theme test grouping.


23-25: Method attributes converted appropriately.

The #[DataProvider('dataProviderAdd')] and #[Group('addition')] attributes correctly modernize the test metadata declaration.


51-53: Kernel test attributes updated correctly.

The #[DataProvider('dataProviderSubtract')] and #[Group('kernel:subtraction')] attributes follow the consistent modernization pattern with appropriate kernel test grouping.


80-83: Multiple attributes applied correctly.

The test method uses multiple attributes: #[DataProvider('dataProviderMultiplication')], #[Group('multiplication')], and #[Group('skipped')], which correctly modernizes the previous docblock annotations.

web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (3)

7-9: PHPUnit attribute imports added correctly.

The imports for DataProvider and Group attributes enable the modernization to PHPUnit 10+ syntax.


17-17: Class-level group attribute applied correctly.

The #[Group('YourSiteTheme')] attribute properly replaces the docblock annotation for theme test grouping.


51-53: Unit test attributes updated correctly.

The #[DataProvider('dataProviderSubtract')] and #[Group('unit:subtraction')] attributes follow the consistent modernization pattern with appropriate unit test grouping.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/1613-update-to-rector2

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to commit July 24, 2025 07:00 Inactive
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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21109ad and aaf5f74.

⛔ Files ignored due to path filters (15)
  • .vortex/installer/tests/Fixtures/install/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.acquia.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (8)
  • composer.json (2 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (2 hunks)
  • web/modules/custom/ys_base/tests/src/Traits/MockTrait.php (1 hunks)
  • web/sites/default/default.services.yml (1 hunks)
  • web/sites/default/default.settings.php (2 hunks)
  • web/sites/default/includes/providers/settings.acquia.php (1 hunks)
  • web/sites/default/includes/providers/settings.container.php (1 hunks)
  • web/sites/default/includes/providers/settings.lagoon.php (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot
composer.json (2)

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-docs
🔇 Additional comments (11)
web/sites/default/default.services.yml (1)

241-244: LGTM! Well-documented memory optimization parameter.

The addition of entity.memory_cache.slots with a clear explanation of its impact on memory usage versus database requests is a good configuration addition. The default value of 1000 is reasonable for most use cases.

web/sites/default/default.settings.php (2)

70-73: LGTM! Clearer database configuration instructions.

The updated instructions are more straightforward by removing the @code/@Endcode references and providing clearer guidance for copying and uncommenting the sample database configuration.


315-315: LGTM! Accurate terminology correction.

Changing "Update Manager" to "Update Status" is more precise for describing the fallback HTTP functionality for fetching security advisories.

composer.json (2)

16-17: LGTM! Consistent Drupal core version updates.

The Drupal core packages are consistently updated from 11.1.8 to 11.2.2 across all core dependencies. This maintains version alignment and brings in the latest features and security updates.

Also applies to: 38-38


41-41: LGTM! Modern static analysis and refactoring tools.

The upgrades to PHPStan v2 and Rector v2, along with the explicit phpstan/phpstan dependency, enhance the project's code quality tooling. These major version updates bring improved performance and new features for better code analysis and automated refactoring.

Also applies to: 47-47, 49-49

web/sites/default/includes/providers/settings.acquia.php (1)

24-24: LGTM! Appropriate PHPStan suppression for dynamic require.

The PHPStan ignore directive is justified here since the Acquia settings file is environment-specific and won't exist in all contexts where static analysis runs. This prevents false positives while maintaining code quality checks elsewhere.

tests/phpunit/Drupal/SettingsTestCase.php (1)

132-132: LGTM! Standardized suppression annotation syntax.

The updates to quote the PHPMD warning types in @SuppressWarnings annotations improve consistency and clarity. The suppressions for PHPMD.ElseExpression are appropriate given the complex conditional logic in these test utility methods.

Also applies to: 311-311

web/modules/custom/ys_base/tests/src/Traits/MockTrait.php (2)

33-34: LGTM! Annotation syntax updated for static analysis compatibility.

The suppression annotations have been updated to use quoted warning names, which aligns with newer static analysis tool requirements and improves compatibility with the Rector 2 update.


37-37: Good improvement! Ensures proper array indexing after filtering.

The addition of array_values() ensures the filtered array has consecutive numeric keys, preventing potential issues with gaps in array indexing that could occur when array_filter() removes elements.

web/sites/default/includes/providers/settings.container.php (1)

15-20: Good refactoring to optimize environment variable access.

This change eliminates redundant getenv() calls by storing the environment variable value in a local variable. This improves performance by reducing system calls and enhances code readability.

web/sites/default/includes/providers/settings.lagoon.php (1)

64-68: Excellent refactoring for LAGOON_ROUTES handling.

This change perfectly follows the optimization pattern by storing the environment variable value and using it consistently throughout the code block, eliminating redundant getenv() calls.

@codecov
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.02%. Comparing base (33db5bc) to head (cd31314).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1827      +/-   ##
===========================================
- Coverage    74.14%   74.02%   -0.12%     
===========================================
  Files           84       84              
  Lines         4835     4813      -22     
  Branches        35       35              
===========================================
- Hits          3585     3563      -22     
  Misses        1250     1250              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/1613-update-to-rector2 branch from aaf5f74 to d1d325e Compare July 24, 2025 08:01
@github-actions github-actions bot temporarily deployed to commit July 24, 2025 08:03 Inactive
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: 3

♻️ Duplicate comments (1)
web/sites/default/includes/providers/settings.lagoon.php (1)

35-39: Repeated getenv() call – previous remark still applies

The condition still invokes getenv('LAGOON_GIT_BRANCH') twice. Saving the value once before the elseif would keep the code consistent with the refactor you applied immediately afterwards and avoids the extra syscall.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aaf5f74 and d1d325e.

⛔ Files ignored due to path filters (48)
  • .vortex/installer/tests/Fixtures/install/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/DatabaseSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deps_updates_provider_ci_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.acquia.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/timezone_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (16)
  • composer.json (2 hunks)
  • tests/phpunit/CircleCiConfigTest.php (3 hunks)
  • tests/phpunit/Drupal/DatabaseSettingsTest.php (1 hunks)
  • tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (2 hunks)
  • tests/phpunit/Drupal/SwitchableSettingsTest.php (6 hunks)
  • web/modules/custom/ys_base/tests/src/Kernel/ExampleTest.php (3 hunks)
  • web/modules/custom/ys_base/tests/src/Traits/MockTrait.php (1 hunks)
  • web/modules/custom/ys_base/tests/src/Unit/ExampleTest.php (3 hunks)
  • web/sites/default/default.services.yml (1 hunks)
  • web/sites/default/default.settings.php (2 hunks)
  • web/sites/default/includes/providers/settings.acquia.php (1 hunks)
  • web/sites/default/includes/providers/settings.container.php (1 hunks)
  • web/sites/default/includes/providers/settings.lagoon.php (2 hunks)
  • web/themes/custom/your_site_theme/tests/src/Kernel/ExampleTest.php (3 hunks)
  • web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot
composer.json (2)

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-docs
🔇 Additional comments (17)
web/sites/default/includes/providers/settings.container.php (1)

15-16: Good optimization to reduce redundant getenv() calls.

Storing the environment variable in a local variable eliminates redundant getenv() calls and improves both performance and code readability.

Also applies to: 20-20

web/sites/default/default.services.yml (1)

241-244: Well-documented memory cache configuration addition.

The new entity.memory_cache.slots parameter provides useful control over entity caching with clear documentation about the performance trade-offs. The default value of 1000 is reasonable for most use cases.

composer.json (1)

16-17: Systematic dependency updates align with PR objectives.

The updates successfully achieve the stated goals:

  • Drupal core packages upgraded to 11.2.2
  • Static analysis tooling modernized with PHPStan 2.x and Rector 2.x
  • New explicit phpstan/phpstan dependency ensures version consistency

Given the retrieved learning that these updates are managed via RenovateBot with compatibility checks, the version selections appear well-vetted.

Also applies to: 38-38, 41-41, 47-47, 49-49

web/sites/default/includes/providers/settings.acquia.php (1)

24-24: Appropriate PHPStan suppression for platform-specific include.

The targeted suppression directive properly handles legitimate static analysis warnings for the dynamic Acquia environment settings file include, aligning with the upgraded PHPStan 2.x tooling.

tests/phpunit/Drupal/SettingsTestCase.php (1)

132-132: Proper PHPMD annotation syntax update.

The quoted format for PHPMD suppression annotations ensures compatibility with updated static analysis tooling and follows more explicit syntax conventions.

Also applies to: 311-311

web/sites/default/default.settings.php (1)

70-74: Doc-block tweaks look good

Comment-only change improves wording and removes the unneeded “copy / uncomment” boilerplate. No further action required.

web/sites/default/includes/providers/settings.lagoon.php (1)

64-69: Good use of a local var for LAGOON_ROUTES

Caching the env value once and re-using it improves readability and avoids redundant calls. 👍

web/modules/custom/ys_base/tests/src/Kernel/ExampleTest.php (1)

7-9: Migration to PHP 8 attributes approved

Switching from doc-block annotations to #[DataProvider] / #[Group] is correct for PHPUnit ≥ 10 and keeps tests future-proof.

tests/phpunit/Drupal/DatabaseSettingsTest.php (1)

7-9: Attribute migration looks correct

The switch to #[Group] and #[DataProvider] is syntactically accurate and matches PHPUnit 10 conventions.

tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)

7-9: PHPUnit annotations successfully modernized to PHP 8 attributes.

The conversion from docblock annotations (@group, @dataProvider) to PHP 8 attributes (#[Group], #[DataProvider]) is correctly implemented. This modernization aligns with PHPUnit 10+ standards and improves type safety.

Also applies to: 23-23, 29-29

tests/phpunit/CircleCiConfigTest.php (1)

6-7: PHPUnit annotations successfully modernized to PHP 8 attributes.

The conversion from docblock annotations to PHP 8 attributes is correctly implemented across the class and both test methods. The modernization maintains all original functionality while improving compatibility with PHPUnit 10+.

Also applies to: 22-22, 49-49, 223-223

tests/phpunit/Drupal/SwitchableSettingsTest.php (1)

7-8: Comprehensive PHPUnit annotation modernization successfully completed.

All docblock annotations have been correctly converted to PHP 8 attributes across the class and all four test methods. The conversion maintains test functionality while modernizing to PHPUnit 10+ standards.

Also applies to: 19-19, 85-85, 172-172, 340-340, 572-572

web/modules/custom/ys_base/tests/src/Unit/ExampleTest.php (1)

7-8: PHPUnit annotation modernization correctly handles multiple attributes.

The conversion successfully handles both single and multiple attribute scenarios, including the testMultiplication method with multiple #[Group] attributes. All docblock annotations have been properly converted to PHP 8 attributes.

Also applies to: 17-17, 23-24, 50-51, 78-80

web/themes/custom/your_site_theme/tests/src/Kernel/ExampleTest.php (1)

7-8: Consistent PHPUnit annotation modernization across kernel tests.

The conversion maintains consistency with other test files in the codebase. All docblock annotations have been properly converted to PHP 8 attributes, including proper handling of multiple group attributes on the testMultiplication method.

Also applies to: 17-17, 23-24, 51-52, 80-82

web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (3)

7-9: Imports look correct for PHPUnit 10 attribute usage
The added DataProvider and Group attribute imports are accurate and scoped to the right namespace. No concerns here.


17-18: Confirm PHPUnit ≥ 10.1 in CI to support class-level #[Group] attribute
This attribute is only honoured by PHPUnit 10+. Double-check that composer.json now requires a compatible PHPUnit version and that CI images were updated accordingly.


51-53: Method grouping is clear
Tagging subtraction tests with 'unit:subtraction' refines filtering granularity—nice touch.

Comment on lines +33 to +37
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
* @SuppressWarnings("PHPMD.ElseExpression")
*/
protected function prepareMock(string $class, array $methods_map = [], array|bool $args = []): MockObject {
$methods = array_filter(array_keys($methods_map));
$methods = array_values(array_filter(array_keys($methods_map)));
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Calling onlyMethods([]) may explode when no methods supplied

MockBuilder::onlyMethods() throws if given an empty array. When $methods_map is empty the current code still calls it, risking an exception. Guard the call:

@@
-    $methods = array_values(array_filter(array_keys($methods_map)));
+    $methods = array_values(array_filter(array_keys($methods_map)));
@@
-    $mock = $mock->onlyMethods($methods)->getMock();
+    if ($methods) {
+      $mock = $mock->onlyMethods($methods)->getMock();
+    }
+    else {
+      $mock = $mock->getMock();
+    }
📝 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
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
* @SuppressWarnings("PHPMD.ElseExpression")
*/
protected function prepareMock(string $class, array $methods_map = [], array|bool $args = []): MockObject {
$methods = array_filter(array_keys($methods_map));
$methods = array_values(array_filter(array_keys($methods_map)));
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
* @SuppressWarnings("PHPMD.ElseExpression")
*/
protected function prepareMock(string $class, array $methods_map = [], array|bool $args = []): MockObject {
$methods = array_values(array_filter(array_keys($methods_map)));
if ($methods) {
$mock = $mock->onlyMethods($methods)->getMock();
} else {
$mock = $mock->getMock();
}
🤖 Prompt for AI Agents
In web/modules/custom/ys_base/tests/src/Traits/MockTrait.php around lines 33 to
37, the code calls MockBuilder::onlyMethods() with an array derived from
$methods_map without checking if it is empty, which can cause an exception. Fix
this by adding a condition to call onlyMethods() only if the array of methods is
not empty, otherwise skip that call to prevent the exception.

Comment on lines +23 to 25
#[DataProvider('dataProviderAdd')]
#[Group('addition')]
public function testAdd(int $a, int $b, int $expected, string|null $expectExceptionMessage = NULL): void {
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Optional: use class-constant reference to avoid string typos
DataProvider accepts a callable; using [self::class, 'dataProviderAdd'] (or self::class . '::dataProviderAdd' in PHPUnit 10.5+) makes renames safer than a bare string.

- #[DataProvider('dataProviderAdd')]
+ #[DataProvider([self::class, 'dataProviderAdd'])]
📝 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
#[DataProvider('dataProviderAdd')]
#[Group('addition')]
public function testAdd(int $a, int $b, int $expected, string|null $expectExceptionMessage = NULL): void {
#[DataProvider([self::class, 'dataProviderAdd'])]
#[Group('addition')]
public function testAdd(int $a, int $b, int $expected, string|null $expectExceptionMessage = NULL): void {
🤖 Prompt for AI Agents
In web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php around lines
23 to 25, the DataProvider attribute currently uses a string literal
'dataProviderAdd' which is prone to typos and harder to refactor. Change the
DataProvider annotation to use a class-constant callable reference like
[self::class, 'dataProviderAdd'] or self::class . '::dataProviderAdd' (for
PHPUnit 10.5+) to make renaming safer and avoid string typos.

Comment on lines +80 to 83
#[DataProvider('dataProviderMultiplication')]
#[Group('multiplication')]
#[Group('skipped')]
public function testMultiplication(int $a, int $b, int $expected, string|null $expectExceptionMessage = NULL): void {
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider a skip attribute instead of an extra “skipped” group
If these tests are meant to be conditionally disabled, use #[TestDox('…')]; $this->markTestSkipped() at runtime or the @requires/#[Requires] attributes rather than a custom group. Otherwise, leaving the additional group is harmless.

🤖 Prompt for AI Agents
In web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php around lines
80 to 83, replace the custom 'skipped' group attribute with a proper skip
mechanism. Remove the #[Group('skipped')] attribute and instead use
$this->markTestSkipped() inside the test method to conditionally skip tests at
runtime, or apply the appropriate @requires or #[Requires] attributes to declare
skip conditions. This aligns with best practices for skipping tests instead of
using a custom group.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/1613-update-to-rector2 branch from d1d325e to 5e2b9f2 Compare July 24, 2025 09:02
@github-actions github-actions bot temporarily deployed to commit July 24, 2025 09:04 Inactive
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

♻️ Duplicate comments (7)
web/sites/default/includes/providers/settings.lagoon.php (1)

35-39: Consider further optimization to eliminate redundant getenv() call

While this change improves performance by storing the environment variable, the condition on line 35 still calls getenv('LAGOON_GIT_BRANCH') before storing it. A previous review suggested a more complete optimization to eliminate this redundancy.

web/modules/custom/ys_base/tests/src/Unit/ExampleTest.php (2)

23-24: Optional: use callable reference in #[DataProvider] attributes
Passing the provider name as a bare string is legal but typo-prone and fragile during renames. Using an explicit callable ([self::class, 'dataProviderAdd']) makes static analysis happier and avoids silent failures.

- #[DataProvider('dataProviderAdd')]
+ #[DataProvider([self::class, 'dataProviderAdd'])]

Apply the same pattern to dataProviderSubtract and dataProviderMultiplication.

Also applies to: 50-51, 78-79


78-81: Prefer proper skip mechanism over sentinel “skipped” group
If these tests are meant to be disabled, mark them with $this->markTestSkipped() or an appropriate #[Requires]/#[Depends] attribute instead of a custom #[Group('skipped')], which may be overlooked by tooling.

web/themes/custom/your_site_theme/tests/src/Kernel/ExampleTest.php (2)

23-24: Optional: switch #[DataProvider] argument to callable for safer refactors
Replace the string literals with [self::class, 'methodName'] callables to eliminate hard-coded strings and gain IDE/analysis support.
Example:

- #[DataProvider('dataProviderAdd')]
+ #[DataProvider([self::class, 'dataProviderAdd'])]

Repeat for the other provider attributes.

Also applies to: 51-52, 80-81


80-83: Replace “skipped” group with an explicit skip instruction
Use PHPUnit’s skip facilities (markTestSkipped(), #[Requires], etc.) rather than a semantic group label that depends on external filtering.

web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (2)

23-24: Data provider string → callable (optional improvement)
Swap the string with a callable array to catch typos at compile time:

- #[DataProvider('dataProviderAdd')]
+ #[DataProvider([self::class, 'dataProviderAdd'])]

Apply similarly to the subtraction and multiplication tests.

Also applies to: 51-52, 80-81


80-83: Avoid custom ‘skipped’ group; leverage PHPUnit skip features
Relying on a bespoke group name can lead to unintended executions. Use markTestSkipped() or #[Requires] to express the intent unambiguously.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d1d325e and 5e2b9f2.

⛔ Files ignored due to path filters (55)
  • .vortex/installer/tests/Fixtures/install/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/DatabaseSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SettingsTestCase.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/modules/custom/sw_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/_baseline/web/themes/custom/star_wars/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deploy_type_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deps_updates_provider_ci_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/modules/custom/sw_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.services.yml is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/default.settings.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.acquia.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/providers/settings.container.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/themes/custom/star_wars/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Traits/MockTrait.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/modules/custom/the_force_base/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/names/web/themes/custom/lightsaber/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/provision_database_lagoon/web/sites/default/includes/providers/settings.lagoon.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_clamav/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_no_valkey/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Functional/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Kernel/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/theme_custom/web/themes/custom/light_saber/tests/src/Unit/ExampleTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/timezone_circleci/tests/phpunit/CircleCiConfigTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/install/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (18)
  • composer.json (2 hunks)
  • tests/phpunit/CircleCiConfigTest.php (3 hunks)
  • tests/phpunit/Drupal/DatabaseSettingsTest.php (1 hunks)
  • tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • tests/phpunit/Drupal/SettingsTestCase.php (2 hunks)
  • tests/phpunit/Drupal/SwitchableSettingsTest.php (6 hunks)
  • web/modules/custom/ys_base/tests/src/Functional/ExampleTest.php (3 hunks)
  • web/modules/custom/ys_base/tests/src/Kernel/ExampleTest.php (3 hunks)
  • web/modules/custom/ys_base/tests/src/Traits/MockTrait.php (1 hunks)
  • web/modules/custom/ys_base/tests/src/Unit/ExampleTest.php (3 hunks)
  • web/sites/default/default.services.yml (1 hunks)
  • web/sites/default/default.settings.php (2 hunks)
  • web/sites/default/includes/providers/settings.acquia.php (1 hunks)
  • web/sites/default/includes/providers/settings.container.php (1 hunks)
  • web/sites/default/includes/providers/settings.lagoon.php (2 hunks)
  • web/themes/custom/your_site_theme/tests/src/Functional/ExampleTest.php (3 hunks)
  • web/themes/custom/your_site_theme/tests/src/Kernel/ExampleTest.php (3 hunks)
  • web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot
composer.json (2)

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Composer dependencies are updated automatically with compatibility checks via RenovateBot

Learnt from: CR
PR: drevops/vortex#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T15:00:28.327Z
Learning: Node.js dependencies are updated in theme directories via RenovateBot

web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (2)

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/tests/Fixtures/install/deploy_type_none_gha/.github/workflows/build-test-deploy.yml:1-4
Timestamp: 2025-06-01T08:08:59.071Z
Learning: Test fixture files (typically located in directories containing "fixture" or "test") should not be reviewed for code quality issues as they may intentionally contain incomplete, invalid, or malformed data for testing purposes.

Learnt from: AlexSkrypnyk
PR: #1693
File: .vortex/installer/tests/Fixtures/install/hosting_acquia/docs/deployment.md:6-8
Timestamp: 2025-06-01T08:09:18.993Z
Learning: Do not review files in test fixture directories (e.g., files under paths containing /tests/Fixtures/ or similar test fixture patterns). These files are used for testing purposes and should remain as-is.

🧬 Code Graph Analysis (1)
web/themes/custom/your_site_theme/tests/src/Unit/ExampleTest.php (2)
web/modules/custom/ys_base/tests/src/Unit/ExampleTest.php (3)
  • DataProvider (23-35)
  • DataProvider (50-62)
  • Group (17-104)
web/themes/custom/your_site_theme/tests/src/Unit/YourSiteThemeUnitTestBase.php (1)
  • YourSiteThemeUnitTestBase (20-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-deployment (1)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-docs
🔇 Additional comments (16)
web/sites/default/default.settings.php (2)

70-73: Documentation improvement looks good.

The removal of @code and @endcode tags makes the database configuration instructions clearer for developers who need to copy and uncomment the sample code.


315-315: Correct terminology update.

Good catch updating "Update Manager" to "Update Status" to match the actual Drupal module name.

web/sites/default/includes/providers/settings.acquia.php (1)

24-24: Appropriate PHPStan suppression directive.

The @phpstan-ignore-next-line directive is correctly placed to suppress static analysis warnings for the dynamic require statement, which is appropriate since the file path may not exist in all environments.

tests/phpunit/Drupal/SettingsTestCase.php (1)

132-132: Standardized PHPMD suppression annotation syntax.

Good update to quote the PHPMD rule names in the @SuppressWarnings annotations, which standardizes the syntax and aligns with best practices.

Also applies to: 311-311

web/sites/default/includes/providers/settings.container.php (1)

15-16: Good optimization of environment variable usage.

Storing the VORTEX_LOCALDEV_URL environment variable in a local variable eliminates redundant getenv() calls and improves code readability. This is a solid performance optimization.

Also applies to: 20-20

web/sites/default/default.services.yml (1)

241-244: Well-documented new configuration parameter.

The entity.memory_cache.slots parameter is properly implemented with clear documentation explaining the memory vs. performance trade-off. The default value of 1000 seems reasonable and the comments help administrators understand when they might need to adjust this setting.

composer.json (2)

16-17: LGTM: Consistent Drupal core updates

The Drupal core packages are consistently updated from ~11.1.8 to ~11.2.2 across all three dependencies, which aligns with the PR objectives.

Also applies to: 38-38


41-41: LGTM: Development tool updates align with PR objectives

The updates to PHPStan (v2.0) and addition of Rector (v2.1) align with the PR objectives. The addition of direct phpstan/phpstan dependency supports the upgraded phpstan-drupal package.

Also applies to: 47-47, 49-49

web/sites/default/includes/providers/settings.lagoon.php (1)

64-68: LGTM: Clean environment variable optimization

The refactoring properly stores getenv('LAGOON_ROUTES') in a variable before use, eliminating redundant calls and improving readability.

web/modules/custom/ys_base/tests/src/Kernel/ExampleTest.php (1)

7-8: LGTM: Well-executed PHPUnit modernization

The conversion from PHPUnit docblock annotations to PHP 8 attributes is properly implemented with correct use statements and syntax. This modernization aligns with PHPUnit 10 best practices and is consistent with similar updates across the codebase.

Also applies to: 17-17, 23-24, 50-51, 78-80

web/modules/custom/ys_base/tests/src/Traits/MockTrait.php (2)

33-34: LGTM: Improved PHPMD suppression annotation formatting

The addition of double quotes around warning names improves consistency with suppression annotation formatting across the codebase.


37-37: Previous review concern remains unaddressed

While the array_values() addition improves array handling, the previous review comment identified a potential issue where onlyMethods([]) could throw an exception when given an empty array. This concern has not been addressed in the current changes.

The issue occurs on line 50 where onlyMethods($methods) is called without checking if $methods is empty.

Also applies to: 50-50

tests/phpunit/Drupal/DatabaseSettingsTest.php (1)

7-8: LGTM: Consistent PHPUnit modernization

The conversion from PHPUnit docblock annotations to PHP 8 attributes is properly implemented, maintaining all test metadata while modernizing to PHPUnit 10 standards. This is consistent with the broader modernization effort across the test suite.

Also applies to: 15-15, 21-21

tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)

7-9: Attribute migration looks good

The new use statements and attribute syntax are correct for PHPUnit 10+.
No functional impact observed.

Also applies to: 23-30

tests/phpunit/CircleCiConfigTest.php (1)

5-8: PHPUnit 10 attribute usage is correct

Group / DataProvider imports and attribute invocations match PHPUnit 10’s API.
Nothing else to flag.

Also applies to: 22-23, 49-52, 223-226

tests/phpunit/Drupal/SwitchableSettingsTest.php (1)

7-9: Consistent modernisation of test metadata

All Group and DataProvider attributes are syntactically correct and the imports are in place.
👍

Also applies to: 19-21, 85-87, 172-174, 340-342, 572-574

Comment on lines +47 to 48
#[Group('functional:subtraction')]
public function testSubtraction(): void {
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid characters in group name

Group('functional:subtraction') contains a colon. PHPUnit allows only [A-Za-z0-9_-] in group names and will throw InvalidArgumentException.

-#[Group('functional:subtraction')]
+#[Group('functional-subtraction')]

Apply the same rename anywhere the colon variant is used to prevent test-suite failures.

📝 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
#[Group('functional:subtraction')]
public function testSubtraction(): void {
#[Group('functional-subtraction')]
public function testSubtraction(): void {
🤖 Prompt for AI Agents
In web/modules/custom/ys_base/tests/src/Functional/ExampleTest.php at lines
47-48, the group name 'functional:subtraction' uses a colon, which is invalid in
PHPUnit group names. Replace the colon with an allowed character such as a
hyphen or underscore (e.g., 'functional-subtraction') and update all occurrences
of this group name in the codebase to prevent test-suite failures.

Comment on lines +47 to 48
#[Group('functional:subtraction')]
public function testSubtraction(): void {
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid characters in group name

Same issue as above – replace the colon with an allowed character.

-#[Group('functional:subtraction')]
+#[Group('functional-subtraction')]

Failing to adjust will break the functional test run under PHPUnit 10.

📝 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
#[Group('functional:subtraction')]
public function testSubtraction(): void {
#[Group('functional-subtraction')]
public function testSubtraction(): void {
🤖 Prompt for AI Agents
In web/themes/custom/your_site_theme/tests/src/Functional/ExampleTest.php at
lines 47 to 48, the group name 'functional:subtraction' contains an invalid
colon character. Replace the colon with an allowed character such as a hyphen or
underscore (e.g., 'functional-subtraction' or 'functional_subtraction') to
ensure compatibility with PHPUnit 10 and prevent test run failures.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/1613-update-to-rector2 branch from 5e2b9f2 to cd31314 Compare July 24, 2025 09:43
@github-actions github-actions bot temporarily deployed to commit July 24, 2025 09:45 Inactive
@AlexSkrypnyk AlexSkrypnyk merged commit 6a52e3c into develop Jul 24, 2025
30 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/1613-update-to-rector2 branch July 24, 2025 10:08
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Jul 24, 2025
@AlexSkrypnyk
Copy link
Member Author

Related: #1831

@AlexSkrypnyk AlexSkrypnyk added this to the 25.7.0 milestone Jul 26, 2025
@AlexSkrypnyk AlexSkrypnyk moved this from Release queue to Released in 25.7.0 in Vortex Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Upgrade to Drupal core 11.2 Update to Rector 2

2 participants