Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the tools #5320

Merged
merged 1 commit into from Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions core-bundle/tests/Framework/ContaoFrameworkTest.php
Expand Up @@ -283,6 +283,11 @@ public function testRegistersTheHookServices(): void
$this->assertArrayHasKey('parseTemplate', $GLOBALS['TL_HOOKS']);
$this->assertArrayHasKey('isVisibleElement', $GLOBALS['TL_HOOKS']);

$getPageLayout = $GLOBALS['TL_HOOKS']['getPageLayout'];
$generatePage = $GLOBALS['TL_HOOKS']['generatePage'];
$parseTemplate = $GLOBALS['TL_HOOKS']['parseTemplate'];
$isVisibleElement = $GLOBALS['TL_HOOKS']['isVisibleElement'];

// Test hooks with high priority are added before low and legacy hooks
// Test legacy hooks are added before hooks with priority 0
$this->assertSame(
Expand All @@ -291,7 +296,7 @@ public function testRegistersTheHookServices(): void
['test.listener.c', 'onGetPageLayout'],
['test.listener.b', 'onGetPageLayout'],
],
$GLOBALS['TL_HOOKS']['getPageLayout']
$getPageLayout
);

// Test hooks with negative priority are added at the end
Expand All @@ -301,7 +306,7 @@ public function testRegistersTheHookServices(): void
['test.listener.b', 'onGeneratePage'],
['test.listener.a', 'onGeneratePage'],
],
$GLOBALS['TL_HOOKS']['generatePage']
$generatePage
);

// Test legacy hooks are kept when adding only hook listeners with high priority.
Expand All @@ -310,7 +315,7 @@ public function testRegistersTheHookServices(): void
['test.listener.a', 'onParseTemplate'],
['test.listener.c', 'onParseTemplate'],
],
$GLOBALS['TL_HOOKS']['parseTemplate']
$parseTemplate
);

// Test legacy hooks are kept when adding only hook listeners with low priority.
Expand All @@ -319,7 +324,7 @@ public function testRegistersTheHookServices(): void
['test.listener.c', 'onIsVisibleElement'],
['test.listener.a', 'onIsVisibleElement'],
],
$GLOBALS['TL_HOOKS']['isVisibleElement']
$isVisibleElement
);
}

Expand Down
5 changes: 4 additions & 1 deletion core-bundle/tests/Twig/Interop/ContextFactoryTest.php
Expand Up @@ -30,14 +30,17 @@ public function testCreateContextFromTemplate(): void
$object = new \stdClass();
$object->x = 'y';

// Work around https://github.com/phpstan/phpstan/issues/8078
$closure = static fn (): string => 'evaluated Closure';

$data = [
'foo' => 'bar',
'a' => [1, 2],
'o' => $object,
'lazy1' => static fn (): string => 'evaluated',
'lazy2' => static fn (int $n = 0): string => "evaluated: $n",
'lazy3' => static fn (): array => [1, 2],
'lazy4' => (static fn (): string => 'evaluated Closure')(...),
'lazy4' => $closure(...),
'value' => 'strtolower', // do not confuse with callable
];

Expand Down
60 changes: 30 additions & 30 deletions tools/phpstan/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions tools/rector/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.