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

[Config] Support extensions without configuration in ConfigBuilder warmup#40859

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

Conversation

@wouterj
Copy link
Member

QA
Branch?5.x
Bug fix?yes
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

ConfigurationExtensionInterface::getConfiguration() is nullable.

As a real use-case: A small internal bundle in my company just usesarray_merge to manage a very limited set of configuration. We don't have these fancy Configuration classes.

stephanvierkant and alexander-schranz reacted with thumbs up emoji
@wouterjwouterj requested a review fromNyholmApril 18, 2021 17:48
@wouterjwouterj changed the title[Config] Support extensions without configuration[Config] Support extensions without configuration in ConfigBuilder warmupApr 18, 2021
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.

Thank you.
Did you get an exception thrown at you when warming the cache?

The goal is that no exceptions should be thrown in this stage. If you are trying to use a ConfigBuilder from your bundle (the one with no Configuration) only then you should get an exception.

Well done

@wouterj
Copy link
MemberAuthor

wouterj commentedApr 18, 2021
edited
Loading

@Nyholm yes, I did (an Error though):

§ sf console cache:clear // Clearing the cache for the dev environment with debug true19:51:33 CRITICAL  [php] Uncaught Error: Argument 1 passed to Symfony\Component\Config\Builder\ConfigBuilderGenerator::build() must implement interface Symfony\Component\Config\Definition\ConfigurationInterface, null given, called in /.../vendor/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php on line 80 ["exception" => TypeError { …}]In ConfigBuilderGenerator.php line 43:  Argument 1 passed to Symfony\Component\Config\Builder\ConfigBuilderGenerator::build() must implement interface Symfony\Component\Config\Definition\Configu  rationInterface, null given, called in /.../vendor/symfony/framework-bundle/CacheWarmer/ConfigBuil  derCacheWarmer.php on line 80cache:clear [--no-warmup] [--no-optional-warmers]exit status 255

@Nyholm
Copy link
Member

Thank you <3

@NyholmNyholm merged commit0fd8413 intosymfony:5.xApr 19, 2021
@wouterjwouterj deleted the configbuilder-warmup-without-config branchApril 19, 2021 10:41
@alexander-schranz
Copy link
Contributor

alexander-schranz commentedApr 30, 2021
edited
Loading

Did also get into this error when testing the beta with@sulu,@wouterj thx for fixing this 👍 . TheDoctrineFixtureBundle is also one of the bundles not having aConfiguration class. Should we really log a warning here when it is the case that a bundle doesn't have any configuration, I would just silently ignore it.

@Nyholm
Copy link
Member

It is fine to silently ignore it. You will get a proper extension if you are trying to use the config builder.

@alexander-schranz
Copy link
Contributor

alexander-schranz commentedApr 30, 2021
edited
Loading

Did see its just an info log not a warning or error log my eyes did play a prank on me 🙈. If we want still remove the log a PR is open:#41009 feel free to close.

@fabpotfabpot mentioned this pull requestMay 1, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@NyholmNyholmNyholm approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@wouterj@Nyholm@alexander-schranz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp