Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 570a239

Browse files
committed
Add source resource
1 parent 71b0f8d commit 570a239

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ public function loadRoutes(LoaderInterface $loader)
108108
// todo: adding routes in the configureRoutes method is deprecated...
109109
}
110110

111-
$this->configureRouting(new RoutingConfigurator($collection, $loader));
111+
$file = (new \ReflectionObject($this))->getFileName();
112+
$routes = new RoutingConfigurator($collection, $loader, null, $file);
113+
$this->configureRouting($routes);
112114

113115
return $collection;
114116
}

src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ private function load($resource, $type = null, $ignoreErrors = false)
8080
}
8181

8282
if (null === $resolver = $this->loader->getResolver()) {
83-
throw new LoaderLoadException($resource, null, null, null, $type);
83+
throw new LoaderLoadException($resource, $this->file, null, null, $type);
8484
}
8585

8686
if (false === $loader = $resolver->resolve($resource, $type)) {
87-
throw new LoaderLoadException($resource, null, null, null, $type);
87+
throw new LoaderLoadException($resource, $this->file, null, null, $type);
8888
}
8989

9090
return $loader->load($resource, $type);

0 commit comments

Comments
 (0)