The class Symfony\Bundle\Framework...d\ContainerAwareCommand has been deprecated with message: since Symfony 4.2, use {@see Command} instead.
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be
removed from the class and what other constant to use instead.
Loading history...
23
{
24
/**
25
* @var CacheManager
26
*/
27
private $cacheManager;
28
29
/**
30
* If no cache manager is specified explicitly, fos_http_cache.cache_manager
31
* is automatically loaded.
32
*
33
* @param CacheManager|null $cacheManager The cache manager to talk to
34
*/
35
14
public function __construct(CacheManager $cacheManager = null)
36
{
37
14
if (!$cacheManager) {
38
1
@trigger_error('Instantiating commands without the cache manager is deprecated and will be removed in version 3', E_USER_DEPRECATED);
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
Loading history...
39
}
40
14
$this->cacheManager = $cacheManager;
41
14
parent::__construct();
42
14
}
43
44
/**
45
* Get the configured cache manager, loading fos_http_cache.cache_manager
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.