Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Router service is now private#8985

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

Closed
TheDevilOnLine wants to merge1 commit intosymfony:4.0fromTheDevilOnLine:patch-1

Conversation

@TheDevilOnLine
Copy link
Contributor

The router service is private and not accessible in Symfony 4+, therefor $this->router should be used instead of $this->get('router'). Just above the example in question is explained how to get the router in your construct, so this should be clear.

The router service is private and not accessible in Symfony 4+, therefor $this->router should be used instead of $this->get('router'). Just above the example in question is explained how to get the router in your construct, so this should be clear.
@TheDevilOnLine
Copy link
ContributorAuthor

Will move these changes over to#8986

TheDevilOnLine pushed a commit to TheDevilOnLine/symfony-docs that referenced this pull requestJan 5, 2018
javiereguiluz added a commit that referenced this pull requestJan 7, 2018
… javiereguiluz)This PR was merged into the 4.0 branch.Discussion----------Removed invalid examplesTemplating isn't a service in Symfony 4+ (even after `composer req templating`), so probably we're looking for the twig service.The Router service isn't public and can therefor not be called from the container:```$ php bin/console debug:container router // This service is an alias for the service router.defaultInformation for Service "router.default"======================================== ---------------- -----------------------------------------------  Option           Value ---------------- -----------------------------------------------  Service ID       router.default  Class            Symfony\Bundle\FrameworkBundle\Routing\Router  Tags             -  Calls            setConfigCacheFactory  Public           no  Synthetic        no  Lazy             no  Shared           yes  Abstract         no  Autowired        no  Autoconfigured   no ---------------- -----------------------------------------------```Commits-------3492028 Use controller method injection instead of the constructorf9091b0 Updated documentation to reflect best practice of using Dependency Injection over Container. Includes changes from PR#898518e6d9e Removed "Accessing the Container Directly"89e38ef Removed invalid examples
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJan 7, 2018
* 4.0:  Update collection.rst  Mention that PSR-1 doesn't recommend CamelCase or anything else  Fixed the XML and PHP config instead of the YAML config  Use controller method injection instead of the constructor  Add missing references  Updated documentation to reflect best practice of using Dependency Injection over Container. Includes changes from PRsymfony#8985  Removed "Accessing the Container Directly"  minorsymfony#8091 Update js-datepicker usage for new jQuery UI (AdrianBorodziuk, javiereguiluz)  minorsymfony#8983 cross-reference console command testing from testing guide (dbu)  Fix YAML config bug  Removed invalid examples  commands are automatically registered in symfony full stack  update forms.rst
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@TheDevilOnLine@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp