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

[FrameworkBundle] Add configureContainer(), configureRoutes() and getConfigDir() to MicroKernelTrait#42991

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

Merged
Nyholm merged 1 commit intosymfony:5.4fromnicolas-grekas:fwb-µk
Sep 16, 2021

The head ref may contain hidden characters:"fwb-\u00B5k"

Dismiss

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?5.4
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

This PR aims at moving code from the Kernel's recipe toMicroKernelTrait.

It has also the benefit of not requiring ppl that don't use the router to still implementconfigureRoutes() in their app.

Pictor13 reacted with thumbs up emoji

try {
$this->configureContainer(newContainerConfigurator($container,$kernelLoader,$instanceof,$file,$file,$this->getEnvironment()),$loader);
$configureContainer->getClosure($this)(newContainerConfigurator($container,$kernelLoader,$instanceof,$file,$file,$this->getEnvironment()),$loader,$container);
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

3rd argument to help with#35554

@lyrixx
Copy link
Member

I like it 👍🏼

@Nyholm
Copy link
Member

Please give me another day or two to test and review this carefully.

nicolas-grekas reacted with thumbs up emoji

Copy link
Member

@NyholmNyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Great. Thank you

@NyholmNyholm merged commita2c60ad intosymfony:5.4Sep 16, 2021
@nicolas-grekasnicolas-grekas deleted the fwb-µk branchSeptember 24, 2021 16:20
@amberovsky
Copy link

@nicolas-grekas whyconfigureContainer andconfigureRoutes are private? They are mentioned asprotected in the latest documentationhttps://symfony.com/doc/current/configuration/micro_kernel_trait.html
It was useful to be able to override them, how it is suggested to change the way configuration/routes are loaded now?

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedFeb 7, 2022
edited
Loading

Method from traits can be overridden in the class that uses the trait even if they are private.
If you need to override them from a class child, you can make the methods protected when importing the trait, see eg
https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.visibility

@amberovsky
Copy link

🤦 thank you@nicolas-grekas

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

@NyholmNyholmNyholm approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

6 participants

@nicolas-grekas@lyrixx@Nyholm@amberovsky@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp