Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"require": {
"php": "^8.2",
"symfony/cache-contracts": "^2.5 || ^3.3",
"symfony/config": "^5.4 || ^6.0 || ^7.0 || ^8.0",
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0 || ^8.0",
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0 || ^8.0"
"symfony/config": "^6.1 || ^7.0 || ^8.0",
"symfony/dependency-injection": "^6.1 || ^7.0 || ^8.0",
"symfony/http-kernel": "^6.1 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^11.1",
Expand Down
12 changes: 12 additions & 0 deletions config/services.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);

use Pixelshaped\FlatMapperBundle\FlatMapper;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $container): void {
$services = $container->services();

$services->set('pixelshaped_flat_mapper.flat_mapper', FlatMapper::class)->public();
$services->alias(FlatMapper::class, 'pixelshaped_flat_mapper.flat_mapper');
};
10 changes: 0 additions & 10 deletions config/services.xml

This file was deleted.

2 changes: 1 addition & 1 deletion src/PixelshapedFlatMapperBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PixelshapedFlatMapperBundle extends AbstractBundle
*/
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
{
$container->import('../config/services.xml');
$container->import('../config/services.php');

$flatMapper = $builder->getDefinition('pixelshaped_flat_mapper.flat_mapper');
if($config['cache_service'] !== null) {
Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/BundleFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function registerBundles(): iterable
new PixelshapedFlatMapperBundle(),
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
}
}
Expand All @@ -56,7 +56,7 @@ public function registerBundles(): iterable
new PixelshapedFlatMapperBundle(),
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(function ($container) {
// Register a mock cache service
Expand Down Expand Up @@ -99,4 +99,4 @@ public function tag(iterable|string $tags): static { return $this; }
public function getMetadata(): array { return []; }
};
}
}
}