Skip to content

Commit

Permalink
Actualizada las dependencias para symfony v7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fsangar committed Jan 28, 2024
1 parent 2377dc7 commit ee35a3a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"require": {
"php": ">=7.2",
"symfony/framework-bundle": "^4.4|^5.0|^6.0",
"symfony/framework-bundle": "^6.0|^7.0",
"twig/twig": "^2.15|^3.0",
"symfony/deprecation-contracts": "^2.4|^3.0"
},
Expand All @@ -23,10 +23,10 @@
},
"require-dev": {
"symfony/phpunit-bridge": "^5.0|^6.0",
"nyholm/symfony-bundle-test": "^v2.0",
"nyholm/symfony-bundle-test": "^3.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"doctrine/doctrine-bundle": "^v1.0|^v2.0",
"doctrine/annotations": "^v1.7",
"doctrine/annotations": "^2.0",
"symfony/twig-bundle": "^3.4|^4.0|^5.0|^6.0"
},
"autoload-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class Configuration implements ConfigurationInterface
{
#[\ReturnTypeWillChange]
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('apy_breadcrumb_trail');
// BC layer for symfony/config < 4.2
Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/BreadcrumbListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function onKernelController(KernelEvent $event)
throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class));
}

if (HttpKernelInterface::MASTER_REQUEST == $event->getRequestType()) {
if (HttpKernelInterface::MAIN_REQUEST == $event->getRequestType()) {
$this->breadcrumbTrail->reset();

// Annotations from class
Expand Down
9 changes: 9 additions & 0 deletions src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,14 @@
<tag name="kernel.event_listener" event="kernel.controller" method="onKernelController" priority="-1" />
</service>
<service id="apy_breadcrumb_trail.annotation.listener" alias="APY\BreadcrumbTrailBundle\EventListener\BreadcrumbListener" public="true" />

<!-- Definición del servicio AnnotationReader -->
<service id="Doctrine\Common\Annotations\AnnotationReader" />

<!-- Definición del servicio BreadcrumbListener -->
<service id="APY\BreadcrumbTrailBundle\EventListener\BreadcrumbListener">
<argument type="service" id="Doctrine\Common\Annotations\AnnotationReader" />
<tag name="kernel.event_listener" event="kernel.controller" method="onKernelController" priority="-1" />
</service>
</services>
</container>

0 comments on commit ee35a3a

Please sign in to comment.