Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f758dd8

Browse files
[Finder] Deprecate find based adapters
1 parent 7d343e6 commit f758dd8

File tree

7 files changed

+951
-5
lines changed

7 files changed

+951
-5
lines changed

src/Symfony/Component/Finder/Adapter/BsdFindAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Finder\Adapter;
1313

14+
@trigger_error('The '.__NAMESPACE__.'\BsdFindAdapter class is deprecated since version 2.8 and will be removed in 3.0. Use the PhpAdapter class in the same namespace instead.', E_USER_DEPRECATED);
15+
1416
use Symfony\Component\Finder\Shell\Shell;
1517
use Symfony\Component\Finder\Shell\Command;
1618
use Symfony\Component\Finder\Iterator\SortableIterator;
@@ -20,6 +22,8 @@
2022
* Shell engine implementation using BSD find command.
2123
*
2224
* @author Jean-François Simon <[email protected]>
25+
*
26+
* @deprecated since 2.8, to be removed in 3.0. Use PhpAdapter instead.
2327
*/
2428
class BsdFindAdapter extends AbstractFindAdapter
2529
{

src/Symfony/Component/Finder/Adapter/GnuFindAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Finder\Adapter;
1313

14+
@trigger_error('The '.__NAMESPACE__.'\GnuFindAdapter class is deprecated since version 2.8 and will be removed in 3.0. Use the PhpAdapter class in the same namespace instead.', E_USER_DEPRECATED);
15+
1416
use Symfony\Component\Finder\Shell\Shell;
1517
use Symfony\Component\Finder\Shell\Command;
1618
use Symfony\Component\Finder\Iterator\SortableIterator;
@@ -20,6 +22,8 @@
2022
* Shell engine implementation using GNU find command.
2123
*
2224
* @author Jean-François Simon <[email protected]>
25+
*
26+
* @deprecated since 2.8, to be removed in 3.0. Use PhpAdapter instead.
2327
*/
2428
class GnuFindAdapter extends AbstractFindAdapter
2529
{

src/Symfony/Component/Finder/Finder.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
namespace Symfony\Component\Finder;
1313

1414
use Symfony\Component\Finder\Adapter\AdapterInterface;
15-
use Symfony\Component\Finder\Adapter\GnuFindAdapter;
16-
use Symfony\Component\Finder\Adapter\BsdFindAdapter;
1715
use Symfony\Component\Finder\Adapter\PhpAdapter;
1816
use Symfony\Component\Finder\Comparator\DateComparator;
1917
use Symfony\Component\Finder\Comparator\NumberComparator;
@@ -77,9 +75,7 @@ public function __construct()
7775
$this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
7876

7977
$this
80-
->addAdapter(new GnuFindAdapter())
81-
->addAdapter(new BsdFindAdapter())
82-
->addAdapter(new PhpAdapter(), -50)
78+
->addAdapter(new PhpAdapter())
8379
->setAdapter('php')
8480
;
8581
}

0 commit comments

Comments
 (0)