Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 487f8ac

Browse filesBrowse files
committed
minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)
This PR was merged into the 2.8 branch. Discussion ---------- [Routing] Fixed the interface description of the url generator interface | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | The `UrlGenerator` has always been able to return `null`. Many tests assert this for many years but the interface actually always only allowed a `string` return. Examples for tests: - https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php#L206 - https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php#L217 - https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php#L471 So I think I would not consider this change as a BC break but rather a doc fix because it seems like `null` has always been an accepted return value. Commits ------- d2e9e0b Fixed the interface description of the url generator interface
2 parents cf359c2 + d2e9e0b commit 487f8ac
Copy full SHA for 487f8ac

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface
7373
* @param mixed $parameters An array of parameters
7474
* @param int $referenceType The type of reference to be generated (one of the constants)
7575
*
76-
* @return string The generated URL
76+
* @return string|null The generated URL
7777
*
7878
* @throws RouteNotFoundException If the named route doesn't exist
7979
* @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.