Merge branch '4.1'
* 4.1: [Cache] Improve resiliency when calling doFetch() in AbstractTrait [Messenger] Fixed MessengerPass::guessHandledClasses return type Fixing GlobResource when inside phar archive
This commit is contained in:
commit
1abfb2ced6
@ -109,8 +109,11 @@ trait AbstractTrait
|
||||
try {
|
||||
if ($cleared = $this->versioningIsEnabled) {
|
||||
$namespaceVersion = 2;
|
||||
foreach ($this->doFetch(array('@'.$this->namespace)) as $v) {
|
||||
$namespaceVersion = 1 + (int) $v;
|
||||
try {
|
||||
foreach ($this->doFetch(array('@'.$this->namespace)) as $v) {
|
||||
$namespaceVersion = 1 + (int) $v;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
$namespaceVersion .= ':';
|
||||
$cleared = $this->doSave(array('@'.$this->namespace => $namespaceVersion), 0);
|
||||
@ -236,8 +239,11 @@ trait AbstractTrait
|
||||
{
|
||||
if ($this->versioningIsEnabled && '' === $this->namespaceVersion) {
|
||||
$this->namespaceVersion = '1:';
|
||||
foreach ($this->doFetch(array('@'.$this->namespace)) as $v) {
|
||||
$this->namespaceVersion = $v;
|
||||
try {
|
||||
foreach ($this->doFetch(array('@'.$this->namespace)) as $v) {
|
||||
$this->namespaceVersion = $v;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface,
|
||||
return;
|
||||
}
|
||||
|
||||
if (false === strpos($this->pattern, '/**/') && (defined('GLOB_BRACE') || false === strpos($this->pattern, '{'))) {
|
||||
if (0 !== strpos($this->prefix, 'phar://') && false === strpos($this->pattern, '/**/') && (defined('GLOB_BRACE') || false === strpos($this->pattern, '{'))) {
|
||||
foreach (glob($this->prefix.$this->pattern, defined('GLOB_BRACE') ? GLOB_BRACE : 0) as $path) {
|
||||
if ($this->recursive && is_dir($path)) {
|
||||
$files = iterator_to_array(new \RecursiveIteratorIterator(
|
||||
|
Reference in New Issue
Block a user