Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Update hostname_pattern.rst#7663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
`Symfony\Component\Routing\RouteCollection::addCollection` accepts one argument on type `RouteCollection` that is why`$collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '', array(), array(), array(), 'hello.example.com');` is not correct.
HeahDude left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good catch! Should be merged in 2.7.
| $collection = new RouteCollection(); | ||
| $collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '', array(), array(), array(), 'hello.example.com'); | ||
| $collection->addCollection($importedCollection); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think we don't need to wrap the imported collection in another collection, but can do the following instead (we can then remove theuse statement too):
$collection =$loader->import("@AcmeHelloBundle/Resources/config/routing.php");$collection->setHost('hello.example.com');return$collection;
xabbuh commentedApr 8, 2017
Thank you@krlove. |
This PR was submitted for the 3.2 branch but it was merged into the 2.7 branch instead (closes#7663).Discussion----------Update hostname_pattern.rst`Symfony\Component\Routing\RouteCollection::addCollection` accepts one argument of type `RouteCollection` that is why`$collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '', array(), array(), array(), 'hello.example.com');` is not correct.Commits-------71dd533 Update hostname_pattern.rst
* 2.7: (48 commits) docs: choice constraints reference [#7707] minor tweak Fixed code block under "Custom Messages" [#7744] fix XSD locations Minor XML codes fixes [#7686] tweak the example code [#7663] update the PHP example code Update hostname_pattern.rst Add missing ";" Use HTTP instead of http Fixed indentation in security.rst Be consistent on service name Fix missing / Fix trusted hosts example regular expressions fixup comment Testing: Fix typo from#6427 Update apache_router.rst Update fortrabbit.rst Fix some YAML codes Add missing trailing comma & Fix foreach code ...
* 2.8: (48 commits) docs: choice constraints reference [#7707] minor tweak Fixed code block under "Custom Messages" [#7744] fix XSD locations Minor XML codes fixes [#7686] tweak the example code [#7663] update the PHP example code Update hostname_pattern.rst Add missing ";" Use HTTP instead of http Fixed indentation in security.rst Be consistent on service name Fix missing / Fix trusted hosts example regular expressions fixup comment Testing: Fix typo from#6427 Update apache_router.rst Update fortrabbit.rst Fix some YAML codes Add missing trailing comma & Fix foreach code ...
* 3.2: (60 commits) docs: choice constraints reference [#7707] minor tweak Fixed code block under "Custom Messages" [#7744] fix XSD locations Minor XML codes fixes [#7686] tweak the example code [#7663] update the PHP example code Update hostname_pattern.rst Add missing ";" Use HTTP instead of http Fixed indentation in security.rst Be consistent on service name Fix missing / typo fix Fix trusted hosts example regular expressions add reference built in listener for kernel.response event in >=3.1 fixup comment Testing: Fix typo from#6427 Update apache_router.rst Update fortrabbit.rst ...
Symfony\Component\Routing\RouteCollection::addCollectionaccepts one argument of typeRouteCollectionthat is why$collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '', array(), array(), array(), 'hello.example.com');is not correct.