Skip to content
Snippets Groups Projects

add in updates suggested by upgrade status review.

Merged Robert Bryan requested to merge issue/components-3428529:3428529-upgrade-status-errors into 3.x
5 unresolved threads

Closes #3428529

Merge request reports

Approval is optional
Code Quality is loading
Test summary results are being parsed

Merged by Adam BramleyAdam Bramley 7 months ago (Sep 9, 2024 10:30pm UTC)

Merge details

  • Changes merged into with e3f631a1.
  • Did not delete the source branch.

Pipeline #278639 passed with warnings

Pipeline passed with warnings for e3f631a1 on 3.x

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 29 29 protected $systemUnderTest;
    30 30
    31 /**
    32 * Path to the mocked modules directory.
    33 *
    34 * @var string
    35 */
    36 protected $modulesDir = 'modules/contrib';
    37
    38 /**
    39 * Path to the mocked themes directory.
    40 *
    41 * @var string
    42 */
    43 protected $themesDir = 'themes/contrib';
    44
  • 294 280 );
    295 281
    296 282 if (!empty($expectedWarnings)) {
    297 $consecutiveCalls = [];
    298 foreach ($expectedWarnings as $key => $warning) {
    299 $consecutiveCalls[$key] = [$warning];
    300 }
    301 283 $this->loggerChannel
    302 284 ->expects($this->exactly(count($expectedWarnings)))
    303 285 ->method('warning')
    304 ->withConsecutive(...$consecutiveCalls);
    286 ->with($this->callback(function (string $value) use (&$expectedWarnings) {
    287 return $value === array_shift($expectedWarnings);
    288 }));
  • 556
    557 foreach ([$moduleHandler, $themeManager] as $extensionHandler) {
    592 558 $extensionHandler
    593 559 ->method('alter')
    594 ->withConsecutive(...$alter);
    560 ->with(
    561 $this->callback(function ($value) {
    562 return $value === 'protected_twig_namespaces' || $value === 'components_namespaces';
    563 }),
    564 $this->callback(function ($value) use ($themeName, $allNamespacesCache, $expected, $protected) {
    565 return $value === $protected || $value === ($allNamespacesCache[$themeName] ?? []) || ($value === $expected[$themeName] ?? []);
    566 }),
    567 $this->callback(function ($value) use ($themeName) {
    568 return $value === NULL || $value === $themeName;
    569 }),
    570 );
    • I spent a long time trying to figure out the best way to do these, there's not many good ways to do it. This simply allows for a handful of values in each parameter. While that doesn't necessarily match exactly the set of parameters, I think its a good middle ground without making these tests more insane.

    • Please register or sign in to reply
  • 17 17 */
    18 18 public function getFunctions(): array {
    19 19 return [
    20 new TwigFunction('template', [$this, 'template'], ['is_variadic' => TRUE]),
    20 new TwigFunction('template', $this->template(...), ['is_variadic' => TRUE]),
  • 8 php: 8.0
  • Started to review but got lost in the unit tests. A few suggestions for now anyway.

  • Adam Bramley added 1 commit

    added 1 commit

    • cd6c8e06 - Require supported versions of PHP and Drupal

    Compare with previous version

  • Pierre Rudloff
  • merged

  • Please register or sign in to reply
    Loading