Skip to content
This repository has been archived by the owner on Aug 21, 2021. It is now read-only.

Commit

Permalink
Fix broken resource tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
sstok committed Dec 3, 2019
1 parent 8fca897 commit 1cf5cb1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DependencyInjection/Compiler/RouteResourcePass.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ function ($id) {
array_keys($container->findTaggedServiceIds(self::TAG_NAME))
);

$container->getDefinition('rollerworks_route_autowiring.route_loader')->replaceArgument(2, $trackedResources);
$container->getDefinition('rollerworks_route_autowiring.route_loader')->replaceArgument(1, $trackedResources);
}
}
1 change: 0 additions & 1 deletion src/Resources/config/services/routing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<service id="rollerworks_route_autowiring.route_loader" class="Rollerworks\Bundle\RouteAutowiringBundle\RouteSlotLoader" public="false">
<tag name="routing.loader" />
<argument type="service" id="service_container" />
<argument type="collection" /> <!-- Routing imports. Populated by RouteAutowiringPass -->
<argument type="collection" /> <!-- Tracked resources. Populated by RouteAutowiringPass -->
</service>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function it_registers_the_route_resources()
$this->compile();

$loaderDef = $this->container->findDefinition('rollerworks_route_autowiring.route_loader');
$resources = $loaderDef->getArgument(2);
$resources = $loaderDef->getArgument(1);

// Resources are provided as service References, but id cannot be predicted.
// So instead loop trough each and analyze the actual referenced service definition.
Expand Down

0 comments on commit 1cf5cb1

Please sign in to comment.