Skip to content

[Routing] add files used in FileResource objects #17673

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
Feb 4, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Feb 3, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #17598 (comment)
License MIT
Doc PR

Starting with Symfony 3.1, the constructor of the FileResource class
will throw an exception when the passed file does not exist.

Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.
@xabbuh
Copy link
Member Author

xabbuh commented Feb 4, 2016

ping @symfony/deciders (we need this to make the test suite pass again for all branches on Travis)

@javiereguiluz
Copy link
Member

This fix looks correct at first sight:

+if (is_file($class->getFileName())) {
    $collection->addResource(new FileResource($class->getFileName()));
+}

But my question is: do we want to fix problems silently or do we want to fail hard and notify the user?

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 73afd0f into symfony:2.8 Feb 4, 2016
nicolas-grekas added a commit that referenced this pull request Feb 4, 2016
This PR was merged into the 2.8 branch.

Discussion
----------

[Routing] add files used in FileResource objects

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17598 (comment)
| License       | MIT
| Doc PR        |

Starting with Symfony 3.1, the constructor of the `FileResource` class
will throw an exception when the passed file does not exist.

Commits
-------

73afd0f add files used in FileResource objects
@xabbuh xabbuh deleted the pr-17598-2.8 branch February 4, 2016 13:57
This was referenced Feb 28, 2016
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