Skip to content

Commit

Permalink
[Validator] add deprecation log (#12665)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbsali committed Nov 29, 2014
1 parent 3c4de45 commit 881ed1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php
Expand Up @@ -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.');
}
Expand Down

0 comments on commit 881ed1e

Please sign in to comment.