Skip to content

[Cache] Ignore missing annotations.php #22965

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

Closed
wants to merge 3 commits into from
Closed

[Cache] Ignore missing annotations.php #22965

wants to merge 3 commits into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented May 30, 2017

Q A
Branch? 3.3
Bug fix? yes (different in 3.2)
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

Avoids the following notices if cache is not warmed up (i.e. cache:clear --no-warmup > hit the browser).

Warning: include(<base-path>/app/cache/<env>/annotations.php): failed to open stream: No such file or directory

Warning: include(): Failed opening '<base-path>/app/cache/<env>/annotations.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')

@nicolas-grekas
Copy link
Member

In 3.2 we use file_exists, this somehow got lost in a merge I guess
https://github.com/symfony/symfony/blob/3.2/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php#L326

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone May 30, 2017
@ro0NL
Copy link
Contributor Author

ro0NL commented May 30, 2017

you refactored in #20694 :) from the looks of it i'd say stream_resolve_include_path + include without @ but im not sure that needs to be supported or so; otherwise file_exists/is_file will do. Note 3.2 doesnt use @

@nicolas-grekas
Copy link
Member

let's do the same as in 3.2, that's fine

@ro0NL
Copy link
Contributor Author

ro0NL commented May 31, 2017

This should do.

@fabpot
Copy link
Member

fabpot commented May 31, 2017

Thank you @ro0NL.

fabpot added a commit that referenced this pull request May 31, 2017
This PR was squashed before being merged into the 3.3 branch (closes #22965).

Discussion
----------

[Cache] Ignore missing annotations.php

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes (different in 3.2)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Avoids the following notices if cache is not warmed up (i.e. `cache:clear --no-warmup` > hit the browser).

```
Warning: include(<base-path>/app/cache/<env>/annotations.php): failed to open stream: No such file or directory

Warning: include(): Failed opening '<base-path>/app/cache/<env>/annotations.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')
```

Commits
-------

e8f70c7 [Cache] Ignore missing annotations.php
@fabpot fabpot closed this May 31, 2017
@fabpot fabpot mentioned this pull request Jun 5, 2017
@ro0NL ro0NL deleted the cache/ignore-missing-file branch July 18, 2017 14:56
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