Skip to content

[Config] Make ClassExistenceResource throw on invalid parents #23573

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2017

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 3.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #23564
License MIT
Doc PR -

Let's throw a more specific exception when a parent class/interface/trait is missing.
Fine tunes #23041

@javiereguiluz
Copy link
Member

I've tested this and it's better ... but it doesn't solve the issue for me yet.

Original error message

before

Error message after this PR

after

Expected error message that would help me a lot

expected

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Jul 18, 2017

Can you check the "previous" exceptions?
This altered error message is due to https://github.com/symfony/symfony/blob/3.3/src/Symfony/Component/Config/Loader/FileLoader.php#L179
which turns the original exception into something else.

Basically, this may be fixed by reverting the order of displayed exceptions (or any other way to make previous exceptions more visible). But for another PR then.

@fabpot
Copy link
Member

fabpot commented Jul 19, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 53b0190 into symfony:3.3 Jul 19, 2017
fabpot added a commit that referenced this pull request Jul 19, 2017
…nts (nicolas-grekas)

This PR was merged into the 3.3 branch.

Discussion
----------

[Config] Make ClassExistenceResource throw on invalid parents

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23564
| License       | MIT
| Doc PR        | -

Let's throw a more specific exception when a parent class/interface/trait is missing.
Fine tunes #23041

Commits
-------

53b0190 [Config] Make ClassExistenceResource throw on invalid parents
@nicolas-grekas nicolas-grekas deleted the di-psr4-error branch July 19, 2017 07:06
ogizanagi added a commit that referenced this pull request Jul 19, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

[Config] Minor fix

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

My bad.

BTW @javiereguiluz I confirm my diagnosis on #23573

Here is the last exception in that error page:
![capture du 2017-07-19 09-37-41](https://user-images.githubusercontent.com/243674/28355877-2bc71b5e-6c66-11e7-8e53-a88c42bec4e5.png)

Commits
-------

fa0b942 [Config] Minor fix
@fabpot fabpot mentioned this pull request Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants