Skip to content

Commit 1409d07

Browse files
maltehuebnerclaude
andcommitted
Replace XmlFileLoader with YamlFileLoader for Symfony 8 compatibility
XmlFileLoader was removed in Symfony 8, causing a fatal error at kernel boot. Converts service configuration from XML to YAML and removes related PHPStan baseline entries. Closes #21 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e9aada7 commit 1409d07

4 files changed

Lines changed: 23 additions & 34 deletions

File tree

config/services.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

config/services.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
services:
2+
_defaults:
3+
autowire: true
4+
autoconfigure: true
5+
public: true
6+
7+
MalteHuebner\DataQueryBundle\:
8+
resource: '../src/{DataQueryManager,Factory,FieldList,FinderFactory,Manager,Parameter,Query,RequestParamterList,Validator}'
9+
exclude: '../src/{DependencyInjection,tests,MalteHuebnerDataQueryBundle}'
10+
11+
Psr\Container\ContainerInterface:
12+
alias: service_container
13+
14+
MalteHuebner\DataQueryBundle\DataQueryManager\DataQueryManagerInterface:
15+
class: MalteHuebner\DataQueryBundle\DataQueryManager\DataQueryManager
16+
17+
MalteHuebner\DataQueryBundle\FinderFactory\FinderFactory:
18+
arguments:
19+
- !service_locator
20+
Doctrine\ORM\EntityManagerInterface: '@?doctrine.orm.entity_manager'
21+
FOS\ElasticaBundle\Manager\RepositoryManagerInterface: '@?fos_elastica.manager'

phpstan-baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: "#^Call to method load\\(\\) on an unknown class Symfony\\\\Component\\\\DependencyInjection\\\\Loader\\\\XmlFileLoader\\.$#"
5-
count: 1
6-
path: src/DependencyInjection/MalteHuebnerDataQueryExtension.php
7-
8-
-
9-
message: "#^Instantiated class Symfony\\\\Component\\\\DependencyInjection\\\\Loader\\\\XmlFileLoader not found\\.$#"
10-
count: 1
11-
path: src/DependencyInjection/MalteHuebnerDataQueryExtension.php
12-
133
-
144
message: "#^Deprecated in PHP 8\\.4\\: Parameter \\#3 \\$parameterName \\(string\\) is implicitly nullable via default value null\\.$#"
155
count: 1

src/DependencyInjection/MalteHuebnerDataQueryExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function load(array $configs, ContainerBuilder $container): void
1616
$configuration = new Configuration(false);
1717
$config = $this->processConfiguration($configuration, $configs);
1818

19-
$xmlLoader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
20-
$xmlLoader->load('services.xml');
19+
$yamlLoader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../../config'));
20+
$yamlLoader->load('services.yaml');
2121
}
2222
}

0 commit comments

Comments
 (0)