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][DX] Display a nice error message if an enabled component is missing#25094

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

Conversation

@derrabus
Copy link
Member

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#25093
LicenseMIT
Doc PRN/A

@nicolas-grekas
Copy link
Member

Could you please check if that happens for other components also?

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneNov 22, 2017

if ($this->isConfigEnabled($container,$config['form'])) {
if (!class_exists('Symfony\Component\Form\Form')) {
thrownewLogicException('Form support cannot be enabled. Please install the Form component.');

Choose a reason for hiding this comment

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

just to match similar messages:
Form support cannot be enabled as the Form component is not installed.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@xabbuh
Copy link
Member

For other components we did this in 3.3. Should we merge the PR into the3.3 as a bugfix?

@derrabus
Copy link
MemberAuthor

@nicolas-grekas Serializer is also affected. I can enable the component without having it installed and FrameworkBundle would register theserializer service, but it's impossible to wire it.

@derrabus
Copy link
MemberAuthor

I've also checked the validator: When enabling it,FrameworkExtension complains about the missing Translation component, which is not wrong, but seems a bit odd. However, if the Translation component is present, I get the expected exception about the missing Validator component.

@derrabusderrabusforce-pushed the3.4-fail-on-missing-form-component branch from4b86116 toe31badcCompareNovember 22, 2017 10:40
@derrabusderrabus changed the titleDisplay a nice error message if the form component is missing[FrameworkBundle][DX] Display a nice error message if an enabled component is missingNov 22, 2017
@derrabus
Copy link
MemberAuthor

Do you think, we can remove those lines?

if (!class_exists('Symfony\Component\Translation\Translator') &&$this->isConfigEnabled($container,$config['validation'])) {
thrownewLogicException('Validation support cannot be enabled as the Translation component is not installed.');
}

Installing Validator without Translation is not possible, enabling validation without the Validator component will be caught elsewhere. So this block just generates a confusing error message.

@derrabusderrabusforce-pushed the3.4-fail-on-missing-form-component branch frome31badc to127b9deCompareNovember 22, 2017 10:52
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

let's go for 3.3

@derrabusderrabusforce-pushed the3.4-fail-on-missing-form-component branch from127b9de to2b45805CompareNovember 22, 2017 11:31
@derrabusderrabus changed the base branch from3.4 to3.3November 22, 2017 11:32
@derrabus
Copy link
MemberAuthor

3.3 it is, then.

@nicolas-grekasnicolas-grekas modified the milestones:3.4,3.3Nov 22, 2017
@nicolas-grekas
Copy link
Member

Thank you@derrabus.

@nicolas-grekasnicolas-grekas merged commit2b45805 intosymfony:3.3Nov 22, 2017
nicolas-grekas added a commit that referenced this pull requestNov 22, 2017
…nabled component is missing (derrabus)This PR was merged into the 3.3 branch.Discussion----------[FrameworkBundle][DX] Display a nice error message if an enabled component is missing| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#25093| License       | MIT| Doc PR        | N/ACommits-------2b45805 Display a nice error message if the form/serializer component is missing.
@nicolas-grekas
Copy link
Member

@derrabus about#25094 (comment), you reverted your idea?

@derrabus
Copy link
MemberAuthor

@nicolas-grekas For now, yes. That change conflicted with the 3.3 branch. I will setup a 3.3 app tonight and test again.

@derrabusderrabus deleted the 3.4-fail-on-missing-form-component branchNovember 22, 2017 12:15
This was referencedNov 24, 2017
@fabpotfabpot mentioned this pull requestDec 4, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

4 participants

@derrabus@nicolas-grekas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp