diff --git a/src/Annotation/RestAnnotationInterface.php b/src/Annotation/RestAnnotationInterface.php index 4501bd3..56ecc94 100644 --- a/src/Annotation/RestAnnotationInterface.php +++ b/src/Annotation/RestAnnotationInterface.php @@ -1,11 +1,9 @@ load('services.xml'); $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/services')); - if (class_exists(AttributeRouteControllerLoader::class)) { - $loader->load('annotations.xml'); - - if (PHP_VERSION_ID >= 80000) { - $loader->load('attributes.xml'); - } - } else { - $loader->load('annotations_legacy.xml'); - } + class_exists(AttributeRouteControllerLoader::class) + ? $loader->load('attributes.xml') + : $loader->load('annotations.xml') + ; $container->setParameter('paysera_api.locales', $config['locales']); if (count($config['locales']) === 0) { diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml index d282980..c50611c 100644 --- a/src/Resources/config/services.xml +++ b/src/Resources/config/services.xml @@ -18,6 +18,11 @@ + + + + diff --git a/src/Resources/config/services/annotations.xml b/src/Resources/config/services/annotations.xml index bfd252d..35b69eb 100644 --- a/src/Resources/config/services/annotations.xml +++ b/src/Resources/config/services/annotations.xml @@ -2,13 +2,13 @@ + xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd"> - + @@ -16,10 +16,5 @@ - - - - diff --git a/src/Resources/config/services/annotations_legacy.xml b/src/Resources/config/services/annotations_legacy.xml deleted file mode 100644 index 06531f1..0000000 --- a/src/Resources/config/services/annotations_legacy.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/Resources/config/services/attributes.xml b/src/Resources/config/services/attributes.xml index 0bec16e..77d4b6f 100644 --- a/src/Resources/config/services/attributes.xml +++ b/src/Resources/config/services/attributes.xml @@ -4,13 +4,17 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd"> - - - - - - - + + + + + + + + diff --git a/src/Service/Annotation/ReflectionMethodWrapper.php b/src/Service/RoutingLoader/ReflectionMethodWrapper.php similarity index 96% rename from src/Service/Annotation/ReflectionMethodWrapper.php rename to src/Service/RoutingLoader/ReflectionMethodWrapper.php index 9e22eb2..20fc145 100644 --- a/src/Service/Annotation/ReflectionMethodWrapper.php +++ b/src/Service/RoutingLoader/ReflectionMethodWrapper.php @@ -1,7 +1,7 @@