8000 Implement service-based Resource (cache) validation by mpdude · Pull Request #15738 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Implement service-based Resource (cache) validation #15738

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 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add UPGRADING notes
  • Loading branch information
mpdude committed Sep 14, 2015
commit d1cb1fd592da59fbf76f2627220d86bd0d9a42d6
32 changes: 32 additions & 0 deletions UPGRADE-2.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,35 @@ FrameworkBundle
session:
cookie_httponly: false
```

Config
------

* The `\Symfony\Component\Config\Resource\ResourceInterface::isFresh()` method has been
deprecated and will be removed in Symfony 3.0 because it assumes that resource
implementations are able to check themselves for freshness.

If you have custom resources that implement this method, change them to implement the
`\Symfony\Component\Config\Resource\SelfCheckingResourceInterface` sub-interface instead
of `\Symfony\Component\Config\Resource\ResourceInterface`.

Before:

```php
use Symfony\Component\Config\Resource\ResourceInterface;

class MyCustomResource implements ResourceInterface { ... }
```

After:

```php
use Symfony\Component\Config\Resource\SelfCheckingResourceInterface;

class MyCustomResource implements SelfCheckingResourceInterface { ... }
```

Additionally, if you have implemented cache validation strategies *using* `isFresh()`
yourself, you should have a look at the new cache validation system based on
`ResourceChecker`s.

7 changes: 7 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -1201,3 +1201,10 @@ UPGRADE FROM 2.x to 3.0
* `Process::setStdin()` and `Process::getStdin()` have been removed. Use
`Process::setInput()` and `Process::getInput()` that works the same way.
* `Process::setInput()` and `ProcessBuilder::setInput()` do not accept non-scalar types.

### Config

* `\Symfony\Component\Config\Resource\ResourceInterface::isFresh()` has been removed. Also,
cache validation through this method (which was still supported in 2.8 for BC) does no longer
work because the `\Symfony\Component\Config\Resource\BCResourceInterfaceChecker` helper class
has been removed as well.
0