Browse Source

minor #1647 Deprecate non-default Configs and Finders (keradus)

This PR was merged into the 1.12 branch.

Discussion
----------

Deprecate non-default Configs and Finders

ref #1646

Commits
-------

f9a2ef3 Deprecate non-default Configs and Finders
Dariusz Ruminski 9 years ago
parent
commit
fb3ca09195

+ 5 - 0
Symfony/CS/Config/MagentoConfig.php

@@ -20,6 +20,11 @@ class MagentoConfig extends Config
 {
     public function __construct()
     {
+        @trigger_error(
+            sprintf('The "%s" class is deprecated. You should stop using it, as it will soon be removed in 2.0 version.', __CLASS__),
+            E_USER_DEPRECATED
+        );
+
         parent::__construct();
 
         $this->finder = new MagentoFinder();

+ 5 - 0
Symfony/CS/Config/Symfony23Config.php

@@ -20,6 +20,11 @@ class Symfony23Config extends Config
 {
     public function __construct()
     {
+        @trigger_error(
+            sprintf('The "%s" class is deprecated. You should stop using it, as it will soon be removed in 2.0 version.', __CLASS__),
+            E_USER_DEPRECATED
+        );
+
         parent::__construct();
 
         $this->finder = new Symfony23Finder();

+ 5 - 0
Symfony/CS/Finder/MagentoFinder.php

@@ -18,6 +18,11 @@ class MagentoFinder extends DefaultFinder
 {
     public function __construct()
     {
+        @trigger_error(
+            sprintf('The "%s" class is deprecated. You should stop using it, as it will soon be removed in 2.0 version.', __CLASS__),
+            E_USER_DEPRECATED
+        );
+
         parent::__construct();
 
         $this

+ 10 - 0
Symfony/CS/Finder/Symfony23Finder.php

@@ -16,6 +16,16 @@ namespace Symfony\CS\Finder;
  */
 class Symfony23Finder extends DefaultFinder
 {
+    public function __construct()
+    {
+        @trigger_error(
+            sprintf('The "%s" class is deprecated. You should stop using it, as it will soon be removed in 2.0 version.', __CLASS__),
+            E_USER_DEPRECATED
+        );
+
+        parent::__construct();
+    }
+
     protected function getDirs($dir)
     {
         return array($dir.'/src');