Skip to content

Commit b31d6eb

Browse files
Merge branch '4.1'
* 4.1: (22 commits) Fix CS [PropertyInfo] fix resolving parent|self type hints fixed CS fix merge [Security] Fix logout Cleanup 2 tests for the HttpException classes #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later [Config] Fix tests when path contains UTF chars [DI] Shared services should not be inlined in non-shared ones [Profiler] Remove propel & event_listener_loading category identifiers [Filesystem] Fix usages of error_get_last() [Cache][Lock] Fix usages of error_get_last() [Debug] Fix populating error_get_last() for handled silent errors fixed CS fixed CS fixed CS [FrameworkBundle] Fix cache:clear on vagrant [HttpKernel] Handle NoConfigurationException "onKernelException()" Fix misses calculation when calling getItems [DI] Display previous error messages when throwing unused bindings ...
2 parents 1de699e + 381a5d0 commit b31d6eb

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Loader/AnnotationClassLoader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Doctrine\Common\Annotations\Reader;
1515
use Symfony\Component\Config\Resource\FileResource;
16-
use Symfony\Component\Routing\Annotation\Route as RouteAnnotation;
1716
use Symfony\Component\Routing\Route;
1817
use Symfony\Component\Routing\RouteCollection;
1918
use Symfony\Component\Config\Loader\LoaderInterface;

Matcher/Dumper/PhpMatcherDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ private function compileStaticPrefixCollection(StaticPrefixCollection $tree, \st
473473
$code .= $this->indent($this->compileStaticPrefixCollection($route, $state, $prefixLen + strlen($prefix)));
474474
$code .= "\n .')'";
475475
$state->regex .= ')';
476-
$state->markTail += 1;
476+
++$state->markTail;
477477
continue;
478478
}
479479

RouteCollectionBuilder.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function createBuilder()
118118
* @param string $prefix
119119
* @param RouteCollectionBuilder $builder
120120
*/
121-
public function mount($prefix, RouteCollectionBuilder $builder)
121+
public function mount($prefix, self $builder)
122122
{
123123
$builder->prefix = trim(trim($prefix), '/');
124124
$this->routes[] = $builder;
@@ -251,11 +251,9 @@ public function setMethods($methods)
251251
/**
252252
* Adds a resource for this collection.
253253
*
254-
* @param ResourceInterface $resource
255-
*
256254
* @return $this
257255
*/
258-
private function addResource(ResourceInterface $resource): RouteCollectionBuilder
256+
private function addResource(ResourceInterface $resource): self
259257
{
260258
$this->resources[] = $resource;
261259

Tests/Generator/Dumper/PhpGeneratorDumperTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ public function testDumpWithLocalizedRoutes()
8989
$this->routeCollection->add('test.en', (new Route('/testing/is/fun'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'test'));
9090
$this->routeCollection->add('test.nl', (new Route('/testen/is/leuk'))->setDefault('_locale', 'nl')->setDefault('_canonical_route', 'test'));
9191

92-
$code = $this->generatorDumper->dump([
92+
$code = $this->generatorDumper->dump(array(
9393
'class' => 'LocalizedProjectUrlGenerator',
94-
]);
94+
));
9595
file_put_contents($this->testTmpFilepath, $code);
9696
include $this->testTmpFilepath;
9797

9898
$context = new RequestContext('/app.php');
9999
$projectUrlGenerator = new \LocalizedProjectUrlGenerator($context, null, 'en');
100100

101101
$urlWithDefaultLocale = $projectUrlGenerator->generate('test');
102-
$urlWithSpecifiedLocale = $projectUrlGenerator->generate('test', ['_locale' => 'nl']);
102+
$urlWithSpecifiedLocale = $projectUrlGenerator->generate('test', array('_locale' => 'nl'));
103103
$context->setParameter('_locale', 'en');
104104
$urlWithEnglishContext = $projectUrlGenerator->generate('test');
105105
$context->setParameter('_locale', 'nl');

Tests/Loader/AnnotationClassLoaderTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ protected function setUp()
4646
{
4747
$reader = new AnnotationReader();
4848
$this->loader = new class($reader) extends AnnotationClassLoader {
49-
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot) {}
49+
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
50+
{
51+
}
5052
};
5153
AnnotationRegistry::registerLoader('class_exists');
5254
}
@@ -194,7 +196,9 @@ public function testInvokableClassMultipleRouteLoad()
194196
->will($this->returnValue(array()))
195197
;
196198
$loader = new class($reader) extends AnnotationClassLoader {
197-
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot) {}
199+
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
200+
{
201+
}
198202
};
199203

200204
$routeCollection = $loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BazClass');

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ public function testImportRouteWithGlobMatchingMultipleFiles()
420420

421421
$route = $routeCollection->get('baz_route');
422422
$this->assertSame('AppBundle:Baz:view', $route->getDefault('_controller'));
423-
424423
}
425424

426425
public function testImportRouteWithNamePrefix()

0 commit comments

Comments
 (0)