Updated Drupal dependencies and held 'rector/rector' at 2.6.2. - #321
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: 8 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughThe change updates Composer dependency constraints and replaces equivalent conditional assignments with PHP null-coalescing assignment in test environment setup and vocabulary-term caching. ChangesMaintenance updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The PR updates dependencies, restores Drupal deprecation checks, and applies localized equivalent syntax fixes; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #321 +/- ##
========================================
Coverage 86.56% 86.56%
========================================
Files 28 28
Lines 655 655
========================================
Hits 567 567
Misses 88 88 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| "drevops/vortex-tooling": "~1.4.0", | ||
| "drupal/ai_image_alt_text": "^1.0.2", | ||
| "drupal/ai_provider_openai": "^1.2.4", | ||
| "drupal/ai_provider_openai": "^1.2.5", |
There was a problem hiding this comment.
Routine maintenance round - no security releases. composer audit --locked returns zero advisories against the resulting lock, and drupal.org's contrib advisories list none for any project updated here.
None of these nine constraint changes were hand-edited. This repo sets "bump-after-update": true under config (line 140), so Composer raises each direct dependency's floor to whatever the update resolved. That is why the constraints move in lockstep with the lock file and why the diff carries no deliberate version decisions to review.
One package was deliberately excluded: rector/rector stays on 2.6.2. Its ^2.6.2 constraint is visible here as unchanged context, and it is intentionally left as a range rather than pinned - the newer release is still permitted, this round simply does not take it. The reason is that rector 2.6.5 turns RectorConfigBuilder::withSetProviders() into a deprecated no-op, and its documented replacement withComposerBased(drupal: true) is inert against the installed palantirnet/drupal-rector, which ships no DrupalSetList class. Taking that release would leave this project's Drupal deprecation rule sets loading from nowhere while ahoy lint still reported green - a silent loss of coverage. Holding at 2.6.2 keeps rector.php working as written and out of this diff entirely. Once drupal-rector ships DrupalSetList::COMPOSER_BASED, a later round can take 2.6.5 without any configuration change.
vincentlanglet/twig-cs-fixer ^4.0.2 → ^4.1.0 is the only minor bump among the direct dependencies. It added no findings against this codebase; ahoy lint is clean.
The remaining eight are patch-level floor raises on drupal/ai_provider_openai, drupal/drupal_helpers, drupal/generated_content, drupal/key_auth, drupal/preview_link, drupal/testmode, symfony/http-client and phpstan/phpstan. No package was added or removed, no major version moved, and nothing here changes configuration or database schema, so the deployment needs no config import or update hook beyond the usual.
drupal/core itself stays on 11.4.5 - no newer release existed at the time of this run - so the core phase of the update moved only core's transitive Symfony and Guzzle stack, visible in composer.lock rather than here.
| if (!isset($vars['TMP'])) { | ||
| $vars['TMP'] = NULL; | ||
| } | ||
| $vars['TMP'] ??= NULL; |
There was a problem hiding this comment.
A standalone readability cleanup, applied by ahoy lint-fix rather than hand-edited. It was surfaced by IfToNullCoalescingAssignRector, from the codeQuality prepared set rector.php already enables. rector/rector itself is held at 2.6.2 in this PR and is not part of the update, so nothing in the diff requires this change - it is kept because it is correct and reads better, and ahoy lint is green with or without it.
The rewrite is exact rather than merely equivalent-looking. isset() is false when a key is absent or holds NULL, and ??= assigns under precisely those two conditions, so if (!isset($vars['TMP'])) { $vars['TMP'] = NULL; } and $vars['TMP'] ??= NULL; do the same thing.
Worth stating plainly because $vars['TMP'] ??= NULL reads like a no-op: it is not. Assigning NULL to an absent key creates that key, and setEnvVars() relies on a present-but-NULL entry as the sentinel that unsets the real environment variable further down. The surviving comments still describe that intent correctly. If someone later "simplifies" these three lines away as pointless, the tests stop isolating themselves from the host environment.
ahoy test-unit passes - 367 tests, 1125 assertions - which exercises this base class across the settings test suite.
| if (!isset($this->vocabularyTermsCache[$vid])) { | ||
| $this->vocabularyTermsCache[$vid] = array_values($this->entityTypeManager->getStorage('taxonomy_term')->loadByProperties(['vid' => $vid])); | ||
| } | ||
| $this->vocabularyTermsCache[$vid] ??= array_values($this->entityTypeManager->getStorage('taxonomy_term')->loadByProperties(['vid' => $vid])); |
There was a problem hiding this comment.
Same standalone cleanup as in tests/phpunit/Drupal/SettingsTestCase.php, applied by ahoy lint-fix via IfToNullCoalescingAssignRector from the codeQuality prepared set. rector/rector is held at 2.6.2 in this PR, so this is not a consequence of a dependency change - no behaviour change was intended and none was made.
The one thing worth checking on this file specifically is that the lazy cache stays lazy. ??= short-circuits - the right-hand side is not evaluated when the left-hand side is already set - so loadByProperties() still runs only on a cache miss, exactly as the isset() guard arranged. Had this been rewritten to ?: or an unconditional assignment it would have turned a cached lookup into a storage query per call, on a trait used across the generated-content generators.
The array_values() wrapper is retained, so the "in storage order" contract in the docblock above still holds.
|
Code coverage (threshold: 80%) Per-class coverage |
Checklist before requesting a review
[#123] Verb in past tense.#123added to descriptionChangedsectionChanged
11.4.5because no new core release was available, moving 43 packages in total (39 patch, 4 minor), with none added or removed and zerocomposer auditadvisories.drupal/ai1.4.6to1.4.7,drupal/ai_provider_openai1.2.4to1.2.5,drupal/drupal_helpers2.1.0to2.1.1,drupal/generated_content2.1.0to2.1.1,drupal/key_auth2.2.0to2.2.3,drupal/layout_builder_restrictions3.0.5to3.0.6,drupal/preview_link2.2.1to2.2.3, anddrupal/testmode2.7.1to2.7.2; no patches needed re-rolling.rector/rectorat2.6.2and excluded it from this round. Its^2.6.2constraint is deliberately left unpinned, so the newer release stays permitted and a later round can take it without further change.IfToNullCoalescingAssignRectorcleanups from thecodeQualityprepared set, convertingissetguards to??=intests/phpunit/Drupal/SettingsTestCase.php(three guards) andweb/modules/custom/do_generated_content/src/Generator/VocabularyTermsTrait.php(one lazy-cache guard). Both rewrites are semantically identical:isset()is false exactly when a key is absent orNULL, which is precisely when??=assigns, and??=still short-circuits so the taxonomy term lookup runs only on a cache miss.Why
rector/rectoris held backrector2.6.5turnsRectorConfigBuilder::withSetProviders()into a deprecated no-op, and nothing in that release constructsSetProviderCollectorany more. Its documented replacement,withComposerBased(drupal: true), is inert against the installedpalantirnet/drupal-rector: the call is guarded onclass_exists('DrupalRector\Set\DrupalSetList'), and that package ships onlyDrupalSetProviderand the per-versionDrupal11SetList.With both paths dead, this project's Drupal deprecation rule sets would load from nowhere while
ahoy lintstill reported green - a silent loss of coverage rather than a visible failure. Staying on2.6.2keepsrector.phpworking exactly as written and keeps it out of this diff entirely. When drupal-rector shipsDrupalSetList::COMPOSER_BASED, a later update round can take2.6.5with no configuration change.Full dependency changelog (43 packages)
drupal/ai updated from
1.4.6to1.4.7patchdrupal/ai_provider_openai updated from
1.2.4to1.2.5patchdrupal/drupal_helpers updated from
2.1.0to2.1.1patchdrupal/generated_content updated from
2.1.0to2.1.1patchdrupal/key_auth updated from
2.2.0to2.2.3patchdrupal/layout_builder_restrictions updated from
3.0.5to3.0.6patchdrupal/preview_link updated from
2.2.1to2.2.3patchdrupal/testmode updated from
2.7.1to2.7.2patchguzzlehttp/guzzle updated from
7.15.3to7.15.5patchSee changes: guzzle/guzzle@7.15.3...7.15.5
Release notes: https://github.com/guzzle/guzzle/releases/tag/7.15.5
guzzlehttp/promises updated from
2.5.2to2.5.3patchSee changes: guzzle/promises@2.5.2...2.5.3
Release notes: https://github.com/guzzle/promises/releases/tag/2.5.3
guzzlehttp/psr7 updated from
2.13.0to2.13.1patchSee changes: guzzle/psr7@2.13.0...2.13.1
Release notes: https://github.com/guzzle/psr7/releases/tag/2.13.1
laravel/prompts updated from
v0.3.22tov0.3.24patchSee changes: laravel/prompts@v0.3.22...v0.3.24
Release notes: https://github.com/laravel/prompts/releases/tag/v0.3.24
myclabs/deep-copy updated from
1.13.4to1.14.0minorSee changes: myclabs/DeepCopy@1.13.4...1.14.0
Release notes: https://github.com/myclabs/DeepCopy/releases/tag/1.14.0
pear/archive_tar updated from
1.6.0to1.6.1patchSee changes: pear/Archive_Tar@1.6.0...1.6.1
Release notes: https://github.com/pear/Archive_Tar/releases/tag/1.6.1
phpstan/phpstan updated from
2.2.8to2.2.10patchsymfony/browser-kit updated from
v8.1.1tov8.1.5patchSee changes: symfony/browser-kit@v8.1.1...v8.1.5
Release notes: https://github.com/symfony/browser-kit/releases/tag/v8.1.5
symfony/config updated from
v7.4.16tov7.4.17patchSee changes: symfony/config@v7.4.16...v7.4.17
Release notes: https://github.com/symfony/config/releases/tag/v7.4.17
symfony/console updated from
v7.4.16tov7.4.18patchSee changes: symfony/console@v7.4.16...v7.4.18
Release notes: https://github.com/symfony/console/releases/tag/v7.4.18
symfony/css-selector updated from
v7.4.9tov7.4.18patchSee changes: symfony/css-selector@v7.4.9...v7.4.18
Release notes: https://github.com/symfony/css-selector/releases/tag/v7.4.18
symfony/dependency-injection updated from
v7.4.16tov7.4.17patchSee changes: symfony/dependency-injection@v7.4.16...v7.4.17
Release notes: https://github.com/symfony/dependency-injection/releases/tag/v7.4.17
symfony/dom-crawler updated from
v7.4.12tov7.4.17patchSee changes: symfony/dom-crawler@v7.4.12...v7.4.17
Release notes: https://github.com/symfony/dom-crawler/releases/tag/v7.4.17
symfony/error-handler updated from
v7.4.15tov7.4.17patchSee changes: symfony/error-handler@v7.4.15...v7.4.17
Release notes: https://github.com/symfony/error-handler/releases/tag/v7.4.17
symfony/event-dispatcher updated from
v7.4.15tov7.4.17patchSee changes: symfony/event-dispatcher@v7.4.15...v7.4.17
Release notes: https://github.com/symfony/event-dispatcher/releases/tag/v7.4.17
symfony/filesystem updated from
v7.4.15tov7.4.18patchSee changes: symfony/filesystem@v7.4.15...v7.4.18
Release notes: https://github.com/symfony/filesystem/releases/tag/v7.4.18
symfony/finder updated from
v7.4.14tov7.4.17patchSee changes: symfony/finder@v7.4.14...v7.4.17
Release notes: https://github.com/symfony/finder/releases/tag/v7.4.17
symfony/http-client updated from
v6.4.43tov6.4.45patchSee changes: symfony/http-client@v6.4.43...v6.4.45
Release notes: https://github.com/symfony/http-client/releases/tag/v6.4.45
symfony/http-client-contracts updated from
v3.7.1tov3.7.3patchSee changes: symfony/http-client-contracts@v3.7.1...v3.7.3
Release notes: https://github.com/symfony/http-client-contracts/releases/tag/v3.7.3
symfony/http-foundation updated from
v7.4.16tov7.4.18patchSee changes: symfony/http-foundation@v7.4.16...v7.4.18
Release notes: https://github.com/symfony/http-foundation/releases/tag/v7.4.18
symfony/http-kernel updated from
v7.4.16tov7.4.18patchSee changes: symfony/http-kernel@v7.4.16...v7.4.18
Release notes: https://github.com/symfony/http-kernel/releases/tag/v7.4.18
symfony/mailer updated from
v7.4.15tov7.4.17patchSee changes: symfony/mailer@v7.4.15...v7.4.17
Release notes: https://github.com/symfony/mailer/releases/tag/v7.4.17
symfony/mime updated from
v7.4.16tov7.4.18patchSee changes: symfony/mime@v7.4.16...v7.4.18
Release notes: https://github.com/symfony/mime/releases/tag/v7.4.18
symfony/polyfill-intl-idn updated from
v1.38.1tov1.42.0minorSee changes: symfony/polyfill-intl-idn@v1.38.1...v1.42.0
Release notes: https://github.com/symfony/polyfill-intl-idn/releases/tag/v1.42.0
symfony/polyfill-intl-normalizer updated from
v1.38.0tov1.42.0minorSee changes: symfony/polyfill-intl-normalizer@v1.38.0...v1.42.0
Release notes: https://github.com/symfony/polyfill-intl-normalizer/releases/tag/v1.42.0
symfony/process updated from
v7.4.13tov7.4.18patchSee changes: symfony/process@v7.4.13...v7.4.18
Release notes: https://github.com/symfony/process/releases/tag/v7.4.18
symfony/routing updated from
v7.4.15tov7.4.18patchSee changes: symfony/routing@v7.4.15...v7.4.18
Release notes: https://github.com/symfony/routing/releases/tag/v7.4.18
symfony/serializer updated from
v7.4.16tov7.4.18patchSee changes: symfony/serializer@v7.4.16...v7.4.18
Release notes: https://github.com/symfony/serializer/releases/tag/v7.4.18
symfony/service-contracts updated from
v3.7.1tov3.7.3patchSee changes: symfony/service-contracts@v3.7.1...v3.7.3
Release notes: https://github.com/symfony/service-contracts/releases/tag/v3.7.3
symfony/translation updated from
v7.4.16tov7.4.17patchSee changes: symfony/translation@v7.4.16...v7.4.17
Release notes: https://github.com/symfony/translation/releases/tag/v7.4.17
symfony/validator updated from
v7.4.16tov7.4.18patchSee changes: symfony/validator@v7.4.16...v7.4.18
Release notes: https://github.com/symfony/validator/releases/tag/v7.4.18
symfony/var-dumper updated from
v7.4.15tov7.4.18patchSee changes: symfony/var-dumper@v7.4.15...v7.4.18
Release notes: https://github.com/symfony/var-dumper/releases/tag/v7.4.18
symfony/var-exporter updated from
v7.4.16tov7.4.18patchSee changes: symfony/var-exporter@v7.4.16...v7.4.18
Release notes: https://github.com/symfony/var-exporter/releases/tag/v7.4.18
symfony/yaml updated from
v7.4.15tov7.4.18patchSee changes: symfony/yaml@v7.4.15...v7.4.18
Release notes: https://github.com/symfony/yaml/releases/tag/v7.4.18
vincentlanglet/twig-cs-fixer updated from
4.0.2to4.1.0minorSee changes: VincentLanglet/Twig-CS-Fixer@4.0.2...4.1.0
Release notes: https://github.com/VincentLanglet/Twig-CS-Fixer/releases/tag/4.1.0
Screenshots
N/A
Before / After