for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yiisoft\Cache\Dependency;
use Yiisoft\Cache\CacheInterface;
/**
* AllDependencies represents a dependency which is composed of a list of other dependencies.
*
* The dependency is reported as changed if all sub-dependencies are changed.
* For more details and usage information on Cache, see the [guide article on caching](guide:caching-overview).
*/
class AllDependencies extends Dependency
{
* @var Dependency[]
private $dependencies;
* ChainedDependency constructor.
* @param Dependency[] $dependencies list of dependencies that this dependency is composed of.
* Each array element must be a dependency object.
public function __construct(array $dependencies = [])
$this->dependencies = $dependencies;
}
public function evaluateDependency(CacheInterface $cache): void
foreach ($this->dependencies as $dependency) {
$dependency->evaluateDependency($cache);
protected function generateDependencyData(CacheInterface $cache)
return null;
public function isChanged(CacheInterface $cache): bool
if (!$dependency->isChanged($cache)) {
return false;
return true;