From 881ed1eb618ce82cef78bea1f98328d930086fea Mon Sep 17 00:00:00 2001 From: Kevin Saliou Date: Sat, 29 Nov 2014 13:37:39 +0100 Subject: [PATCH] [Validator] add deprecation log (#12665) --- src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php index 64929b09663a..893bd67a36ab 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php @@ -23,6 +23,8 @@ class ApcCache implements CacheInterface public function __construct($prefix) { + trigger_error('The Symfony\Component\Validator\Mapping\Cache\ApcCache class is deprecated since version 2.5 and will be removed in 3.0. Use DoctrineCache with Doctrine\Common\Cache\ApcCache instead.', E_USER_DEPRECATED); + if (!extension_loaded('apc')) { throw new \RuntimeException('Unable to use ApcCache to cache validator mappings as APC is not enabled.'); }