|
Revision 8014, 1.0 kB
(checked in by francois, 5 years ago)
|
[1.1] Added upgrade task for deprecated cache removal methods
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
class sfViewCacheManagerUpgrade extends sfUpgrade |
|---|
| 20 |
{ |
|---|
| 21 |
public function upgrade() |
|---|
| 22 |
{ |
|---|
| 23 |
$filtersFinder = $this->getFinder('file')->name('*.php'); |
|---|
| 24 |
foreach ($filtersFinder->in($this->getProjectActionDirectories()) as $file) |
|---|
| 25 |
{ |
|---|
| 26 |
$content = file_get_contents($file); |
|---|
| 27 |
if (preg_match("#\->(removePattern|clearGlob)\(#s", $content, $matches)) |
|---|
| 28 |
{ |
|---|
| 29 |
$this->logSection('cache', sprintf('Action "%s" calls the "%s()" method but the syntax has changed. Please, read the documentation and upgrade accordingly.', $file, $matches[1]), 1000); |
|---|
| 30 |
} |
|---|
| 31 |
} |
|---|
| 32 |
} |
|---|
| 33 |
} |
|---|
| 34 |
|
|---|