Skip to content

Commit 77f7f41

Browse files
authored
Merge pull request #488 from garak/ci-fix-fixer
fix fixer check in CI
2 parents 0748d7c + 57dc3de commit 77f7f41

12 files changed

+16
-19
lines changed

.github/workflows/build.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
check:
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v4
@@ -15,15 +15,17 @@ jobs:
1515
- name: Validate composer.json
1616
run: composer validate --strict --no-check-lock
1717
cs-fixer:
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919
name: PHP-CS-Fixer
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v4
2323
- name: Fix CS
2424
uses: docker://oskarstark/php-cs-fixer-ga
25+
with:
26+
args: --diff --dry-run
2527
tests:
26-
runs-on: ubuntu-22.04
28+
runs-on: ubuntu-24.04
2729
strategy:
2830
fail-fast: false
2931
matrix:

src/DependencyInjection/Compiler/AddExtensionsPass.php

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* @author Christophe Coevoet <[email protected]>
1414
*
1515
* @internal
16-
* @final
1716
*/
1817
final class AddExtensionsPass implements CompilerPassInterface
1918
{

src/DependencyInjection/Compiler/AddProvidersPass.php

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* @author Christophe Coevoet <[email protected]>
1414
*
1515
* @internal
16-
* @final
1716
*/
1817
final class AddProvidersPass implements CompilerPassInterface
1918
{

src/DependencyInjection/Compiler/AddRenderersPass.php

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* @author Christophe Coevoet <[email protected]>
1515
*
1616
* @internal
17-
* @final
1817
*/
1918
final class AddRenderersPass implements CompilerPassInterface
2019
{

src/DependencyInjection/Compiler/AddVotersPass.php

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* @author Christophe Coevoet <[email protected]>
1414
*
1515
* @internal
16-
* @final
1716
*/
1817
final class AddVotersPass implements CompilerPassInterface
1918
{

src/DependencyInjection/Compiler/MenuBuilderPass.php

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* @author Christophe Coevoet <[email protected]>
1212
*
1313
* @internal
14-
* @final
1514
*/
1615
final class MenuBuilderPass implements CompilerPassInterface
1716
{

src/DependencyInjection/Compiler/RegisterMenusPass.php

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* @author Christophe Coevoet <[email protected]>
1414
*
1515
* @internal
16-
* @final
1716
*/
1817
final class RegisterMenusPass implements CompilerPassInterface
1918
{

src/DependencyInjection/KnpMenuExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function load(array $configs, ContainerBuilder $container): void
3232
$container->setParameter('knp_menu.renderer.twig.template', $config['twig']['template']);
3333
}
3434
if ($config['templating']) {
35-
trigger_deprecation('knplabs/knp-menu-bundle', '3.3', 'Using the templating component is deprecated since version 3.3, this option will be removed in version 4.');
35+
\trigger_deprecation('knplabs/knp-menu-bundle', '3.3', 'Using the templating component is deprecated since version 3.3, this option will be removed in version 4.');
3636
$loader->load('templating.xml');
3737
}
3838

src/Provider/BuilderAliasProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ final class BuilderAliasProvider implements MenuProviderInterface
1919
private array $builders = [];
2020

2121
public function __construct(private KernelInterface $kernel, private ContainerInterface $container, private FactoryInterface $menuFactory)
22-
{}
22+
{
23+
}
2324

2425
/**
2526
* Looks for a menu with the bundle:class:method format.
@@ -79,7 +80,6 @@ private function getBuilder(string $bundleName, string $className): object
7980
$name = \sprintf('%s:%s', $bundleName, $className);
8081

8182
if (!isset($this->builders[$name])) {
82-
8383
$bundle = $this->kernel->getBundle($bundleName);
8484
$try = $bundle->getNamespace().'\\Menu\\'.$className;
8585

src/Templating/Helper/MenuHelper.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
class MenuHelper extends TemplatingHelper
1212
{
1313
public function __construct(private Helper $helper, private MatcherInterface $matcher, private MenuManipulator $menuManipulator)
14-
{}
14+
{
15+
}
1516

1617
/**
1718
* Retrieves an item following a path in the tree.
1819
*
19-
* @param \Knp\Menu\ItemInterface|string $menu
20+
* @param ItemInterface|string $menu
2021
*
21-
* @return \Knp\Menu\ItemInterface
22+
* @return ItemInterface
2223
*/
2324
public function get($menu, array $path = [], array $options = [])
2425
{
@@ -28,8 +29,8 @@ public function get($menu, array $path = [], array $options = [])
2829
/**
2930
* Renders a menu with the specified renderer.
3031
*
31-
* @param \Knp\Menu\ItemInterface|string|array $menu
32-
* @param string $renderer
32+
* @param ItemInterface|string|array $menu
33+
* @param string $renderer
3334
*
3435
* @return string
3536
*/

tests/Provider/BuilderAliasProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function testGetExistentMenu(): void
4444

4545
public function testGetContainerAwareMenu(): void
4646
{
47-
if (!interface_exists(ContainerAwareInterface::class)) {
47+
if (!\interface_exists(ContainerAwareInterface::class)) {
4848
self::markTestSkipped('missing interface');
4949
}
5050
$item = $this->getMockBuilder('Knp\Menu\ItemInterface')->getMock();

tests/Stubs/Menu/ContainerAwareBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ContainerAwareBuilder implements ContainerAwareInterface
1111
{
1212
private ContainerInterface $container;
1313

14-
public function setContainer(ContainerInterface $container = null): void
14+
public function setContainer(?ContainerInterface $container = null): void
1515
{
1616
$this->container = $container;
1717
}

0 commit comments

Comments
 (0)