From a7b84c53dc7707410dd67ae369c62c11efb8bc71 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Fri, 5 Apr 2013 13:11:00 +0200 Subject: [PATCH] Updating vendors --- vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 3 + vendor/composer/autoload_namespaces.php | 2 +- vendor/composer/autoload_real.php | 6 +- vendor/composer/installed.json | 825 +++++++++--------- vendor/mheap/silex-assetic | 2 +- .../pagerfanta/src/Pagerfanta/Pagerfanta.php | 1 - .../Config/Definition/ReferenceDumper.php | 4 +- .../AbstractDoctrineExtension.php | 2 +- .../CompilerPass/DoctrineValidationPass.php | 10 +- .../Form/Type/EntityTypePerformanceTest.php | 4 +- .../Constraints/UniqueEntityValidator.php | 2 +- .../Symfony/Component/Finder/.gitignore | 4 - .../Finder/Adapter/AbstractAdapter.php | 225 ----- .../Finder/Adapter/AbstractFindAdapter.php | 320 ------- .../Finder/Adapter/AdapterInterface.php | 137 --- .../Finder/Adapter/BsdFindAdapter.php | 101 --- .../Finder/Adapter/GnuFindAdapter.php | 102 --- .../Component/Finder/Adapter/PhpAdapter.php | 98 --- .../Symfony/Component/Finder/CHANGELOG.md | 8 - .../Finder/Comparator/Comparator.php | 4 - .../Exception/AdapterFailureException.php | 46 - .../Finder/Exception/ExceptionInterface.php | 14 - .../OperationNotPermitedException.php | 19 - .../ShellCommandFailureException.php | 45 - .../Finder/Expression/Expression.php | 146 ---- .../Component/Finder/Expression/Glob.php | 157 ---- .../Component/Finder/Expression/Regex.php | 317 ------- .../Finder/Expression/ValueInterface.php | 60 -- .../Symfony/Component/Finder/Finder.php | 284 ++---- .../Finder/Iterator/CustomFilterIterator.php | 2 - .../Iterator/DateRangeFilterIterator.php | 6 +- .../Iterator/DepthRangeFilterIterator.php | 28 +- .../Finder/Iterator/FilePathsIterator.php | 131 --- .../Iterator/FilenameFilterIterator.php | 4 +- .../Iterator/MultiplePcreFilterIterator.php | 17 +- .../Finder/Iterator/PathFilterIterator.php | 75 -- .../Iterator/SizeRangeFilterIterator.php | 6 +- .../Finder/Iterator/SortableIterator.php | 2 - .../finder/Symfony/Component/Finder/README.md | 5 +- .../Component/Finder/Shell/Command.php | 264 ------ .../Symfony/Component/Finder/Shell/Shell.php | 95 -- .../Symfony/Component/Finder/SplFileInfo.php | 2 - .../Tests/Expression/ExpressionTest.php | 68 -- .../Finder/Tests/Expression/RegexTest.php | 143 --- .../Finder/Tests/FakeAdapter/DummyAdapter.php | 57 -- .../Tests/FakeAdapter/FailingAdapter.php | 45 - .../Finder/Tests/FakeAdapter/NamedAdapter.php | 57 -- .../Tests/FakeAdapter/UnsupportedAdapter.php | 44 - .../Component/Finder/Tests/FinderTest.php | 587 +++---------- .../Finder/Tests/Fixtures/A/B/C/abc.dat | 0 .../Finder/Tests/Fixtures/A/B/ab.dat | 0 .../Component/Finder/Tests/Fixtures/A/a.dat | 0 .../Tests/Fixtures/copy/A/B/C/abc.dat.copy | 0 .../Tests/Fixtures/copy/A/B/ab.dat.copy | 0 .../Finder/Tests/Fixtures/copy/A/a.dat.copy | 0 .../Tests/{Expression => }/GlobTest.php | 8 +- .../Iterator/DateRangeFilterIteratorTest.php | 4 +- .../Iterator/DepthRangeFilterIteratorTest.php | 48 - .../Tests/Iterator/DepthRangeIteratorTest.php | 49 ++ ...p => ExcludeDirectoryFileIteratorTest.php} | 8 +- .../Tests/Iterator/FilePathsIteratorTest.php | 66 -- .../Iterator/FileTypeFilterIteratorTest.php | 2 +- .../FilecontentFilterIteratorTest.php | 106 ++- .../Iterator/FilenameFilterIteratorTest.php | 1 + .../Tests/Iterator/IteratorTestCase.php | 6 +- .../Tests/Iterator/MockFileListIterator.php | 21 - .../Finder/Tests/Iterator/MockSplFileInfo.php | 134 --- .../Tests/Iterator/PathFilterIteratorTest.php | 85 -- .../Tests/Iterator/RealIteratorTestCase.php | 4 +- .../Tests/Iterator/SortableIteratorTest.php | 6 +- .../Component/Finder/Tests/bootstrap.php | 18 + .../Symfony/Component/Finder/composer.json | 9 +- .../Symfony/Component/Finder/phpunit.xml.dist | 2 +- .../Core/Encoder/Pbkdf2PasswordEncoder.php | 2 +- .../Http/Firewall/ExceptionListener.php | 2 +- .../Encoder/BCryptPasswordEncoderTest.php | 2 +- .../Tests/Http/Firewall/DigestDataTest.php | 12 +- .../Translation/Dumper/IcuResFileDumper.php | 14 +- .../Translation/Dumper/MoFileDumper.php | 12 +- .../Loader/schema/dic/xliff-core/xml.xsd | 8 +- .../Symfony/Component/Translation/README.md | 2 +- .../Tests/Loader/IcuDatFileLoaderTest.php | 2 +- 83 files changed, 884 insertions(+), 4337 deletions(-) delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/.gitignore delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Adapter/AdapterInterface.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Adapter/BsdFindAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Adapter/GnuFindAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Adapter/PhpAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Exception/AdapterFailureException.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Exception/ExceptionInterface.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Exception/OperationNotPermitedException.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Exception/ShellCommandFailureException.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Expression/Glob.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilePathsIterator.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Shell/Command.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/RegexTest.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/C/abc.dat delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/ab.dat delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/a.dat delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/ab.dat.copy delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/a.dat.copy rename vendor/symfony/finder/Symfony/Component/Finder/Tests/{Expression => }/GlobTest.php (77%) delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php create mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeIteratorTest.php rename vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/{ExcludeDirectoryFilterIteratorTest.php => ExcludeDirectoryFileIteratorTest.php} (84%) delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php delete mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php create mode 100644 vendor/symfony/finder/Symfony/Component/Finder/Tests/bootstrap.php diff --git a/vendor/autoload.php b/vendor/autoload.php index 99552f8792..0b9de53292 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitd17c2b07be637eba1c81679691c608e3::getLoader(); +return ComposerAutoloaderInitffdd4f404de06bf4d699d4ea882af3bb::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 599afcf430..81c3ec0eb9 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -27,6 +27,7 @@ return array( 'AnnouncementManager' => $baseDir . '/main/inc/lib/announcements.inc.php', 'Answer' => $baseDir . '/main/exercice/answer.class.php', 'AppPlugin' => $baseDir . '/main/inc/lib/plugin.lib.php', + 'ArrayClass' => $baseDir . '/main/inc/lib/array.lib.php', 'AssetAggregatedRenderer' => $baseDir . '/main/inc/lib/system/media/renderer/asset_aggregated_renderer.class.php', 'AssetGoogleCalendarRenderer' => $baseDir . '/main/inc/lib/system/media/renderer/lab/asset_google_calendar_renderer.class.php', 'AssetGoogleDocumentRenderer' => $baseDir . '/main/inc/lib/system/media/renderer/protocol/asset_google_document_renderer.class.php', @@ -431,6 +432,7 @@ return array( 'OLE_PPS' => $baseDir . '/main/inc/lib/pear/OLE/PPS.php', 'OLE_PPS_File' => $baseDir . '/main/inc/lib/pear/OLE/PPS/File.php', 'OLE_PPS_Root' => $baseDir . '/main/inc/lib/pear/OLE/PPS/Root.php', + 'Online' => $baseDir . '/main/inc/lib/online.inc.php', 'OpenOfficeTextDocument' => $baseDir . '/main/newscorm/openoffice_text_document.class.php', 'OpenofficeDocument' => $baseDir . '/main/newscorm/openoffice_document.class.php', 'OpenofficePresentation' => $baseDir . '/main/newscorm/openoffice_presentation.class.php', @@ -592,6 +594,7 @@ return array( 'Temp' => $baseDir . '/main/inc/lib/system/io/temp.class.php', 'Template' => $baseDir . '/main/inc/lib/template.lib.php', 'Testcategory' => $baseDir . '/main/exercice/testcategory.class.php', + 'Text' => $baseDir . '/main/inc/lib/text.lib.php', 'Text_Diff' => $baseDir . '/main/inc/lib/pear/Text/Diff.php', 'Text_Diff3' => $baseDir . '/main/inc/lib/pear/Text/Diff3.php', 'Text_Diff3_BlockBuilder' => $baseDir . '/main/inc/lib/pear/Text/Diff3.php', diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index faf3a29d5d..c2ca282d74 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -19,7 +19,7 @@ return array( 'Symfony\\Component\\HttpKernel\\' => $vendorDir . '/symfony/http-kernel/', 'Symfony\\Component\\HttpFoundation\\' => $vendorDir . '/symfony/http-foundation/', 'Symfony\\Component\\Form\\' => $vendorDir . '/symfony/form/', - 'Symfony\\Component\\Finder\\' => $vendorDir . '/symfony/finder/', + 'Symfony\\Component\\Finder' => $vendorDir . '/symfony/finder/', 'Symfony\\Component\\EventDispatcher\\' => $vendorDir . '/symfony/event-dispatcher/', 'Symfony\\Component\\DomCrawler\\' => $vendorDir . '/symfony/dom-crawler/', 'Symfony\\Component\\DependencyInjection\\' => $vendorDir . '/symfony/dependency-injection/', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 4d6855529e..b8ec240c73 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php generated by Composer -class ComposerAutoloaderInitd17c2b07be637eba1c81679691c608e3 +class ComposerAutoloaderInitffdd4f404de06bf4d699d4ea882af3bb { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInitd17c2b07be637eba1c81679691c608e3 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitd17c2b07be637eba1c81679691c608e3', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitffdd4f404de06bf4d699d4ea882af3bb', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitd17c2b07be637eba1c81679691c608e3', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitffdd4f404de06bf4d699d4ea882af3bb', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index eb598d30bb..6995978d05 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,53 +1,4 @@ [ - { - "name": "symfony/config", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/Config", - "source": { - "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "2b8694ad7f46072b154faaf5e74f2a06cb828fa7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/2b8694ad7f46072b154faaf5e74f2a06cb828fa7", - "reference": "2b8694ad7f46072b154faaf5e74f2a06cb828fa7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-03-01 10:42:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", - "autoload": { - "psr-0": { - "Symfony\\Component\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "http://symfony.com" - }, { "name": "symfony/console", "version": "dev-master", @@ -922,55 +873,6 @@ "html" ] }, - { - "name": "symfony/finder", - "version": "v2.2.0", - "version_normalized": "2.2.0.0", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "v2.2.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/v2.2.0", - "reference": "v2.2.0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2013-02-28 14:06:36", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com" - }, { "name": "kriswallsmith/assetic", "version": "v1.0.4", @@ -1798,48 +1700,35 @@ ] }, { - "name": "pagerfanta/pagerfanta", + "name": "symfony/property-access", "version": "dev-master", "version_normalized": "9999999-dev", + "target-dir": "Symfony/Component/PropertyAccess", "source": { "type": "git", - "url": "https://github.com/whiteoctober/Pagerfanta.git", - "reference": "92921b9bb155cecc68695fb273729a08586ceaf4" + "url": "https://github.com/symfony/PropertyAccess.git", + "reference": "072ae5c084eedf7092182f2aff3ab713c63a4672" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/whiteoctober/Pagerfanta/zipball/92921b9bb155cecc68695fb273729a08586ceaf4", - "reference": "92921b9bb155cecc68695fb273729a08586ceaf4", + "url": "https://api.github.com/repos/symfony/PropertyAccess/zipball/072ae5c084eedf7092182f2aff3ab713c63a4672", + "reference": "072ae5c084eedf7092182f2aff3ab713c63a4672", "shasum": "" }, "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "doctrine/mongodb-odm": "*", - "doctrine/orm": "2.*", - "mandango/mandango": "*", - "propel/propel1": ">=1.6,<2.0", - "solarium/solarium": "dev-develop" - }, - "suggest": { - "doctrine/mongodb-odm": "To use the DoctrineODMMongoDBAdapter.", - "doctrine/orm": "To use the DoctrineORMAdapter.", - "mandango/mandango": "To use the MandangoAdapter.", - "propel/propel1": "To use the PropelAdapter", - "solarium/solarium": "To use the SolariumAdapter." + "php": ">=5.3.3" }, - "time": "2013-04-02 11:00:09", + "time": "2013-04-01 08:07:30", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.3-dev" } }, "installation-source": "source", "autoload": { "psr-0": { - "Pagerfanta\\": "src/" + "Symfony\\Component\\PropertyAccess\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1848,57 +1737,61 @@ ], "authors": [ { - "name": "Pablo Díez", - "email": "pablodip@gmail.com", - "homepage": "http://github.com/pablodip" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" } ], - "description": "Pagination for PHP 5.3", + "description": "Symfony PropertyAccess Component", + "homepage": "http://symfony.com", "keywords": [ - "page", - "paging" + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" ] }, { - "name": "symfony/doctrine-bridge", + "name": "symfony/form", "version": "dev-master", "version_normalized": "9999999-dev", - "target-dir": "Symfony/Bridge/Doctrine", + "target-dir": "Symfony/Component/Form", "source": { "type": "git", - "url": "https://github.com/symfony/DoctrineBridge.git", - "reference": "cdc203642da7f3db2afafa6cfea827c234ac611f" + "url": "https://github.com/symfony/Form.git", + "reference": "094c9264480dceff17bba9c9c92b520cde55a15b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DoctrineBridge/zipball/cdc203642da7f3db2afafa6cfea827c234ac611f", - "reference": "cdc203642da7f3db2afafa6cfea827c234ac611f", + "url": "https://api.github.com/repos/symfony/Form/zipball/094c9264480dceff17bba9c9c92b520cde55a15b", + "reference": "094c9264480dceff17bba9c9c92b520cde55a15b", "shasum": "" }, "require": { - "doctrine/common": ">=2.2,<3.0", - "php": ">=5.3.3" + "php": ">=5.3.3", + "symfony/event-dispatcher": ">=2.1,<3.0", + "symfony/locale": ">=2.0,<3.0", + "symfony/options-resolver": ">=2.1,<2.4-dev", + "symfony/property-access": ">=2.2,<2.4-dev" }, "require-dev": { - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": ">=2.2,<3.0", - "doctrine/orm": ">=2.2,<3.0,>=2.2.3", - "symfony/dependency-injection": ">=2.0,<3.0", - "symfony/form": ">=2.2,<2.4-dev", - "symfony/http-kernel": ">=2.2,<2.4-dev", - "symfony/security": ">=2.2,<2.4-dev", - "symfony/stopwatch": ">=2.2,<2.4-dev", + "symfony/http-foundation": ">=2.1,<2.4-dev", "symfony/validator": ">=2.2,<2.4-dev" }, "suggest": { - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.2", - "doctrine/orm": "~2.2,>=2.2.3", - "symfony/form": "2.2.*", + "symfony/http-foundation": "2.2.*", "symfony/validator": "2.2.*" }, - "time": "2013-04-01 08:07:30", - "type": "symfony-bridge", + "time": "2013-04-01 08:07:53", + "type": "library", "extra": { "branch-alias": { "dev-master": "2.3-dev" @@ -1907,7 +1800,7 @@ "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Bridge\\Doctrine\\": "" + "Symfony\\Component\\Form\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1924,46 +1817,41 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Doctrine Bridge", + "description": "Symfony Form Component", "homepage": "http://symfony.com" }, { - "name": "symfony/security", + "name": "symfony/validator", "version": "dev-master", "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/Security", + "target-dir": "Symfony/Component/Validator", "source": { "type": "git", - "url": "https://github.com/symfony/Security.git", - "reference": "708f7aa9f69b2ae48832a875c252f4e14f2d76e8" + "url": "https://github.com/symfony/Validator.git", + "reference": "b9e2fa05cf314a8c64db801adbfce611028e63b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Security/zipball/708f7aa9f69b2ae48832a875c252f4e14f2d76e8", - "reference": "708f7aa9f69b2ae48832a875c252f4e14f2d76e8", + "url": "https://api.github.com/repos/symfony/Validator/zipball/b9e2fa05cf314a8c64db801adbfce611028e63b9", + "reference": "b9e2fa05cf314a8c64db801adbfce611028e63b9", "shasum": "" }, "require": { "php": ">=5.3.3", - "symfony/event-dispatcher": ">=2.1,<3.0", - "symfony/http-foundation": ">=2.1,<2.4-dev", - "symfony/http-kernel": ">=2.1,<=2.3-dev" + "symfony/translation": ">=2.0,<3.0" }, "require-dev": { - "doctrine/common": ">=2.2,<3.0", - "doctrine/dbal": ">=2.2,<3.0", - "psr/log": ">=1.0,<2.0", - "symfony/form": ">=2.0,<3.0", - "symfony/routing": ">=2.2,<2.4-dev", - "symfony/validator": ">=2.2,<2.4-dev" + "symfony/config": ">=2.2,<2.4-dev", + "symfony/http-foundation": ">=2.1,<3.0", + "symfony/locale": ">=2.0,<3.0", + "symfony/yaml": ">=2.0,<3.0" }, "suggest": { - "doctrine/dbal": "to use the built-in ACL implementation", - "symfony/class-loader": "2.2.*", - "symfony/finder": "2.2.*", - "symfony/form": "2.2.*", - "symfony/routing": "2.2.*", - "symfony/validator": "2.2.*" + "doctrine/common": "~2.2", + "symfony/config": "2.2.*", + "symfony/http-foundation": "2.2.*", + "symfony/locale": "2.2.*", + "symfony/yaml": "2.2.*" }, "time": "2013-04-01 08:07:53", "type": "library", @@ -1975,7 +1863,7 @@ "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Component\\Security\\": "" + "Symfony\\Component\\Validator\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1992,29 +1880,37 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Security Component", + "description": "Symfony Validator Component", "homepage": "http://symfony.com" }, { - "name": "symfony/property-access", + "name": "symfony/dependency-injection", "version": "dev-master", "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/PropertyAccess", + "target-dir": "Symfony/Component/DependencyInjection", "source": { "type": "git", - "url": "https://github.com/symfony/PropertyAccess.git", - "reference": "072ae5c084eedf7092182f2aff3ab713c63a4672" + "url": "https://github.com/symfony/DependencyInjection.git", + "reference": "bdbd94e1fbca934ed4c6d912e57c99a17bbe753b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/PropertyAccess/zipball/072ae5c084eedf7092182f2aff3ab713c63a4672", - "reference": "072ae5c084eedf7092182f2aff3ab713c63a4672", + "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/bdbd94e1fbca934ed4c6d912e57c99a17bbe753b", + "reference": "bdbd94e1fbca934ed4c6d912e57c99a17bbe753b", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2013-04-01 08:07:30", + "require-dev": { + "symfony/config": ">=2.2,<2.4-dev", + "symfony/yaml": ">=2.0,<3.0" + }, + "suggest": { + "symfony/config": "2.2.*", + "symfony/yaml": "2.2.*" + }, + "time": "2013-03-23 13:07:03", "type": "library", "extra": { "branch-alias": { @@ -2024,7 +1920,7 @@ "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Component\\PropertyAccess\\": "" + "Symfony\\Component\\DependencyInjection\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2041,62 +1937,95 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony PropertyAccess Component", - "homepage": "http://symfony.com", - "keywords": [ - "access", - "array", - "extraction", - "index", - "injection", - "object", - "property", - "property path", - "reflection" - ] + "description": "Symfony DependencyInjection Component", + "homepage": "http://symfony.com" }, { - "name": "symfony/form", + "name": "leafo/lessphp", "version": "dev-master", "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/Form", "source": { "type": "git", - "url": "https://github.com/symfony/Form.git", - "reference": "094c9264480dceff17bba9c9c92b520cde55a15b" + "url": "https://github.com/leafo/lessphp.git", + "reference": "a2feb59a0f5cd144aa70759ce0333f36d12e2582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Form/zipball/094c9264480dceff17bba9c9c92b520cde55a15b", - "reference": "094c9264480dceff17bba9c9c92b520cde55a15b", + "url": "https://api.github.com/repos/leafo/lessphp/zipball/a2feb59a0f5cd144aa70759ce0333f36d12e2582", + "reference": "a2feb59a0f5cd144aa70759ce0333f36d12e2582", + "shasum": "" + }, + "time": "2013-04-02 18:20:23", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3-dev" + } + }, + "installation-source": "source", + "autoload": { + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + } + ], + "description": "lessphp is a compiler for LESS written in PHP.", + "homepage": "http://leafo.net/lessphp/" + }, + { + "name": "gedmo/doctrine-extensions", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", + "reference": "c893252900762f0c7a6e2e72994e983015e33ebe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/l3pp4rd/DoctrineExtensions/zipball/c893252900762f0c7a6e2e72994e983015e33ebe", + "reference": "c893252900762f0c7a6e2e72994e983015e33ebe", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/event-dispatcher": ">=2.1,<3.0", - "symfony/locale": ">=2.0,<3.0", - "symfony/options-resolver": ">=2.1,<2.4-dev", - "symfony/property-access": ">=2.2,<2.4-dev" + "doctrine/common": ">=2.2,<2.5-dev", + "php": ">=5.3.2" }, "require-dev": { - "symfony/http-foundation": ">=2.1,<2.4-dev", - "symfony/validator": ">=2.2,<2.4-dev" + "doctrine/dbal": ">=2.2", + "doctrine/mongodb": "1.0.1", + "doctrine/mongodb-odm": "1.0.0-BETA7", + "doctrine/orm": ">=2.2", + "symfony/yaml": "2.*" }, "suggest": { - "symfony/http-foundation": "2.2.*", - "symfony/validator": "2.2.*" + "doctrine/dbal": ">=2.3.2", + "doctrine/mongodb": ">=1.0.1", + "doctrine/mongodb-odm": ">=1.0.0-BETA7", + "doctrine/orm": ">=2.3.2" }, - "time": "2013-04-01 08:07:53", + "time": "2013-04-03 03:54:53", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.3.x-dev" } }, "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Component\\Form\\": "" + "Gedmo": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2105,55 +2034,126 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "David Buchmann", + "email": "david@liip.ch" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Gediminas Morkevicius", + "email": "gediminas.morkevicius@gmail.com" + }, + { + "name": "Gustavo Falco", + "email": "comfortablynumb84@gmail.com" } ], - "description": "Symfony Form Component", - "homepage": "http://symfony.com" + "description": "Doctrine2 behavioral extensions", + "homepage": "http://gediminasm.org/", + "keywords": [ + "Blameable", + "behaviors", + "doctrine2", + "extensions", + "gedmo", + "loggable", + "nestedset", + "sluggable", + "sortable", + "timestampable", + "translatable", + "tree", + "uploadable" + ] }, { - "name": "symfony/translation", + "name": "chamilo/chash", "version": "dev-master", "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/Translation", "source": { "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "cb8553294d259431f11b19d731d81a483309320a" + "url": "https://github.com/chamilo/chash.git", + "reference": "38a4ea2c1d448699c780c81f72a434da79547a8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/cb8553294d259431f11b19d731d81a483309320a", - "reference": "cb8553294d259431f11b19d731d81a483309320a", + "url": "https://api.github.com/repos/chamilo/chash/zipball/38a4ea2c1d448699c780c81f72a434da79547a8f", + "reference": "38a4ea2c1d448699c780c81f72a434da79547a8f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.2", + "symfony/console": "2.3.*@dev", + "symfony/yaml": "2.1.*" + }, + "time": "2013-04-03 12:15:26", + "type": "library", + "installation-source": "source", + "autoload": { + "psr-0": { + "Chash": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/" + }, + { + "name": "silex/silex", + "version": "dev-master", + "version_normalized": "9999999-dev", + "source": { + "type": "git", + "url": "https://github.com/fabpot/Silex.git", + "reference": "31139babedb2a4f504737d1d8c5255fca102dae2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fabpot/Silex/zipball/31139babedb2a4f504737d1d8c5255fca102dae2", + "reference": "31139babedb2a4f504737d1d8c5255fca102dae2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "pimple/pimple": "1.*", + "symfony/event-dispatcher": ">=2.1,<2.3-dev", + "symfony/http-foundation": ">=2.1,<2.3-dev", + "symfony/http-kernel": ">=2.1,<2.3-dev", + "symfony/routing": ">=2.1,<2.3-dev" }, "require-dev": { - "symfony/config": ">=2.0,<2.4-dev", - "symfony/yaml": ">=2.2,<3.0" + "doctrine/dbal": ">=2.2.0,<2.4.0-dev", + "swiftmailer/swiftmailer": "4.2.*", + "symfony/browser-kit": ">=2.1,<2.3-dev", + "symfony/config": ">=2.1,<2.3-dev", + "symfony/css-selector": ">=2.1,<2.3-dev", + "symfony/dom-crawler": ">=2.1,<2.3-dev", + "symfony/finder": ">=2.1,<2.3-dev", + "symfony/form": ">=2.1.4,<2.3-dev", + "symfony/locale": ">=2.1,<2.3-dev", + "symfony/monolog-bridge": ">=2.1,<2.3-dev", + "symfony/options-resolver": ">=2.1,<2.3-dev", + "symfony/process": ">=2.1,<2.3-dev", + "symfony/security": ">=2.1,<2.3-dev", + "symfony/serializer": ">=2.1,<2.3-dev", + "symfony/translation": ">=2.1,<2.3-dev", + "symfony/twig-bridge": ">=2.1,<2.3-dev", + "symfony/validator": ">=2.1,<2.3-dev", + "twig/twig": ">=1.8.0,<2.0-dev" }, "suggest": { - "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*" + "symfony/browser-kit": ">=2.1,<2.3-dev", + "symfony/css-selector": ">=2.1,<2.3-dev", + "symfony/dom-crawler": ">=2.1,<2.3-dev", + "symfony/form": "To make use of the FormServiceProvider, >= 2.1.4 is required" }, - "time": "2013-04-01 08:07:53", + "time": "2013-04-03 19:59:11", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "1.0.x-dev" } }, "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Component\\Translation\\": "" + "Silex": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2166,57 +2166,42 @@ "email": "fabien@symfony.com" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Igor Wiedler", + "email": "igor@wiedler.ch", + "homepage": "http://wiedler.ch/igor/" } ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com" + "description": "The PHP micro-framework based on the Symfony2 Components", + "homepage": "http://silex.sensiolabs.org", + "keywords": [ + "microframework" + ] }, { - "name": "symfony/validator", - "version": "dev-master", - "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/Validator", + "name": "symfony/finder", + "version": "v2.1.9", + "version_normalized": "2.1.9.0", + "target-dir": "Symfony/Component/Finder", "source": { "type": "git", - "url": "https://github.com/symfony/Validator.git", - "reference": "b9e2fa05cf314a8c64db801adbfce611028e63b9" + "url": "https://github.com/symfony/Finder.git", + "reference": "v2.1.9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Validator/zipball/b9e2fa05cf314a8c64db801adbfce611028e63b9", - "reference": "b9e2fa05cf314a8c64db801adbfce611028e63b9", + "url": "https://api.github.com/repos/symfony/Finder/zipball/v2.1.9", + "reference": "v2.1.9", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/translation": ">=2.0,<3.0" - }, - "require-dev": { - "symfony/config": ">=2.2,<2.4-dev", - "symfony/http-foundation": ">=2.1,<3.0", - "symfony/locale": ">=2.0,<3.0", - "symfony/yaml": ">=2.0,<3.0" - }, - "suggest": { - "doctrine/common": "~2.2", - "symfony/config": "2.2.*", - "symfony/http-foundation": "2.2.*", - "symfony/locale": "2.2.*", - "symfony/yaml": "2.2.*" + "php": ">=5.3.3" }, - "time": "2013-04-01 08:07:53", + "time": "2013-03-06 19:26:55", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "installation-source": "source", + "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Validator\\": "" + "Symfony\\Component\\Finder": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2233,37 +2218,29 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Validator Component", + "description": "Symfony Finder Component", "homepage": "http://symfony.com" }, { - "name": "symfony/dependency-injection", + "name": "symfony/config", "version": "dev-master", "version_normalized": "9999999-dev", - "target-dir": "Symfony/Component/DependencyInjection", + "target-dir": "Symfony/Component/Config", "source": { "type": "git", - "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "bdbd94e1fbca934ed4c6d912e57c99a17bbe753b" + "url": "https://github.com/symfony/Config.git", + "reference": "6a9046f65ed72b9ed41dc063bba1d59978114a65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/bdbd94e1fbca934ed4c6d912e57c99a17bbe753b", - "reference": "bdbd94e1fbca934ed4c6d912e57c99a17bbe753b", + "url": "https://api.github.com/repos/symfony/Config/zipball/6a9046f65ed72b9ed41dc063bba1d59978114a65", + "reference": "6a9046f65ed72b9ed41dc063bba1d59978114a65", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/config": ">=2.2,<2.4-dev", - "symfony/yaml": ">=2.0,<3.0" - }, - "suggest": { - "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*" - }, - "time": "2013-03-23 13:07:03", + "time": "2013-04-02 09:39:57", "type": "library", "extra": { "branch-alias": { @@ -2273,7 +2250,7 @@ "installation-source": "source", "autoload": { "psr-0": { - "Symfony\\Component\\DependencyInjection\\": "" + "Symfony\\Component\\Config\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2290,95 +2267,120 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony DependencyInjection Component", + "description": "Symfony Config Component", "homepage": "http://symfony.com" }, { - "name": "leafo/lessphp", + "name": "pagerfanta/pagerfanta", "version": "dev-master", "version_normalized": "9999999-dev", "source": { "type": "git", - "url": "https://github.com/leafo/lessphp.git", - "reference": "a2feb59a0f5cd144aa70759ce0333f36d12e2582" + "url": "https://github.com/whiteoctober/Pagerfanta.git", + "reference": "4fded9adde16a4133b4db9f14815efadbbd268d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leafo/lessphp/zipball/a2feb59a0f5cd144aa70759ce0333f36d12e2582", - "reference": "a2feb59a0f5cd144aa70759ce0333f36d12e2582", + "url": "https://api.github.com/repos/whiteoctober/Pagerfanta/zipball/4fded9adde16a4133b4db9f14815efadbbd268d1", + "reference": "4fded9adde16a4133b4db9f14815efadbbd268d1", "shasum": "" }, - "time": "2013-04-02 18:20:23", + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "doctrine/mongodb-odm": "*", + "doctrine/orm": "2.*", + "mandango/mandango": "*", + "propel/propel1": ">=1.6,<2.0", + "solarium/solarium": "dev-develop" + }, + "suggest": { + "doctrine/mongodb-odm": "To use the DoctrineODMMongoDBAdapter.", + "doctrine/orm": "To use the DoctrineORMAdapter.", + "mandango/mandango": "To use the MandangoAdapter.", + "propel/propel1": "To use the PropelAdapter", + "solarium/solarium": "To use the SolariumAdapter." + }, + "time": "2013-04-04 17:07:12", "type": "library", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "1.0.x-dev" } }, "installation-source": "source", "autoload": { - "classmap": [ - "lessc.inc.php" - ] + "psr-0": { + "Pagerfanta\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT", - "GPL-3.0" + "MIT" ], "authors": [ { - "name": "Leaf Corcoran", - "email": "leafot@gmail.com", - "homepage": "http://leafo.net" + "name": "Pablo Díez", + "email": "pablodip@gmail.com", + "homepage": "http://github.com/pablodip" } ], - "description": "lessphp is a compiler for LESS written in PHP.", - "homepage": "http://leafo.net/lessphp/" + "description": "Pagination for PHP 5.3", + "keywords": [ + "page", + "paging" + ] }, { - "name": "gedmo/doctrine-extensions", + "name": "symfony/doctrine-bridge", "version": "dev-master", "version_normalized": "9999999-dev", + "target-dir": "Symfony/Bridge/Doctrine", "source": { "type": "git", - "url": "https://github.com/l3pp4rd/DoctrineExtensions.git", - "reference": "c893252900762f0c7a6e2e72994e983015e33ebe" + "url": "https://github.com/symfony/DoctrineBridge.git", + "reference": "464e871e337962c526de95d758f91df049e5758c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/l3pp4rd/DoctrineExtensions/zipball/c893252900762f0c7a6e2e72994e983015e33ebe", - "reference": "c893252900762f0c7a6e2e72994e983015e33ebe", + "url": "https://api.github.com/repos/symfony/DoctrineBridge/zipball/464e871e337962c526de95d758f91df049e5758c", + "reference": "464e871e337962c526de95d758f91df049e5758c", "shasum": "" }, "require": { - "doctrine/common": ">=2.2,<2.5-dev", - "php": ">=5.3.2" + "doctrine/common": ">=2.2,<3.0", + "php": ">=5.3.3" }, "require-dev": { - "doctrine/dbal": ">=2.2", - "doctrine/mongodb": "1.0.1", - "doctrine/mongodb-odm": "1.0.0-BETA7", - "doctrine/orm": ">=2.2", - "symfony/yaml": "2.*" + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": ">=2.2,<3.0", + "doctrine/orm": ">=2.2,<3.0,>=2.2.3", + "symfony/dependency-injection": ">=2.0,<3.0", + "symfony/form": ">=2.2,<2.4-dev", + "symfony/http-kernel": ">=2.2,<2.4-dev", + "symfony/security": ">=2.2,<2.4-dev", + "symfony/stopwatch": ">=2.2,<2.4-dev", + "symfony/validator": ">=2.2,<2.4-dev" }, "suggest": { - "doctrine/dbal": ">=2.3.2", - "doctrine/mongodb": ">=1.0.1", - "doctrine/mongodb-odm": ">=1.0.0-BETA7", - "doctrine/orm": ">=2.3.2" + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.2", + "doctrine/orm": "~2.2,>=2.2.3", + "symfony/form": "2.2.*", + "symfony/validator": "2.2.*" }, - "time": "2013-04-03 03:54:53", - "type": "library", + "time": "2013-04-02 09:46:23", + "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "2.3-dev" } }, "installation-source": "source", "autoload": { "psr-0": { - "Gedmo": "lib/" + "Symfony\\Bridge\\Doctrine\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2387,126 +2389,123 @@ ], "authors": [ { - "name": "David Buchmann", - "email": "david@liip.ch" - }, - { - "name": "Gediminas Morkevicius", - "email": "gediminas.morkevicius@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Gustavo Falco", - "email": "comfortablynumb84@gmail.com" + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" } ], - "description": "Doctrine2 behavioral extensions", - "homepage": "http://gediminasm.org/", - "keywords": [ - "Blameable", - "behaviors", - "doctrine2", - "extensions", - "gedmo", - "loggable", - "nestedset", - "sluggable", - "sortable", - "timestampable", - "translatable", - "tree", - "uploadable" - ] + "description": "Symfony Doctrine Bridge", + "homepage": "http://symfony.com" }, { - "name": "chamilo/chash", + "name": "symfony/security", "version": "dev-master", "version_normalized": "9999999-dev", + "target-dir": "Symfony/Component/Security", "source": { "type": "git", - "url": "https://github.com/chamilo/chash.git", - "reference": "38a4ea2c1d448699c780c81f72a434da79547a8f" + "url": "https://github.com/symfony/Security.git", + "reference": "cfa23578e55c43c20a8d823bf9a01ed08bcde1d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chamilo/chash/zipball/38a4ea2c1d448699c780c81f72a434da79547a8f", - "reference": "38a4ea2c1d448699c780c81f72a434da79547a8f", + "url": "https://api.github.com/repos/symfony/Security/zipball/cfa23578e55c43c20a8d823bf9a01ed08bcde1d5", + "reference": "cfa23578e55c43c20a8d823bf9a01ed08bcde1d5", "shasum": "" }, "require": { - "php": ">=5.3.2", - "symfony/console": "2.3.*@dev", - "symfony/yaml": "2.1.*" + "php": ">=5.3.3", + "symfony/event-dispatcher": ">=2.1,<3.0", + "symfony/http-foundation": ">=2.1,<2.4-dev", + "symfony/http-kernel": ">=2.1,<=2.3-dev" }, - "time": "2013-04-03 12:15:26", + "require-dev": { + "doctrine/common": ">=2.2,<3.0", + "doctrine/dbal": ">=2.2,<3.0", + "psr/log": ">=1.0,<2.0", + "symfony/form": ">=2.0,<3.0", + "symfony/routing": ">=2.2,<2.4-dev", + "symfony/validator": ">=2.2,<2.4-dev" + }, + "suggest": { + "doctrine/dbal": "to use the built-in ACL implementation", + "symfony/class-loader": "2.2.*", + "symfony/finder": "2.2.*", + "symfony/form": "2.2.*", + "symfony/routing": "2.2.*", + "symfony/validator": "2.2.*" + }, + "time": "2013-04-02 09:39:57", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, "installation-source": "source", "autoload": { "psr-0": { - "Chash": "src/" + "Symfony\\Component\\Security\\": "" } }, - "notification-url": "https://packagist.org/downloads/" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony Security Component", + "homepage": "http://symfony.com" }, { - "name": "silex/silex", + "name": "symfony/translation", "version": "dev-master", "version_normalized": "9999999-dev", + "target-dir": "Symfony/Component/Translation", "source": { "type": "git", - "url": "https://github.com/fabpot/Silex.git", - "reference": "31139babedb2a4f504737d1d8c5255fca102dae2" + "url": "https://github.com/symfony/Translation.git", + "reference": "b518a3100b09b5de4b4750e9415c00ad1bd77b1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Silex/zipball/31139babedb2a4f504737d1d8c5255fca102dae2", - "reference": "31139babedb2a4f504737d1d8c5255fca102dae2", + "url": "https://api.github.com/repos/symfony/Translation/zipball/b518a3100b09b5de4b4750e9415c00ad1bd77b1e", + "reference": "b518a3100b09b5de4b4750e9415c00ad1bd77b1e", "shasum": "" }, "require": { - "php": ">=5.3.3", - "pimple/pimple": "1.*", - "symfony/event-dispatcher": ">=2.1,<2.3-dev", - "symfony/http-foundation": ">=2.1,<2.3-dev", - "symfony/http-kernel": ">=2.1,<2.3-dev", - "symfony/routing": ">=2.1,<2.3-dev" + "php": ">=5.3.3" }, "require-dev": { - "doctrine/dbal": ">=2.2.0,<2.4.0-dev", - "swiftmailer/swiftmailer": "4.2.*", - "symfony/browser-kit": ">=2.1,<2.3-dev", - "symfony/config": ">=2.1,<2.3-dev", - "symfony/css-selector": ">=2.1,<2.3-dev", - "symfony/dom-crawler": ">=2.1,<2.3-dev", - "symfony/finder": ">=2.1,<2.3-dev", - "symfony/form": ">=2.1.4,<2.3-dev", - "symfony/locale": ">=2.1,<2.3-dev", - "symfony/monolog-bridge": ">=2.1,<2.3-dev", - "symfony/options-resolver": ">=2.1,<2.3-dev", - "symfony/process": ">=2.1,<2.3-dev", - "symfony/security": ">=2.1,<2.3-dev", - "symfony/serializer": ">=2.1,<2.3-dev", - "symfony/translation": ">=2.1,<2.3-dev", - "symfony/twig-bridge": ">=2.1,<2.3-dev", - "symfony/validator": ">=2.1,<2.3-dev", - "twig/twig": ">=1.8.0,<2.0-dev" + "symfony/config": ">=2.0,<2.4-dev", + "symfony/yaml": ">=2.2,<3.0" }, "suggest": { - "symfony/browser-kit": ">=2.1,<2.3-dev", - "symfony/css-selector": ">=2.1,<2.3-dev", - "symfony/dom-crawler": ">=2.1,<2.3-dev", - "symfony/form": "To make use of the FormServiceProvider, >= 2.1.4 is required" + "symfony/config": "2.2.*", + "symfony/yaml": "2.2.*" }, - "time": "2013-04-03 19:59:11", + "time": "2013-04-02 09:39:57", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.3-dev" } }, "installation-source": "source", "autoload": { "psr-0": { - "Silex": "src/" + "Symfony\\Component\\Translation\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2519,16 +2518,12 @@ "email": "fabien@symfony.com" }, { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" } ], - "description": "The PHP micro-framework based on the Symfony2 Components", - "homepage": "http://silex.sensiolabs.org", - "keywords": [ - "microframework" - ] + "description": "Symfony Translation Component", + "homepage": "http://symfony.com" }, { "name": "mheap/silex-assetic", @@ -2537,28 +2532,34 @@ "source": { "type": "git", "url": "https://github.com/mheap/Silex-Assetic.git", - "reference": "869aa9edba10d86c16a59384f523de96343f9944" + "reference": "a19e61708a014d7cb7edad62effe90dd37700282" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mheap/Silex-Assetic/zipball/869aa9edba10d86c16a59384f523de96343f9944", - "reference": "869aa9edba10d86c16a59384f523de96343f9944", + "url": "https://api.github.com/repos/mheap/Silex-Assetic/zipball/a19e61708a014d7cb7edad62effe90dd37700282", + "reference": "a19e61708a014d7cb7edad62effe90dd37700282", "shasum": "" }, "require": { - "kriswallsmith/assetic": ">=1.0", + "kriswallsmith/assetic": ">=1.0,<2.0", "php": ">=5.3.0", - "symfony/finder": ">=2.1,<2.3" + "symfony/finder": ">=2.1,<2.2" }, "require-dev": { - "silex/silex": "*", - "twig/twig": ">=1.2.0" + "phpunit/phpunit": ">=3.7.10.0,<3.8", + "silex/silex": ">=1.0,<2.0", + "twig/twig": ">=1.2,<2.0" }, "suggest": { - "twig/twig": ">=1.2.0" + "twig/twig": "~1.2" }, - "time": "2013-04-04 10:20:51", + "time": "2013-04-04 15:08:56", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "installation-source": "source", "autoload": { "psr-0": { diff --git a/vendor/mheap/silex-assetic b/vendor/mheap/silex-assetic index 869aa9edba..a19e61708a 160000 --- a/vendor/mheap/silex-assetic +++ b/vendor/mheap/silex-assetic @@ -1 +1 @@ -Subproject commit 869aa9edba10d86c16a59384f523de96343f9944 +Subproject commit a19e61708a014d7cb7edad62effe90dd37700282 diff --git a/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Pagerfanta.php b/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Pagerfanta.php index d5fda0977f..9b01899628 100644 --- a/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Pagerfanta.php +++ b/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Pagerfanta.php @@ -151,7 +151,6 @@ class Pagerfanta implements \Countable, \IteratorAggregate, PagerfantaInterface { $this->currentPageResults = null; $this->nbResults = null; - $this->nbPages = null; } /** diff --git a/vendor/symfony/config/Symfony/Component/Config/Definition/ReferenceDumper.php b/vendor/symfony/config/Symfony/Component/Config/Definition/ReferenceDumper.php index ef2b05d10f..54309021b7 100644 --- a/vendor/symfony/config/Symfony/Component/Config/Definition/ReferenceDumper.php +++ b/vendor/symfony/config/Symfony/Component/Config/Definition/ReferenceDumper.php @@ -115,12 +115,12 @@ class ReferenceDumper $default = (string) $default != '' ? ' '.$default : ''; $comments = count($comments) ? '# '.implode(', ', $comments) : ''; - $text = rtrim(sprintf('%-20s %s %s', $node->getName() . ':', $default, $comments), ' '); + $text = rtrim(sprintf('%-20s %s %s', $node->getName().':', $default, $comments), ' '); if ($info = $node->getInfo()) { $this->writeLine(''); // indenting multi-line info - $info = str_replace("\n", sprintf("\n%" . $depth * 4 . "s# ", ' '), $info); + $info = str_replace("\n", sprintf("\n%".$depth * 4 . "s# ", ' '), $info); $this->writeLine('# '.$info, $depth * 4); } diff --git a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index 62ff0a31be..a81b9c08e5 100644 --- a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -304,7 +304,7 @@ abstract class AbstractDoctrineExtension extends Extension protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName) { $cacheDriver = $objectManager[$cacheName.'_driver']; - $cacheDriverService = $this->getObjectManagerElementName($objectManager['name'] . '_' . $cacheName); + $cacheDriverService = $this->getObjectManagerElementName($objectManager['name'].'_'.$cacheName); switch ($cacheDriver['type']) { case 'service': diff --git a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php index c857ef93c3..30479c8c01 100644 --- a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php +++ b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php @@ -51,21 +51,21 @@ class DoctrineValidationPass implements CompilerPassInterface */ private function updateValidatorMappingFiles(ContainerBuilder $container, $mapping, $extension) { - if ( ! $container->hasParameter('validator.mapping.loader.' . $mapping . '_files_loader.mapping_files')) { + if (!$container->hasParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files')) { return; } - $files = $container->getParameter('validator.mapping.loader.' . $mapping . '_files_loader.mapping_files'); - $validationPath = 'Resources/config/validation.' . $this->managerType . '.' . $extension; + $files = $container->getParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files'); + $validationPath = 'Resources/config/validation.'.$this->managerType.'.'.$extension; foreach ($container->getParameter('kernel.bundles') as $bundle) { $reflection = new \ReflectionClass($bundle); - if (is_file($file = dirname($reflection->getFilename()) . '/' . $validationPath)) { + if (is_file($file = dirname($reflection->getFilename()).'/'.$validationPath)) { $files[] = realpath($file); $container->addResource(new FileResource($file)); } } - $container->setParameter('validator.mapping.loader.' . $mapping . '_files_loader.mapping_files', $files); + $container->setParameter('validator.mapping.loader.'.$mapping.'_files_loader.mapping_files', $files); } } diff --git a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php index 1fc6ae378e..3cb01faf34 100644 --- a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php +++ b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php @@ -120,7 +120,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase */ public function testCollapsedEntityFieldWithChoices() { - $choices = $this->em->createQuery('SELECT c FROM ' . self::ENTITY_CLASS . ' c')->getResult(); + $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult(); $this->setMaxRunningTime(1); for ($i = 0; $i < 40; ++$i) { @@ -139,7 +139,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase */ public function testCollapsedEntityFieldWithPreferredChoices() { - $choices = $this->em->createQuery('SELECT c FROM ' . self::ENTITY_CLASS . ' c')->getResult(); + $choices = $this->em->createQuery('SELECT c FROM '.self::ENTITY_CLASS.' c')->getResult(); $this->setMaxRunningTime(1); for ($i = 0; $i < 40; ++$i) { diff --git a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php index 52d2eab7eb..0efffac6fc 100644 --- a/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php +++ b/vendor/symfony/doctrine-bridge/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php @@ -95,7 +95,7 @@ class UniqueEntityValidator extends ConstraintValidator if (count($relatedId) > 1) { throw new ConstraintDefinitionException( "Associated entities are not allowed to have more than one identifier field to be " . - "part of a unique constraint in: " . $class->getName() . "#" . $fieldName + "part of a unique constraint in: ".$class->getName()."#".$fieldName ); } $criteria[$fieldName] = array_pop($relatedId); diff --git a/vendor/symfony/finder/Symfony/Component/Finder/.gitignore b/vendor/symfony/finder/Symfony/Component/Finder/.gitignore deleted file mode 100644 index 44de97a36a..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -vendor/ -composer.lock -phpunit.xml - diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractAdapter.php deleted file mode 100644 index 839a601638..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractAdapter.php +++ /dev/null @@ -1,225 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Adapter; - -/** - * Interface for finder engine implementations. - * - * @author Jean-François Simon - */ -abstract class AbstractAdapter implements AdapterInterface -{ - protected $followLinks = false; - protected $mode = 0; - protected $minDepth = 0; - protected $maxDepth = INF; - protected $exclude = array(); - protected $names = array(); - protected $notNames = array(); - protected $contains = array(); - protected $notContains = array(); - protected $sizes = array(); - protected $dates = array(); - protected $filters = array(); - protected $sort = false; - protected $paths = array(); - protected $notPaths = array(); - - private static $areSupported = array(); - - /** - * {@inheritDoc} - */ - public function isSupported() - { - $name = $this->getName(); - - if (!array_key_exists($name, self::$areSupported)) { - self::$areSupported[$name] = $this->canBeUsed(); - } - - return self::$areSupported[$name]; - } - - /** - * {@inheritdoc} - */ - public function setFollowLinks($followLinks) - { - $this->followLinks = $followLinks; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setMode($mode) - { - $this->mode = $mode; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDepths(array $depths) - { - $this->minDepth = 0; - $this->maxDepth = INF; - - foreach ($depths as $comparator) { - switch ($comparator->getOperator()) { - case '>': - $this->minDepth = $comparator->getTarget() + 1; - break; - case '>=': - $this->minDepth = $comparator->getTarget(); - break; - case '<': - $this->maxDepth = $comparator->getTarget() - 1; - break; - case '<=': - $this->maxDepth = $comparator->getTarget(); - break; - default: - $this->minDepth = $this->maxDepth = $comparator->getTarget(); - } - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setExclude(array $exclude) - { - $this->exclude = $exclude; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNames(array $names) - { - $this->names = $names; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNotNames(array $notNames) - { - $this->notNames = $notNames; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setContains(array $contains) - { - $this->contains = $contains; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNotContains(array $notContains) - { - $this->notContains = $notContains; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setSizes(array $sizes) - { - $this->sizes = $sizes; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDates(array $dates) - { - $this->dates = $dates; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setFilters(array $filters) - { - $this->filters = $filters; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setSort($sort) - { - $this->sort = $sort; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setPath(array $paths) - { - $this->paths = $paths; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNotPath(array $notPaths) - { - $this->notPaths = $notPaths; - - return $this; - } - - /** - * Returns whether the adapter is supported in the current environment. - * - * This method should be implemented in all adapters. Do not implement - * isSupported in the adapters as the generic implementation provides a cache - * layer. - * - * @see isSupported - * - * @return Boolean Whether the adapter is supported - */ - abstract protected function canBeUsed(); -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php deleted file mode 100644 index b0aef4d0cf..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php +++ /dev/null @@ -1,320 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Adapter; - -use Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\Shell\Shell; -use Symfony\Component\Finder\Expression\Expression; -use Symfony\Component\Finder\Shell\Command; -use Symfony\Component\Finder\Iterator\SortableIterator; -use Symfony\Component\Finder\Comparator\NumberComparator; -use Symfony\Component\Finder\Comparator\DateComparator; - -/** - * Shell engine implementation using GNU find command. - * - * @author Jean-François Simon - */ -abstract class AbstractFindAdapter extends AbstractAdapter -{ - /** - * @var Shell - */ - protected $shell; - - /** - * Constructor. - */ - public function __construct() - { - $this->shell = new Shell(); - } - - /** - * {@inheritdoc} - */ - public function searchInDirectory($dir) - { - // having "/../" in path make find fail - $dir = realpath($dir); - - // searching directories containing or not containing strings leads to no result - if (Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES === $this->mode && ($this->contains || $this->notContains)) { - return new Iterator\FilePathsIterator(array(), $dir); - } - - $command = Command::create(); - $find = $this->buildFindCommand($command, $dir); - - if ($this->followLinks) { - $find->add('-follow'); - } - - $find->add('-mindepth')->add($this->minDepth + 1); - // warning! INF < INF => true ; INF == INF => false ; INF === INF => true - // https://bugs.php.net/bug.php?id=9118 - if (INF !== $this->maxDepth) { - $find->add('-maxdepth')->add($this->maxDepth + 1); - } - - if (Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES === $this->mode) { - $find->add('-type d'); - } elseif (Iterator\FileTypeFilterIterator::ONLY_FILES === $this->mode) { - $find->add('-type f'); - } - - $this->buildNamesFiltering($find, $this->names); - $this->buildNamesFiltering($find, $this->notNames, true); - $this->buildPathsFiltering($find, $dir, $this->paths); - $this->buildPathsFiltering($find, $dir, $this->notPaths, true); - $this->buildSizesFiltering($find, $this->sizes); - $this->buildDatesFiltering($find, $this->dates); - - $useGrep = $this->shell->testCommand('grep') && $this->shell->testCommand('xargs'); - $useSort = is_int($this->sort) && $this->shell->testCommand('sort') && $this->shell->testCommand('cut'); - - if ($useGrep && ($this->contains || $this->notContains)) { - $grep = $command->ins('grep'); - $this->buildContentFiltering($grep, $this->contains); - $this->buildContentFiltering($grep, $this->notContains, true); - } - - if ($useSort) { - $this->buildSorting($command, $this->sort); - } - - $paths = $this->shell->testCommand('uniq') ? $command->add('| uniq')->execute() : array_unique($command->execute()); - $iterator = new Iterator\FilePathsIterator($paths, $dir); - - if ($this->exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); - } - - if (!$useGrep && ($this->contains || $this->notContains)) { - $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); - } - - if ($this->filters) { - $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); - } - - if (!$useSort && $this->sort) { - $iteratorAggregate = new Iterator\SortableIterator($iterator, $this->sort); - $iterator = $iteratorAggregate->getIterator(); - } - - return $iterator; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return $this->shell->testCommand('find'); - } - - /** - * @param Command $command - * @param string $dir - * - * @return Command - */ - protected function buildFindCommand(Command $command, $dir) - { - return $command - ->ins('find') - ->add('find ') - ->arg($dir) - ->add('-noleaf'); // the -noleaf option is required for filesystems that don't follow the '.' and '..' conventions - } - - /** - * @param Command $command - * @param string[] $names - * @param Boolean $not - */ - private function buildNamesFiltering(Command $command, array $names, $not = false) - { - if (0 === count($names)) { - return; - } - - $command->add($not ? '-not' : null)->cmd('('); - - foreach ($names as $i => $name) { - $expr = Expression::create($name); - - // Find does not support expandable globs ("*.{a,b}" syntax). - if ($expr->isGlob() && $expr->getGlob()->isExpandable()) { - $expr = Expression::create($expr->getGlob()->toRegex(false)); - } - - // Fixes 'not search' and 'full path matching' regex problems. - // - Jokers '.' are replaced by [^/]. - // - We add '[^/]*' before and after regex (if no ^|$ flags are present). - if ($expr->isRegex()) { - $regex = $expr->getRegex(); - $regex->prepend($regex->hasStartFlag() ? '/' : '/[^/]*') - ->setStartFlag(false) - ->setStartJoker(true) - ->replaceJokers('[^/]'); - if (!$regex->hasEndFlag() || $regex->hasEndJoker()) { - $regex->setEndJoker(false)->append('[^/]*'); - } - } - - $command - ->add($i > 0 ? '-or' : null) - ->add($expr->isRegex() - ? ($expr->isCaseSensitive() ? '-regex' : '-iregex') - : ($expr->isCaseSensitive() ? '-name' : '-iname') - ) - ->arg($expr->renderPattern()); - } - - $command->cmd(')'); - } - - /** - * @param Command $command - * @param string $dir - * @param string[] $paths - * @param Boolean $not - */ - private function buildPathsFiltering(Command $command, $dir, array $paths, $not = false) - { - if (0 === count($paths)) { - return; - } - - $command->add($not ? '-not' : null)->cmd('('); - - foreach ($paths as $i => $path) { - $expr = Expression::create($path); - - // Find does not support expandable globs ("*.{a,b}" syntax). - if ($expr->isGlob() && $expr->getGlob()->isExpandable()) { - $expr = Expression::create($expr->getGlob()->toRegex(false)); - } - - // Fixes 'not search' regex problems. - if ($expr->isRegex()) { - $regex = $expr->getRegex(); - $regex->prepend($regex->hasStartFlag() ? $dir.DIRECTORY_SEPARATOR : '.*')->setEndJoker(!$regex->hasEndFlag()); - } else { - $expr->prepend('*')->append('*'); - } - - $command - ->add($i > 0 ? '-or' : null) - ->add($expr->isRegex() - ? ($expr->isCaseSensitive() ? '-regex' : '-iregex') - : ($expr->isCaseSensitive() ? '-path' : '-ipath') - ) - ->arg($expr->renderPattern()); - } - - $command->cmd(')'); - } - - /** - * @param Command $command - * @param NumberComparator[] $sizes - */ - private function buildSizesFiltering(Command $command, array $sizes) - { - foreach ($sizes as $i => $size) { - $command->add($i > 0 ? '-and' : null); - - switch ($size->getOperator()) { - case '<=': - $command->add('-size -' . ($size->getTarget() + 1) . 'c'); - break; - case '>=': - $command->add('-size +'. ($size->getTarget() - 1) . 'c'); - break; - case '>': - $command->add('-size +' . $size->getTarget() . 'c'); - break; - case '!=': - $command->add('-size -' . $size->getTarget() . 'c'); - $command->add('-size +' . $size->getTarget() . 'c'); - case '<': - default: - $command->add('-size -' . $size->getTarget() . 'c'); - } - } - } - - /** - * @param Command $command - * @param DateComparator[] $dates - */ - private function buildDatesFiltering(Command $command, array $dates) - { - foreach ($dates as $i => $date) { - $command->add($i > 0 ? '-and' : null); - - $mins = (int) round((time()-$date->getTarget()) / 60); - - if (0 > $mins) { - // mtime is in the future - $command->add(' -mmin -0'); - // we will have no result so we don't need to continue - return; - } - - switch ($date->getOperator()) { - case '<=': - $command->add('-mmin +' . ($mins - 1)); - break; - case '>=': - $command->add('-mmin -' . ($mins + 1)); - break; - case '>': - $command->add('-mmin -' . $mins); - break; - case '!=': - $command->add('-mmin +' . $mins.' -or -mmin -' . $mins); - break; - case '<': - default: - $command->add('-mmin +' . $mins); - } - } - } - - /** - * @param Command $command - * @param string $sort - * - * @throws \InvalidArgumentException - */ - private function buildSorting(Command $command, $sort) - { - $this->buildFormatSorting($command, $sort); - } - - /** - * @param Command $command - * @param string $sort - */ - abstract protected function buildFormatSorting(Command $command, $sort); - - /** - * @param Command $command - * @param array $contains - * @param Boolean $not - */ - abstract protected function buildContentFiltering(Command $command, array $contains, $not = false); -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AdapterInterface.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AdapterInterface.php deleted file mode 100644 index f28ffb3189..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AdapterInterface.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Adapter; - -/** - * @author Jean-François Simon - */ -interface AdapterInterface -{ - /** - * @param Boolean $followLinks - * - * @return AdapterInterface Current instance - */ - public function setFollowLinks($followLinks); - - /** - * @param integer $mode - * - * @return AdapterInterface Current instance - */ - public function setMode($mode); - - /** - * @param array $exclude - * - * @return AdapterInterface Current instance - */ - public function setExclude(array $exclude); - - /** - * @param array $depths - * - * @return AdapterInterface Current instance - */ - public function setDepths(array $depths); - - /** - * @param array $names - * - * @return AdapterInterface Current instance - */ - public function setNames(array $names); - - /** - * @param array $notNames - * - * @return AdapterInterface Current instance - */ - public function setNotNames(array $notNames); - - /** - * @param array $contains - * - * @return AdapterInterface Current instance - */ - public function setContains(array $contains); - - /** - * @param array $notContains - * - * @return AdapterInterface Current instance - */ - public function setNotContains(array $notContains); - - /** - * @param array $sizes - * - * @return AdapterInterface Current instance - */ - public function setSizes(array $sizes); - - /** - * @param array $dates - * - * @return AdapterInterface Current instance - */ - public function setDates(array $dates); - - /** - * @param array $filters - * - * @return AdapterInterface Current instance - */ - public function setFilters(array $filters); - - /** - * @param \Closure|integer $sort - * - * @return AdapterInterface Current instance - */ - public function setSort($sort); - - /** - * @param array $paths - * - * @return AdapterInterface Current instance - */ - public function setPath(array $paths); - - /** - * @param array $notPaths - * - * @return AdapterInterface Current instance - */ - public function setNotPath(array $notPaths); - - /** - * @param string $dir - * - * @return \Iterator Result iterator - */ - public function searchInDirectory($dir); - - /** - * Tests adapter support for current platform. - * - * @return Boolean - */ - public function isSupported(); - - /** - * Returns adapter name. - * - * @return string - */ - public function getName(); -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/BsdFindAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/BsdFindAdapter.php deleted file mode 100644 index d11ea3e25d..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/BsdFindAdapter.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Adapter; - -use Symfony\Component\Finder\Shell\Shell; -use Symfony\Component\Finder\Shell\Command; -use Symfony\Component\Finder\Iterator\SortableIterator; -use Symfony\Component\Finder\Expression\Expression; - -/** - * Shell engine implementation using BSD find command. - * - * @author Jean-François Simon - */ -class BsdFindAdapter extends AbstractFindAdapter -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'bsd_find'; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return in_array($this->shell->getType(), array(Shell::TYPE_BSD, Shell::TYPE_DARWIN)) && parent::canBeUsed(); - } - - /** - * {@inheritdoc} - */ - protected function buildFormatSorting(Command $command, $sort) - { - switch ($sort) { - case SortableIterator::SORT_BY_NAME: - $command->ins('sort')->add('| sort'); - - return; - case SortableIterator::SORT_BY_TYPE: - $format = '%HT'; - break; - case SortableIterator::SORT_BY_ACCESSED_TIME: - $format = '%a'; - break; - case SortableIterator::SORT_BY_CHANGED_TIME: - $format = '%c'; - break; - case SortableIterator::SORT_BY_MODIFIED_TIME: - $format = '%m'; - break; - default: - throw new \InvalidArgumentException('Unknown sort options: '.$sort.'.'); - } - - $command - ->add('-print0 | xargs -0 stat -f') - ->arg($format.'%t%N') - ->add('| sort | cut -f 2'); - } - - /** - * {@inheritdoc} - */ - protected function buildFindCommand(Command $command, $dir) - { - parent::buildFindCommand($command, $dir)->addAtIndex('-E', 1); - - return $command; - } - - /** - * {@inheritdoc} - */ - protected function buildContentFiltering(Command $command, array $contains, $not = false) - { - foreach ($contains as $contain) { - $expr = Expression::create($contain); - - // todo: avoid forking process for each $pattern by using multiple -e options - $command - ->add('| grep -v \'^$\'') - ->add('| xargs grep -I') - ->add($expr->isCaseSensitive() ? null : '-i') - ->add($not ? '-L' : '-l') - ->add('-Ee')->arg($expr->renderPattern()); - } - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/GnuFindAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/GnuFindAdapter.php deleted file mode 100644 index a235742c01..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/GnuFindAdapter.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Adapter; - -use Symfony\Component\Finder\Shell\Shell; -use Symfony\Component\Finder\Shell\Command; -use Symfony\Component\Finder\Iterator\SortableIterator; -use Symfony\Component\Finder\Expression\Expression; - -/** - * Shell engine implementation using GNU find command. - * - * @author Jean-François Simon - */ -class GnuFindAdapter extends AbstractFindAdapter -{ - /** - * {@inheritdoc} - */ - public function getName() - { - return 'gnu_find'; - } - - /** - * {@inheritdoc} - */ - protected function buildFormatSorting(Command $command, $sort) - { - switch ($sort) { - case SortableIterator::SORT_BY_NAME: - $command->ins('sort')->add('| sort'); - - return; - case SortableIterator::SORT_BY_TYPE: - $format = '%y'; - break; - case SortableIterator::SORT_BY_ACCESSED_TIME: - $format = '%A@'; - break; - case SortableIterator::SORT_BY_CHANGED_TIME: - $format = '%C@'; - break; - case SortableIterator::SORT_BY_MODIFIED_TIME: - $format = '%T@'; - break; - default: - throw new \InvalidArgumentException('Unknown sort options: '.$sort.'.'); - } - - $command - ->get('find') - ->add('-printf') - ->arg($format.' %h/%f\\n') - ->add('| sort | cut') - ->arg('-d ') - ->arg('-f2-') - ; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return $this->shell->getType() === Shell::TYPE_UNIX && parent::canBeUsed(); - } - - /** - * {@inheritdoc} - */ - protected function buildFindCommand(Command $command, $dir) - { - return parent::buildFindCommand($command, $dir)->add('-regextype posix-extended'); - } - - /** - * {@inheritdoc} - */ - protected function buildContentFiltering(Command $command, array $contains, $not = false) - { - foreach ($contains as $contain) { - $expr = Expression::create($contain); - - // todo: avoid forking process for each $pattern by using multiple -e options - $command - ->add('| xargs -r grep -I') - ->add($expr->isCaseSensitive() ? null : '-i') - ->add($not ? '-L' : '-l') - ->add('-Ee')->arg($expr->renderPattern()); - } - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/PhpAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/PhpAdapter.php deleted file mode 100644 index dfc842f6b5..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/PhpAdapter.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Adapter; - -use Symfony\Component\Finder\Iterator; - -/** - * PHP finder engine implementation. - * - * @author Jean-François Simon - */ -class PhpAdapter extends AbstractAdapter -{ - /** - * {@inheritdoc} - */ - public function searchInDirectory($dir) - { - $flags = \RecursiveDirectoryIterator::SKIP_DOTS; - - if ($this->followLinks) { - $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; - } - - $iterator = new \RecursiveIteratorIterator( - new Iterator\RecursiveDirectoryIterator($dir, $flags), - \RecursiveIteratorIterator::SELF_FIRST - ); - - if ($this->minDepth > 0 || $this->maxDepth < INF) { - $iterator = new Iterator\DepthRangeFilterIterator($iterator, $this->minDepth, $this->maxDepth); - } - - if ($this->mode) { - $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); - } - - if ($this->exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); - } - - if ($this->names || $this->notNames) { - $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames); - } - - if ($this->contains || $this->notContains) { - $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); - } - - if ($this->sizes) { - $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes); - } - - if ($this->dates) { - $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates); - } - - if ($this->filters) { - $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); - } - - if ($this->sort) { - $iteratorAggregate = new Iterator\SortableIterator($iterator, $this->sort); - $iterator = $iteratorAggregate->getIterator(); - } - - if ($this->paths || $this->notPaths) { - $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $this->notPaths); - } - - return $iterator; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'php'; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return true; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md b/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md index 7b8efdd9e1..b47b26a1b3 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md +++ b/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md @@ -1,14 +1,6 @@ CHANGELOG ========= -2.2.0 ------ - - * added Finder::path() and Finder::notPath() methods - * added finder adapters to improve performance on specific platforms - * added support for wildcard characters (glob patterns) in the paths passed - to Finder::in() - 2.1.0 ----- diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Comparator/Comparator.php b/vendor/symfony/finder/Symfony/Component/Finder/Comparator/Comparator.php index 83c511a73b..5d19d5d905 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Comparator/Comparator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Comparator/Comparator.php @@ -55,8 +55,6 @@ class Comparator * Sets the comparison operator. * * @param string $operator A valid operator - * - * @throws \InvalidArgumentException */ public function setOperator($operator) { @@ -75,8 +73,6 @@ class Comparator * Tests against the target. * * @param mixed $test A test value - * - * @return Boolean */ public function test($test) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/AdapterFailureException.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/AdapterFailureException.php deleted file mode 100644 index 15fa22147d..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Exception/AdapterFailureException.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -use Symfony\Component\Finder\Adapter\AdapterInterface; - -/** - * Base exception for all adapter failures. - * - * @author Jean-François Simon - */ -class AdapterFailureException extends \RuntimeException implements ExceptionInterface -{ - /** - * @var \Symfony\Component\Finder\Adapter\AdapterInterface - */ - private $adapter; - - /** - * @param AdapterInterface $adapter - * @param string|null $message - * @param \Exception|null $previous - */ - public function __construct(AdapterInterface $adapter, $message = null, \Exception $previous = null) - { - $this->adapter = $adapter; - parent::__construct($message ?: 'Search failed with "'.$adapter->getName().'" adapter.', $previous); - } - - /** - * {@inheritdoc} - */ - public function getAdapter() - { - return $this->adapter; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/ExceptionInterface.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/ExceptionInterface.php deleted file mode 100644 index b0337c1aaa..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Exception/ExceptionInterface.php +++ /dev/null @@ -1,14 +0,0 @@ - - */ -interface ExceptionInterface -{ - /** - * @return \Symfony\Component\Finder\Adapter\AdapterInterface - */ - public function getAdapter(); -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/OperationNotPermitedException.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/OperationNotPermitedException.php deleted file mode 100644 index 3663112259..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Exception/OperationNotPermitedException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -/** - * @author Jean-François Simon - */ -class OperationNotPermitedException extends AdapterFailureException -{ -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/ShellCommandFailureException.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/ShellCommandFailureException.php deleted file mode 100644 index 2658f6a508..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Exception/ShellCommandFailureException.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -use Symfony\Component\Finder\Adapter\AdapterInterface; -use Symfony\Component\Finder\Shell\Command; - -/** - * @author Jean-François Simon - */ -class ShellCommandFailureException extends AdapterFailureException -{ - /** - * @var Command - */ - private $command; - - /** - * @param AdapterInterface $adapter - * @param Command $command - * @param \Exception|null $previous - */ - public function __construct(AdapterInterface $adapter, Command $command, \Exception $previous = null) - { - $this->command = $command; - parent::__construct($adapter, 'Shell command failed: "'.$command->join().'".', $previous); - } - - /** - * @return Command - */ - public function getCommand() - { - return $this->command; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php deleted file mode 100644 index ceedbc18a9..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Expression; - -/** - * @author Jean-François Simon - */ -class Expression implements ValueInterface -{ - const TYPE_REGEX = 1; - const TYPE_GLOB = 2; - - /** - * @var ValueInterface - */ - private $value; - - /** - * @param string $expr - * - * @return Expression - */ - public static function create($expr) - { - return new self($expr); - } - - /** - * @param string $expr - */ - public function __construct($expr) - { - try { - $this->value = Regex::create($expr); - } catch (\InvalidArgumentException $e) { - $this->value = new Glob($expr); - } - } - - /** - * @return string - */ - public function __toString() - { - return $this->render(); - } - - /** - * {@inheritdoc} - */ - public function render() - { - return $this->value->render(); - } - - /** - * {@inheritdoc} - */ - public function renderPattern() - { - return $this->value->renderPattern(); - } - - /** - * @return bool - */ - public function isCaseSensitive() - { - return $this->value->isCaseSensitive(); - } - - /** - * @return int - */ - public function getType() - { - return $this->value->getType(); - } - - /** - * {@inheritdoc} - */ - public function prepend($expr) - { - $this->value->prepend($expr); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function append($expr) - { - $this->value->append($expr); - - return $this; - } - - /** - * @return bool - */ - public function isRegex() - { - return self::TYPE_REGEX === $this->value->getType(); - } - - /** - * @return bool - */ - public function isGlob() - { - return self::TYPE_GLOB === $this->value->getType(); - } - - /** - * @throws \LogicException - * - * @return Glob - */ - public function getGlob() - { - if (self::TYPE_GLOB !== $this->value->getType()) { - throw new \LogicException('Regex cant be transformed to glob.'); - } - - return $this->value; - } - - /** - * @return Regex - */ - public function getRegex() - { - return self::TYPE_REGEX === $this->value->getType() ? $this->value : $this->value->toRegex(); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Glob.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/Glob.php deleted file mode 100644 index 3023ceea69..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Glob.php +++ /dev/null @@ -1,157 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Expression; - -/** - * @author Jean-François Simon - */ -class Glob implements ValueInterface -{ - /** - * @var string - */ - private $pattern; - - /** - * @param string $pattern - */ - public function __construct($pattern) - { - $this->pattern = $pattern; - } - - /** - * {@inheritdoc} - */ - public function render() - { - return $this->pattern; - } - - /** - * {@inheritdoc} - */ - public function renderPattern() - { - return $this->pattern; - } - - /** - * {@inheritdoc} - */ - public function getType() - { - return Expression::TYPE_GLOB; - } - - /** - * {@inheritdoc} - */ - public function isCaseSensitive() - { - return true; - } - - /** - * {@inheritdoc} - */ - public function prepend($expr) - { - $this->pattern = $expr.$this->pattern; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function append($expr) - { - $this->pattern .= $expr; - - return $this; - } - - /** - * Tests if glob is expandable ("*.{a,b}" syntax). - * - * @return bool - */ - public function isExpandable() - { - return false !== strpos($this->pattern, '{') - && false !== strpos($this->pattern, '}'); - } - - /** - * @param bool $strictLeadingDot - * @param bool $strictWildcardSlash - * - * @return Regex - */ - public function toRegex($strictLeadingDot = true, $strictWildcardSlash = true) - { - $firstByte = true; - $escaping = false; - $inCurlies = 0; - $regex = ''; - $sizeGlob = strlen($this->pattern); - for ($i = 0; $i < $sizeGlob; $i++) { - $car = $this->pattern[$i]; - if ($firstByte) { - if ($strictLeadingDot && '.' !== $car) { - $regex .= '(?=[^\.])'; - } - - $firstByte = false; - } - - if ('/' === $car) { - $firstByte = true; - } - - if ('.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) { - $regex .= "\\$car"; - } elseif ('*' === $car) { - $regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*'); - } elseif ('?' === $car) { - $regex .= $escaping ? '\\?' : ($strictWildcardSlash ? '[^/]' : '.'); - } elseif ('{' === $car) { - $regex .= $escaping ? '\\{' : '('; - if (!$escaping) { - ++$inCurlies; - } - } elseif ('}' === $car && $inCurlies) { - $regex .= $escaping ? '}' : ')'; - if (!$escaping) { - --$inCurlies; - } - } elseif (',' === $car && $inCurlies) { - $regex .= $escaping ? ',' : '|'; - } elseif ('\\' === $car) { - if ($escaping) { - $regex .= '\\\\'; - $escaping = false; - } else { - $escaping = true; - } - - continue; - } else { - $regex .= $car; - } - $escaping = false; - } - - return new Regex('^'.$regex.'$'); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php deleted file mode 100644 index 05544d0c81..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php +++ /dev/null @@ -1,317 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Expression; - -/** - * @author Jean-François Simon - */ -class Regex implements ValueInterface -{ - const START_FLAG = '^'; - const END_FLAG = '$'; - const BOUNDARY = '~'; - const JOKER = '.*'; - const ESCAPING = '\\'; - - /** - * @var string - */ - private $pattern; - - /** - * @var array - */ - private $options; - - /** - * @var bool - */ - private $startFlag; - - /** - * @var bool - */ - private $endFlag; - - /** - * @var bool - */ - private $startJoker; - - /** - * @var bool - */ - private $endJoker; - - /** - * @param string $expr - * - * @return Regex - * - * @throws \InvalidArgumentException - */ - public static function create($expr) - { - if (preg_match('/^(.{3,}?)([imsxuADU]*)$/', $expr, $m)) { - $start = substr($m[1], 0, 1); - $end = substr($m[1], -1); - - if (($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start)) || ($start === '{' && $end === '}')) { - return new self(substr($m[1], 1, -1), $m[2], $end); - } - } - - throw new \InvalidArgumentException('Given expression is not a regex.'); - } - - /** - * @param string $pattern - * @param string $options - * @param string $delimiter - */ - public function __construct($pattern, $options = '', $delimiter = null) - { - if (null !== $delimiter) { - // removes delimiter escaping - $pattern = str_replace('\\'.$delimiter, $delimiter, $pattern); - } - - $this->parsePattern($pattern); - $this->options = $options; - } - - /** - * @return string - */ - public function __toString() - { - return $this->render(); - } - - /** - * {@inheritdoc} - */ - public function render() - { - return self::BOUNDARY - .$this->renderPattern() - .self::BOUNDARY - .$this->options; - } - - /** - * {@inheritdoc} - */ - public function renderPattern() - { - return ($this->startFlag ? self::START_FLAG : '') - .($this->startJoker ? self::JOKER : '') - .str_replace(self::BOUNDARY, '\\'.self::BOUNDARY, $this->pattern) - .($this->endJoker ? self::JOKER : '') - .($this->endFlag ? self::END_FLAG : ''); - } - - /** - * {@inheritdoc} - */ - public function isCaseSensitive() - { - return !$this->hasOption('i'); - } - - /** - * {@inheritdoc} - */ - public function getType() - { - return Expression::TYPE_REGEX; - } - - /** - * {@inheritdoc} - */ - public function prepend($expr) - { - $this->pattern = $expr.$this->pattern; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function append($expr) - { - $this->pattern .= $expr; - - return $this; - } - - /** - * @param string $option - * - * @return bool - */ - public function hasOption($option) - { - return false !== strpos($this->options, $option); - } - - /** - * @param string $option - * - * @return Regex - */ - public function addOption($option) - { - if (!$this->hasOption($option)) { - $this->options.= $option; - } - - return $this; - } - - /** - * @param string $option - * - * @return Regex - */ - public function removeOption($option) - { - $this->options = str_replace($option, '', $this->options); - - return $this; - } - - /** - * @param bool $startFlag - * - * @return Regex - */ - public function setStartFlag($startFlag) - { - $this->startFlag = $startFlag; - - return $this; - } - - /** - * @return bool - */ - public function hasStartFlag() - { - return $this->startFlag; - } - - /** - * @param bool $endFlag - * - * @return Regex - */ - public function setEndFlag($endFlag) - { - $this->endFlag = (bool) $endFlag; - - return $this; - } - - /** - * @return bool - */ - public function hasEndFlag() - { - return $this->endFlag; - } - - /** - * @param bool $startJoker - * - * @return Regex - */ - public function setStartJoker($startJoker) - { - $this->startJoker = $startJoker; - - return $this; - } - - /** - * @return bool - */ - public function hasStartJoker() - { - return $this->startJoker; - } - - /** - * @param bool $endJoker - * - * @return Regex - */ - public function setEndJoker($endJoker) - { - $this->endJoker = (bool) $endJoker; - - return $this; - } - - /** - * @return bool - */ - public function hasEndJoker() - { - return $this->endJoker; - } - - /** - * @param array $replacement - * - * @return Regex - */ - public function replaceJokers($replacement) - { - $replace = function ($subject) use ($replacement) { - $subject = $subject[0]; - $replace = 0 === substr_count($subject, '\\') % 2; - - return $replace ? str_replace('.', $replacement, $subject) : $subject; - }; - - $this->pattern = preg_replace_callback('~[\\\\]*\\.~', $replace, $this->pattern); - - return $this; - } - - /** - * @param string $pattern - */ - private function parsePattern($pattern) - { - if ($this->startFlag = self::START_FLAG === substr($pattern, 0, 1)) { - $pattern = substr($pattern, 1); - } - - if ($this->startJoker = self::JOKER === substr($pattern, 0, 2)) { - $pattern = substr($pattern, 2); - } - - if ($this->endFlag = (self::END_FLAG === substr($pattern, -1) && self::ESCAPING !== substr($pattern, -2, -1))) { - $pattern = substr($pattern, 0, -1); - } - - if ($this->endJoker = (self::JOKER === substr($pattern, -2) && self::ESCAPING !== substr($pattern, -3, -2))) { - $pattern = substr($pattern, 0, -2); - } - - $this->pattern = $pattern; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php deleted file mode 100644 index 34ce0e7ce4..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Expression; - -/** - * @author Jean-François Simon - */ -interface ValueInterface -{ - /** - * Renders string representation of expression. - * - * @return string - */ - public function render(); - - /** - * Renders string representation of pattern. - * - * @return string - */ - public function renderPattern(); - - /** - * Returns value case sensitivity. - * - * @return bool - */ - public function isCaseSensitive(); - - /** - * Returns expression type. - * - * @return int - */ - public function getType(); - - /** - * @param string $expr - * - * @return ValueInterface - */ - public function prepend($expr); - - /** - * @param string $expr - * - * @return ValueInterface - */ - public function append($expr); -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Finder.php b/vendor/symfony/finder/Symfony/Component/Finder/Finder.php index f3ba20cf04..dbb0f6fcfd 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Finder.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Finder.php @@ -11,12 +11,6 @@ namespace Symfony\Component\Finder; -use Symfony\Component\Finder\Adapter\AdapterInterface; -use Symfony\Component\Finder\Adapter\GnuFindAdapter; -use Symfony\Component\Finder\Adapter\BsdFindAdapter; -use Symfony\Component\Finder\Adapter\PhpAdapter; -use Symfony\Component\Finder\Exception\ExceptionInterface; - /** * Finder allows to build rules to find files and directories. * @@ -52,9 +46,6 @@ class Finder implements \IteratorAggregate, \Countable private $iterators = array(); private $contains = array(); private $notContains = array(); - private $adapters = array(); - private $paths = array(); - private $notPaths = array(); private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); @@ -64,13 +55,6 @@ class Finder implements \IteratorAggregate, \Countable public function __construct() { $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES; - - $this - ->addAdapter(new GnuFindAdapter()) - ->addAdapter(new BsdFindAdapter()) - ->addAdapter(new PhpAdapter(), -50) - ->setAdapter('php') - ; } /** @@ -85,82 +69,6 @@ class Finder implements \IteratorAggregate, \Countable return new static(); } - /** - * Registers a finder engine implementation. - * - * @param AdapterInterface $adapter An adapter instance - * @param integer $priority Highest is selected first - * - * @return Finder The current Finder instance - */ - public function addAdapter(Adapter\AdapterInterface $adapter, $priority = 0) - { - $this->adapters[$adapter->getName()] = array( - 'adapter' => $adapter, - 'priority' => $priority, - 'selected' => false, - ); - - return $this->sortAdapters(); - } - - /** - * Sets the selected adapter to the best one according to the current platform the code is run on. - * - * @return Finder The current Finder instance - */ - public function useBestAdapter() - { - $this->resetAdapterSelection(); - - return $this->sortAdapters(); - } - - /** - * Selects the adapter to use. - * - * @param string $name - * - * @throws \InvalidArgumentException - * - * @return Finder The current Finder instance - */ - public function setAdapter($name) - { - if (!isset($this->adapters[$name])) { - throw new \InvalidArgumentException(sprintf('Adapter "%s" does not exist.', $name)); - } - - $this->resetAdapterSelection(); - $this->adapters[$name]['selected'] = true; - - return $this->sortAdapters(); - } - - /** - * Removes all adapters registered in the finder. - * - * @return Finder The current Finder instance - */ - public function removeAdapters() - { - $this->adapters = array(); - - return $this; - } - - /** - * Returns registered adapters ordered by priority without extra information. - * - * @return AdapterInterface[] - */ - public function getAdapters() - { - return array_values(array_map(function(array $adapter) { - return $adapter['adapter']; - }, $this->adapters)); - } - /** * Restricts the matching to directories only. * @@ -324,52 +232,6 @@ class Finder implements \IteratorAggregate, \Countable return $this; } - /** - * Adds rules that filenames must match. - * - * You can use patterns (delimited with / sign) or simple strings. - * - * $finder->path('some/special/dir') - * $finder->path('/some\/special\/dir/') // same as above - * - * Use only / as dirname separator. - * - * @param string $pattern A pattern (a regexp or a string) - * - * @return Finder The current Finder instance - * - * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator - */ - public function path($pattern) - { - $this->paths[] = $pattern; - - return $this; - } - - /** - * Adds rules that filenames must not match. - * - * You can use patterns (delimited with / sign) or simple strings. - * - * $finder->notPath('some/special/dir') - * $finder->notPath('/some\/special\/dir/') // same as above - * - * Use only / as dirname separator. - * - * @param string $pattern A pattern (a regexp or a string) - * - * @return Finder The current Finder instance - * - * @see Symfony\Component\Finder\Iterator\FilenameFilterIterator - */ - public function notPath($pattern) - { - $this->notPaths[] = $pattern; - - return $this; - } - /** * Adds tests for file sizes. * @@ -455,20 +317,9 @@ class Finder implements \IteratorAggregate, \Countable return $this; } - /** - * Adds VCS patterns. - * - * @see ignoreVCS - * - * @param string|string[] $pattern VCS patterns to ignore - */ public static function addVCSPattern($pattern) { - foreach ((array) $pattern as $p) { - self::$vcsPatterns[] = $p; - } - - self::$vcsPatterns = array_unique(self::$vcsPatterns); + self::$vcsPatterns[] = $pattern; } /** @@ -633,25 +484,21 @@ class Finder implements \IteratorAggregate, \Countable * * @return Finder The current Finder instance * - * @throws \InvalidArgumentException if one of the directories does not exist + * @throws \InvalidArgumentException if one of the directory does not exist * * @api */ public function in($dirs) { - $resolvedDirs = array(); - - foreach ((array) $dirs as $dir) { - if (is_dir($dir)) { - $resolvedDirs[] = $dir; - } elseif ($glob = glob($dir, GLOB_ONLYDIR)) { - $resolvedDirs = array_merge($resolvedDirs, $glob); - } else { + $dirs = (array) $dirs; + + foreach ($dirs as $dir) { + if (!is_dir($dir)) { throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); } } - $this->dirs = array_merge($this->dirs, $resolvedDirs); + $this->dirs = array_merge($this->dirs, $dirs); return $this; } @@ -667,8 +514,8 @@ class Finder implements \IteratorAggregate, \Countable */ public function getIterator() { - if (0 === count($this->dirs) && 0 === count($this->iterators)) { - throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.'); + if (0 === count($this->dirs)) { + throw new \LogicException('You must call the in() method before iterating over a Finder.'); } if (1 === count($this->dirs) && 0 === count($this->iterators)) { @@ -693,10 +540,6 @@ class Finder implements \IteratorAggregate, \Countable * The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array. * * @param mixed $iterator - * - * @return Finder The finder - * - * @throws \InvalidArgumentException When the given argument is not iterable. */ public function append($iterator) { @@ -713,8 +556,6 @@ class Finder implements \IteratorAggregate, \Countable } else { throw new \InvalidArgumentException('Finder::append() method wrong argument type.'); } - - return $this; } /** @@ -727,85 +568,64 @@ class Finder implements \IteratorAggregate, \Countable return iterator_count($this->getIterator()); } - /** - * @return Finder The current Finder instance - */ - private function sortAdapters() + private function searchInDirectory($dir) { - uasort($this->adapters, function (array $a, array $b) { - if ($a['selected'] || $b['selected']) { - return $a['selected'] ? -1 : 1; - } + $flags = \RecursiveDirectoryIterator::SKIP_DOTS; - return $a['priority'] > $b['priority'] ? -1 : 1; - }); + if ($this->followLinks) { + $flags |= \RecursiveDirectoryIterator::FOLLOW_SYMLINKS; + } - return $this; - } + $iterator = new \RecursiveIteratorIterator( + new Iterator\RecursiveDirectoryIterator($dir, $flags), + \RecursiveIteratorIterator::SELF_FIRST + ); + + if ($this->depths) { + $iterator = new Iterator\DepthRangeFilterIterator($iterator, $this->depths); + } + + if ($this->mode) { + $iterator = new Iterator\FileTypeFilterIterator($iterator, $this->mode); + } - /** - * @param $dir - * - * @return \Iterator - * - * @throws \RuntimeException When none of the adapters are supported - */ - private function searchInDirectory($dir) - { if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { $this->exclude = array_merge($this->exclude, self::$vcsPatterns); } if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { - $this->notPaths[] = '#(^|/)\..+(/|$)#'; + $this->notNames[] = '/^\..+/'; } - foreach ($this->adapters as $adapter) { - if ($adapter['adapter']->isSupported()) { - try { - return $this - ->buildAdapter($adapter['adapter']) - ->searchInDirectory($dir); - } catch (ExceptionInterface $e) {} - } + if ($this->exclude) { + $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); } - throw new \RuntimeException('No supported adapter found.'); - } + if ($this->names || $this->notNames) { + $iterator = new Iterator\FilenameFilterIterator($iterator, $this->names, $this->notNames); + } - /** - * @param AdapterInterface $adapter - * - * @return AdapterInterface - */ - private function buildAdapter(AdapterInterface $adapter) - { - return $adapter - ->setFollowLinks($this->followLinks) - ->setDepths($this->depths) - ->setMode($this->mode) - ->setExclude($this->exclude) - ->setNames($this->names) - ->setNotNames($this->notNames) - ->setContains($this->contains) - ->setNotContains($this->notContains) - ->setSizes($this->sizes) - ->setDates($this->dates) - ->setFilters($this->filters) - ->setSort($this->sort) - ->setPath($this->paths) - ->setNotPath($this->notPaths); - } + if ($this->contains || $this->notContains) { + $iterator = new Iterator\FilecontentFilterIterator($iterator, $this->contains, $this->notContains); + } - /** - * Unselects all adapters. - */ - private function resetAdapterSelection() - { - $this->adapters = array_map(function (array $properties) { - $properties['selected'] = false; + if ($this->sizes) { + $iterator = new Iterator\SizeRangeFilterIterator($iterator, $this->sizes); + } - return $properties; - }, $this->adapters); + if ($this->dates) { + $iterator = new Iterator\DateRangeFilterIterator($iterator, $this->dates); + } + + if ($this->filters) { + $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); + } + + if ($this->sort) { + $iteratorAggregate = new Iterator\SortableIterator($iterator, $this->sort); + $iterator = $iteratorAggregate->getIterator(); + } + + return $iterator; } } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/CustomFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/CustomFilterIterator.php index 58976c07c7..8ff5739693 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/CustomFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/CustomFilterIterator.php @@ -28,8 +28,6 @@ class CustomFilterIterator extends FilterIterator * * @param \Iterator $iterator The Iterator to filter * @param array $filters An array of PHP callbacks - * - * @throws \InvalidArgumentException */ public function __construct(\Iterator $iterator, array $filters) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php index 3e5713b8e6..1664793331 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\Comparator\DateComparator; - /** * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates). * @@ -25,8 +23,8 @@ class DateRangeFilterIterator extends FilterIterator /** * Constructor. * - * @param \Iterator $iterator The Iterator to filter - * @param DateComparator[] $comparators An array of DateComparator instances + * @param \Iterator $iterator The Iterator to filter + * @param array $comparators An array of \DateCompare instances */ public function __construct(\Iterator $iterator, array $comparators) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php index 77a9f45f2d..b3c637a27f 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php @@ -24,13 +24,33 @@ class DepthRangeFilterIterator extends FilterIterator * Constructor. * * @param \RecursiveIteratorIterator $iterator The Iterator to filter - * @param int $minDepth The min depth - * @param int $maxDepth The max depth + * @param array $comparators An array of \NumberComparator instances */ - public function __construct(\RecursiveIteratorIterator $iterator, $minDepth = 0, $maxDepth = INF) + public function __construct(\RecursiveIteratorIterator $iterator, array $comparators) { + $minDepth = 0; + $maxDepth = PHP_INT_MAX; + foreach ($comparators as $comparator) { + switch ($comparator->getOperator()) { + case '>': + $minDepth = $comparator->getTarget() + 1; + break; + case '>=': + $minDepth = $comparator->getTarget(); + break; + case '<': + $maxDepth = $comparator->getTarget() - 1; + break; + case '<=': + $maxDepth = $comparator->getTarget(); + break; + default: + $minDepth = $maxDepth = $comparator->getTarget(); + } + } + $this->minDepth = $minDepth; - $iterator->setMaxDepth(INF === $maxDepth ? -1 : $maxDepth); + $iterator->setMaxDepth(PHP_INT_MAX === $maxDepth ? -1 : $maxDepth); parent::__construct($iterator); } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilePathsIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilePathsIterator.php deleted file mode 100644 index 48634f27da..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilePathsIterator.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -use Symfony\Component\Finder\SplFileInfo; - -/** - * Iterate over shell command result. - * - * @author Jean-François Simon - */ -class FilePathsIterator extends \ArrayIterator -{ - /** - * @var string - */ - private $baseDir; - - /** - * @var int - */ - private $baseDirLength; - - /** - * @var string - */ - private $subPath; - - /** - * @var string - */ - private $subPathname; - - /** - * @var SplFileInfo - */ - private $current; - - /** - * @param array $paths List of paths returned by shell command - * @param string $baseDir Base dir for relative path building - */ - public function __construct(array $paths, $baseDir) - { - $this->baseDir = $baseDir; - $this->baseDirLength = strlen($baseDir); - - parent::__construct($paths); - } - - /** - * @param string $name - * @param array $arguments - * - * @return mixed - */ - public function __call($name, array $arguments) - { - return call_user_func_array(array($this->current(), $name), $arguments); - } - - /** - * Return an instance of SplFileInfo with support for relative paths. - * - * @return SplFileInfo File information - */ - public function current() - { - return $this->current; - } - - /** - * @return string - */ - public function key() - { - return $this->current->getPathname(); - } - - public function next() - { - parent::next(); - $this->buildProperties(); - } - - public function rewind() - { - parent::rewind(); - $this->buildProperties(); - } - - /** - * @return string - */ - public function getSubPath() - { - return $this->subPath; - } - - /** - * @return string - */ - public function getSubPathname() - { - return $this->subPathname; - } - - private function buildProperties() - { - $absolutePath = parent::current(); - - if ($this->baseDir === substr($absolutePath, 0, $this->baseDirLength)) { - $this->subPathname = ltrim(substr($absolutePath, $this->baseDirLength), '/\\'); - $dir = dirname($this->subPathname); - $this->subPath = '.' === $dir ? '' : $dir; - } else { - $this->subPath = $this->subPathname = ''; - } - - $this->current = new SplFileInfo(parent::current(), $this->subPath, $this->subPathname); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php index 3c0f3aa70e..109b5f0029 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\Expression\Expression; +use Symfony\Component\Finder\Glob; /** * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string). @@ -63,6 +63,6 @@ class FilenameFilterIterator extends MultiplePcreFilterIterator */ protected function toRegex($str) { - return Expression::create($str)->getRegex()->render(); + return $this->isRegex($str) ? $str : Glob::toRegex($str); } } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php index 3a9dd55582..12584b186e 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\Expression\Expression; - /** * MultiplePcreFilterIterator filters files using patterns (regexps, globs or strings). * @@ -54,7 +52,20 @@ abstract class MultiplePcreFilterIterator extends FilterIterator */ protected function isRegex($str) { - return Expression::create($str)->isRegex(); + if (preg_match('/^(.{3,}?)[imsxuADU]*$/', $str, $m)) { + $start = substr($m[1], 0, 1); + $end = substr($m[1], -1); + + if ($start === $end) { + return !preg_match('/[*?[:alnum:] \\\\]/', $start); + } + + if ($start === '{' && $end === '}') { + return true; + } + } + + return false; } /** diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php deleted file mode 100644 index c736f0b310..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * PathFilterIterator filters files by path patterns (e.g. some/special/dir). - * - * @author Fabien Potencier - * @author Włodzimierz Gajda - */ -class PathFilterIterator extends MultiplePcreFilterIterator -{ - - /** - * Filters the iterator values. - * - * @return Boolean true if the value should be kept, false otherwise - */ - public function accept() - { - $filename = $this->current()->getRelativePathname(); - - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { - $filename = strtr($filename, '\\', '/'); - } - - // should at least not match one rule to exclude - foreach ($this->noMatchRegexps as $regex) { - if (preg_match($regex, $filename)) { - return false; - } - } - - // should at least match one rule - $match = true; - if ($this->matchRegexps) { - $match = false; - foreach ($this->matchRegexps as $regex) { - if (preg_match($regex, $filename)) { - return true; - } - } - } - - return $match; - } - - /** - * Converts strings to regexp. - * - * PCRE patterns are left unchanged. - * - * Default conversion: - * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' - * - * Use only / as directory separator (on Windows also). - * - * @param string $str Pattern: regexp or dirname. - * - * @return string regexp corresponding to a given string or regexp - */ - protected function toRegex($str) - { - return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php index 77f9cc4434..89a4fc434c 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Finder\Iterator; -use Symfony\Component\Finder\Comparator\NumberComparator; - /** * SizeRangeFilterIterator filters out files that are not in the given size range. * @@ -25,8 +23,8 @@ class SizeRangeFilterIterator extends FilterIterator /** * Constructor. * - * @param \Iterator $iterator The Iterator to filter - * @param NumberComparator[] $comparators An array of NumberComparator instances + * @param \Iterator $iterator The Iterator to filter + * @param array $comparators An array of \NumberComparator instances */ public function __construct(\Iterator $iterator, array $comparators) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SortableIterator.php index cdc734f474..f92088aaa4 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SortableIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SortableIterator.php @@ -32,8 +32,6 @@ class SortableIterator implements \IteratorAggregate * * @param \Traversable $iterator The Iterator to filter * @param integer|callback $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) - * - * @throws \InvalidArgumentException */ public function __construct(\Traversable $iterator, $sort) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/README.md b/vendor/symfony/finder/Symfony/Component/Finder/README.md index a4caf93baa..0c4516f7d6 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/README.md +++ b/vendor/symfony/finder/Symfony/Component/Finder/README.md @@ -35,7 +35,4 @@ Resources You can run the unit tests with the following command: - $ cd path/to/Symfony/Component/Finder/ - $ composer.phar install --dev - $ phpunit - + phpunit diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Shell/Command.php b/vendor/symfony/finder/Symfony/Component/Finder/Shell/Command.php deleted file mode 100644 index 1a060c8cae..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Shell/Command.php +++ /dev/null @@ -1,264 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Shell; - -/** - * @author Jean-François Simon - */ -class Command -{ - /** - * @var Command|null - */ - private $parent; - - /** - * @var array - */ - private $bits; - - /** - * @var array - */ - private $labels; - - /** - * Constructor. - * - * @param Command $parent Parent command - */ - public function __construct(Command $parent = null) - { - $this->parent = $parent; - $this->bits = array(); - $this->labels = array(); - } - - /** - * Returns command as string. - * - * @return string - */ - public function __toString() - { - return $this->join(); - } - - /** - * Creates a new Command instance. - * - * @param Command $parent Parent command - * - * @return Command New Command instance - */ - public static function create(Command $parent = null) - { - return new self($parent); - } - - /** - * Escapes special chars from input. - * - * @param string $input A string to escape - * - * @return string The escaped string - */ - public static function escape($input) - { - return escapeshellcmd($input); - } - - /** - * Quotes input. - * - * @param string $input An argument string - * - * @return string The quoted string - */ - public static function quote($input) - { - return escapeshellarg($input); - } - - /** - * Appends a string or a Command instance. - * - * @param string|Command $bit - * - * @return Command The current Command instance - */ - public function add($bit) - { - $this->bits[] = $bit; - - return $this; - } - - /** - * Prepends a string or a command instance. - * - * @param string|Command $bit - * - * @return Command The current Command instance - */ - public function top($bit) - { - array_unshift($this->bits, $bit); - - foreach ($this->labels as $label => $index) { - $this->labels[$label] += 1; - } - - return $this; - } - - /** - * Appends an argument, will be quoted. - * - * @param string $arg - * - * @return Command The current Command instance - */ - public function arg($arg) - { - $this->bits[] = self::quote($arg); - - return $this; - } - - /** - * Appends escaped special command chars. - * - * @param string $esc - * - * @return Command The current Command instance - */ - public function cmd($esc) - { - $this->bits[] = self::escape($esc); - - return $this; - } - - /** - * Inserts a labeled command to feed later. - * - * @param string $label The unique label - * - * @return Command The current Command instance - * - * @throws \RuntimeException If label already exists - */ - public function ins($label) - { - if (isset($this->labels[$label])) { - throw new \RuntimeException('Label "'.$label.'" already exists.'); - } - - $this->bits[] = self::create($this); - $this->labels[$label] = count($this->bits)-1; - - return $this->bits[$this->labels[$label]]; - } - - /** - * Retrieves a previously labeled command. - * - * @param string $label - * - * @return Command The labeled command - * - * @throws \RuntimeException - */ - public function get($label) - { - if (!isset($this->labels[$label])) { - throw new \RuntimeException('Label "'.$label.'" does not exists.'); - } - - return $this->bits[$this->labels[$label]]; - } - - /** - * Returns parent command (if any). - * - * @return Command Parent command - * - * @throws \RuntimeException If command has no parent - */ - public function end() - { - if (null === $this->parent) { - throw new \RuntimeException('Calling end on root command doesn\'t make sense.'); - } - - return $this->parent; - } - - /** - * Counts bits stored in command. - * - * @return int The bits count - */ - public function length() - { - return count($this->bits); - } - - /** - * Executes current command. - * - * @return array The command result - * - * @throws \RuntimeException - */ - public function execute() - { - exec($this->join(), $output, $code); - - if (0 !== $code) { - throw new \RuntimeException('Execution failed with return code: '.$code.'.'); - } - - return $output ?: array(); - } - - /** - * Joins bits. - * - * @return string - */ - public function join() - { - return implode(' ', array_filter( - array_map(function($bit) { - return $bit instanceof Command ? $bit->join() : ($bit ?: null); - }, $this->bits), - function($bit) { return null !== $bit; } - )); - } - - /** - * Insert a string or a Command instance before the bit at given position $index (index starts from 0). - * - * @param string|Command $bit - * @param integer $index - * - * @return Command The current Command instance - */ - public function addAtIndex($bit, $index) - { - array_splice($this->bits, $index, 0, $bit); - - return $this; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php b/vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php deleted file mode 100644 index 0b01636c38..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Shell; - -/** - * @author Jean-François Simon - */ -class Shell -{ - const TYPE_UNIX = 1; - const TYPE_DARWIN = 2; - const TYPE_CYGWIN = 3; - const TYPE_WINDOWS = 4; - const TYPE_BSD = 5; - - /** - * @var string|null - */ - private $type; - - /** - * Returns guessed OS type. - * - * @return int - */ - public function getType() - { - if (null === $this->type) { - $this->type = $this->guessType(); - } - - return $this->type; - } - - /** - * Tests if a command is available. - * - * @param string $command - * - * @return bool - */ - public function testCommand($command) - { - if (self::TYPE_WINDOWS === $this->type) { - // todo: find a way to test if windows command exists - return false; - } - - if (!function_exists('exec')) { - return false; - } - - // todo: find a better way (command could not be available) - exec('command -v '.$command, $output, $code); - - return 0 === $code && count($output) > 0; - } - - /** - * Guesses OS type. - * - * @return int - */ - private function guessType() - { - $os = strtolower(PHP_OS); - - if (false !== strpos($os, 'cygwin')) { - return self::TYPE_CYGWIN; - } - - if (false !== strpos($os, 'darwin')) { - return self::TYPE_DARWIN; - } - - if (false !== strpos($os, 'bsd')) { - return self::TYPE_BSD; - } - - if (0 === strpos($os, 'win')) { - return self::TYPE_WINDOWS; - } - - return self::TYPE_UNIX; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/SplFileInfo.php b/vendor/symfony/finder/Symfony/Component/Finder/SplFileInfo.php index e7e58f757c..e9d4f7b72f 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/SplFileInfo.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/SplFileInfo.php @@ -59,8 +59,6 @@ class SplFileInfo extends \SplFileInfo * Returns the contents of the file * * @return string the contents of the file - * - * @throws \RuntimeException */ public function getContents() { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php deleted file mode 100644 index c907d6a8d4..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests; - -use Symfony\Component\Finder\Expression\Expression; - -class ExpressionTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getTypeGuesserData - */ - public function testTypeGuesser($expr, $type) - { - $this->assertEquals($type, Expression::create($expr)->getType()); - } - - /** - * @dataProvider getCaseSensitiveData - */ - public function testCaseSensitive($expr, $isCaseSensitive) - { - $this->assertEquals($isCaseSensitive, Expression::create($expr)->isCaseSensitive()); - } - - /** - * @dataProvider getRegexRenderingData - */ - public function testRegexRendering($expr, $body) - { - $this->assertEquals($body, Expression::create($expr)->renderPattern()); - } - - public function getTypeGuesserData() - { - return array( - array('{foo}', Expression::TYPE_REGEX), - array('/foo/', Expression::TYPE_REGEX), - array('foo', Expression::TYPE_GLOB), - array('foo*', Expression::TYPE_GLOB), - ); - } - - public function getCaseSensitiveData() - { - return array( - array('{foo}m', true), - array('/foo/i', false), - array('foo*', true), - ); - } - - public function getRegexRenderingData() - { - return array( - array('{foo}m', 'foo'), - array('/foo/i', 'foo'), - ); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/RegexTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/RegexTest.php deleted file mode 100644 index f252696a76..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/RegexTest.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests; - -use Symfony\Component\Finder\Expression\Expression; - -class RegexTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getHasFlagsData - */ - public function testHasFlags($regex, $start, $end) - { - $expr = new Expression($regex); - - $this->assertEquals($start, $expr->getRegex()->hasStartFlag()); - $this->assertEquals($end, $expr->getRegex()->hasEndFlag()); - } - - /** - * @dataProvider getHasJokersData - */ - public function testHasJokers($regex, $start, $end) - { - $expr = new Expression($regex); - - $this->assertEquals($start, $expr->getRegex()->hasStartJoker()); - $this->assertEquals($end, $expr->getRegex()->hasEndJoker()); - } - - /** - * @dataProvider getSetFlagsData - */ - public function testSetFlags($regex, $start, $end, $expected) - { - $expr = new Expression($regex); - $expr->getRegex()->setStartFlag($start)->setEndFlag($end); - - $this->assertEquals($expected, $expr->render()); - } - - /** - * @dataProvider getSetJokersData - */ - public function testSetJokers($regex, $start, $end, $expected) - { - $expr = new Expression($regex); - $expr->getRegex()->setStartJoker($start)->setEndJoker($end); - - $this->assertEquals($expected, $expr->render()); - } - - public function testOptions() - { - $expr = new Expression('~abc~is'); - $expr->getRegex()->removeOption('i')->addOption('m'); - - $this->assertEquals('~abc~sm', $expr->render()); - } - - public function testMixFlagsAndJokers() - { - $expr = new Expression('~^.*abc.*$~is'); - - $expr->getRegex()->setStartFlag(false)->setEndFlag(false)->setStartJoker(false)->setEndJoker(false); - $this->assertEquals('~abc~is', $expr->render()); - - $expr->getRegex()->setStartFlag(true)->setEndFlag(true)->setStartJoker(true)->setEndJoker(true); - $this->assertEquals('~^.*abc.*$~is', $expr->render()); - } - - /** - * @dataProvider getReplaceJokersTestData - */ - public function testReplaceJokers($regex, $expected) - { - $expr = new Expression($regex); - $expr = $expr->getRegex()->replaceJokers('@'); - - $this->assertEquals($expected, $expr->renderPattern()); - } - - public function getHasFlagsData() - { - return array( - array('~^abc~', true, false), - array('~abc$~', false, true), - array('~abc~', false, false), - array('~^abc$~', true, true), - array('~^abc\\$~', true, false), - ); - } - - public function getHasJokersData() - { - return array( - array('~.*abc~', true, false), - array('~abc.*~', false, true), - array('~abc~', false, false), - array('~.*abc.*~', true, true), - array('~.*abc\\.*~', true, false), - ); - } - - public function getSetFlagsData() - { - return array( - array('~abc~', true, false, '~^abc~'), - array('~abc~', false, true, '~abc$~'), - array('~abc~', false, false, '~abc~'), - array('~abc~', true, true, '~^abc$~'), - ); - } - - public function getSetJokersData() - { - return array( - array('~abc~', true, false, '~.*abc~'), - array('~abc~', false, true, '~abc.*~'), - array('~abc~', false, false, '~abc~'), - array('~abc~', true, true, '~.*abc.*~'), - ); - } - - public function getReplaceJokersTestData() - { - return array( - array('~.abc~', '@abc'), - array('~\\.abc~', '\\.abc'), - array('~\\\\.abc~', '\\\\@abc'), - array('~\\\\\\.abc~', '\\\\\\.abc'), - ); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php deleted file mode 100644 index 0cbae14b88..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\FakeAdapter; - -use Symfony\Component\Finder\Adapter\AbstractAdapter; - -/** - * @author Jean-François Simon - */ -class DummyAdapter extends AbstractAdapter -{ - /** - * @var \Iterator - */ - private $iterator; - - /** - * @param \Iterator $iterator - */ - public function __construct(\Iterator $iterator) - { - $this->iterator = $iterator; - } - - /** - * {@inheritdoc} - */ - public function searchInDirectory($dir) - { - return $this->iterator; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'yes'; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return true; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php deleted file mode 100644 index 6e6ed24b61..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\FakeAdapter; - -use Symfony\Component\Finder\Adapter\AbstractAdapter; -use Symfony\Component\Finder\Exception\AdapterFailureException; - -/** - * @author Jean-François Simon - */ -class FailingAdapter extends AbstractAdapter -{ - /** - * {@inheritdoc} - */ - public function searchInDirectory($dir) - { - throw new AdapterFailureException($this); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'failing'; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return true; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php deleted file mode 100644 index 5a260b0dfc..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\FakeAdapter; - -use Symfony\Component\Finder\Adapter\AbstractAdapter; - -/** - * @author Jean-François Simon - */ -class NamedAdapter extends AbstractAdapter -{ - /** - * @var string - */ - private $name; - - /** - * @param string $name - */ - public function __construct($name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function searchInDirectory($dir) - { - return new \ArrayIterator(array()); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return true; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php deleted file mode 100644 index 1f91b98a60..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\FakeAdapter; - -use Symfony\Component\Finder\Adapter\AbstractAdapter; - -/** - * @author Jean-François Simon - */ -class UnsupportedAdapter extends AbstractAdapter -{ - /** - * {@inheritdoc} - */ - public function searchInDirectory($dir) - { - return new \ArrayIterator(array()); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'unsupported'; - } - - /** - * {@inheritdoc} - */ - protected function canBeUsed() - { - return false; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php index 33750fc276..ec7db1ec06 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Finder\Tests; use Symfony\Component\Finder\Finder; -use Symfony\Component\Finder\Adapter; -use Symfony\Component\Finder\Tests\FakeAdapter; class FinderTest extends Iterator\RealIteratorTestCase { @@ -23,7 +21,7 @@ class FinderTest extends Iterator\RealIteratorTestCase { parent::setUpBeforeClass(); - self::$tmpDir = realpath(sys_get_temp_dir().'/symfony2_finder'); + self::$tmpDir = sys_get_temp_dir().'/symfony2_finder'; } public function testCreate() @@ -31,283 +29,198 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertInstanceOf('Symfony\Component\Finder\Finder', Finder::create()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testDirectories($adapter) + public function testDirectories() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->directories()); $this->assertIterator($this->toAbsolute(array('foo', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->directories(); $finder->files(); $finder->directories(); $this->assertIterator($this->toAbsolute(array('foo', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testFiles($adapter) + public function testFiles() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->files()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->files(); $finder->directories(); $finder->files(); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testDepth($adapter) + public function testDepth() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->depth('< 1')); - $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->depth('<= 0')); - $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->depth('>= 1')); $this->assertIterator($this->toAbsolute(array('foo/bar.tmp')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->depth('< 1')->depth('>= 1'); $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testName($adapter) + public function testName() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->name('*.php')); $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->name('test.ph*'); $finder->name('test.py'); $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); - - $finder = $this->buildFinder($adapter); - $finder->name('~^test~i'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); - - $finder = $this->buildFinder($adapter); - $finder->name('~\\.php$~i'); - $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); - - $finder = $this->buildFinder($adapter); - $finder->name('test.p{hp,y}'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testNotName($adapter) + public function testNotName() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->notName('*.php')); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->notName('*.php'); $finder->notName('*.py'); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->name('test.ph*'); $finder->name('test.py'); $finder->notName('*.php'); $finder->notName('*.py'); $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); - - $finder = $this->buildFinder($adapter); - $finder->name('test.ph*'); - $finder->name('test.py'); - $finder->notName('*.p{hp,y}'); - $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getRegexNameTestData - * - * @group regexName - */ - public function testRegexName($adapter, $regex) + public function testSize() { - $finder = $this->buildFinder($adapter); - $finder->name($regex); - $this->assertIterator($this->toAbsolute(array('test.py', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); - } - - /** - * @dataProvider getAdaptersTestData - */ - public function testSize($adapter) - { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->files()->size('< 1K')->size('> 500')); $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testDate($adapter) + public function testDate() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->files()->date('until last month')); $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testExclude($adapter) + public function testExclude() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->exclude('foo')); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testIgnoreVCS($adapter) + public function testIgnoreVCS() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->ignoreVCS(false)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->ignoreVCS(false)->ignoreVCS(false)->ignoreDotFiles(false); - $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->ignoreVCS(true)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', '.bar', '.foo', '.foo/.bar')), $finder->in(self::$tmpDir)->getIterator()); + } - /** - * @dataProvider getAdaptersTestData - */ - public function testIgnoreDotFiles($adapter) + public function testIgnoreDotFiles() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->ignoreDotFiles(false)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->ignoreDotFiles(false)->ignoreDotFiles(false)->ignoreVCS(false); - $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', '.foo/bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('.git', '.bar', '.foo', '.foo/.bar', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->ignoreDotFiles(true)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + } - /** - * @dataProvider getAdaptersTestData - */ - public function testSortByName($adapter) + public function testSortByName() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->sortByName()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testSortByType($adapter) + public function testSortByType() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->sortByType()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'toto', 'foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'toto', 'foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testSortByAccessedTime($adapter) + public function testSortByAccessedTime() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->sortByAccessedTime()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testSortByChangedTime($adapter) + public function testSortByChangedTime() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->sortByChangedTime()); - $this->assertIterator($this->toAbsolute(array('toto', 'test.py', 'test.php', 'foo/bar.tmp', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('toto', 'test.py', 'test.php', 'foo/bar.tmp', 'foo')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testSortByModifiedTime($adapter) + public function testSortByModifiedTime() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->sortByModifiedTime()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testSort($adapter) + public function testSort() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); })); - $this->assertIterator($this->toAbsolute(array('foo', 'foo bar', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testFilter($adapter) + public function testFilter() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return preg_match('/test/', $f) > 0; })); $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testFollowLinks($adapter) + public function testFollowLinks() { if ('\\' == DIRECTORY_SEPARATOR) { return; } - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertSame($finder, $finder->followLinks()); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testIn($adapter) + public function testIn() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); try { $finder->in('foobar'); $this->fail('->in() throws a \InvalidArgumentException if the directory does not exist'); @@ -315,39 +228,15 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertInstanceOf('InvalidArgumentException', $e, '->in() throws a \InvalidArgumentException if the directory does not exist'); } - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); - $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php'), $iterator); - } - - /** - * @dataProvider getAdaptersTestData - */ - public function testInWithGlob($adapter) - { - $finder = $this->buildFinder($adapter); - $finder->in(array(__DIR__.'/Fixtures/*/B/C', __DIR__.'/Fixtures/*/*/B/C'))->getIterator(); - - $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); - } - - /** - * @dataProvider getAdaptersTestData - * @expectedException \InvalidArgumentException - */ - public function testInWithNonDirectoryGlob($adapter) - { - $finder = $this->buildFinder($adapter); - $finder->in(__DIR__.'/Fixtures/A/a*'); + $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator); } - /** - * @dataProvider getAdaptersTestData - */ - public function testGetIterator($adapter) + public function testGetIterator() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); try { $finder->getIterator(); $this->fail('->getIterator() throws a \LogicException if the in() method has not been called'); @@ -355,7 +244,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertInstanceOf('LogicException', $e, '->getIterator() throws a \LogicException if the in() method has not been called'); } - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $dirs = array(); foreach ($finder->directories()->in(self::$tmpDir) as $dir) { $dirs[] = (string) $dir; @@ -368,22 +257,21 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertEquals($expected, $dirs, 'implements the \IteratorAggregate interface'); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $this->assertEquals(2, iterator_count($finder->directories()->in(self::$tmpDir)), 'implements the \IteratorAggregate interface'); - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $a = iterator_to_array($finder->directories()->in(self::$tmpDir)); $a = array_values(array_map(function ($a) { return (string) $a; }, $a)); sort($a); $this->assertEquals($expected, $a, 'implements the \IteratorAggregate interface'); } - /** - * @dataProvider getAdaptersTestData - */ - public function testRelativePath($adapter) + public function testRelativePath() { - $finder = $this->buildFinder($adapter)->in(self::$tmpDir); + $finder = new Finder(); + + $finder->in(self::$tmpDir); $paths = array(); @@ -391,20 +279,19 @@ class FinderTest extends Iterator\RealIteratorTestCase $paths[] = $file->getRelativePath(); } - $ref = array("", "", "", "", "foo", ""); + $ref = array("", "", "", "", "foo"); sort($ref); sort($paths); - $this->assertEquals($ref, $paths); + $this->assertEquals($paths, $ref); } - /** - * @dataProvider getAdaptersTestData - */ - public function testRelativePathname($adapter) + public function testRelativePathname() { - $finder = $this->buildFinder($adapter)->in(self::$tmpDir)->sortByName(); + $finder = new Finder(); + + $finder->in(self::$tmpDir)->sortByName(); $paths = array(); @@ -412,36 +299,30 @@ class FinderTest extends Iterator\RealIteratorTestCase $paths[] = $file->getRelativePathname(); } - $ref = array("test.php", "toto", "test.py", "foo", "foo".DIRECTORY_SEPARATOR."bar.tmp", "foo bar"); + $ref = array("test.php", "toto", "test.py", "foo", "foo".DIRECTORY_SEPARATOR."bar.tmp"); sort($paths); sort($ref); - $this->assertEquals($ref, $paths); + $this->assertEquals($paths, $ref); } - /** - * @dataProvider getAdaptersTestData - */ - public function testAppendWithAFinder($adapter) + public function testAppendWithAFinder() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); - $finder1 = $this->buildFinder($adapter); + $finder1 = new Finder(); $finder1->directories()->in(self::$tmpDir); - $finder = $finder->append($finder1); + $finder->append($finder1); $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testAppendWithAnArray($adapter) + public function testAppendWithAnArray() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); $finder->append($this->toAbsolute(array('foo', 'toto'))); @@ -449,30 +330,10 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator()); } - /** - * @dataProvider getAdaptersTestData - */ - public function testAppendReturnsAFinder($adapter) - { - $this->assertInstanceOf('Symfony\\Component\\Finder\\Finder', $this->buildFinder($adapter)->append(array())); - } - - /** - * @dataProvider getAdaptersTestData - */ - public function testAppendDoesNotRequireIn($adapter) - { - $finder = $this->buildFinder($adapter); - $finder->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); - - $finder1 = Finder::create()->append($finder); - - $this->assertIterator(iterator_to_array($finder->getIterator()), $finder1->getIterator()); - } - public function testCountDirectories() { - $directory = Finder::create()->directories()->in(self::$tmpDir); + $finder = new Finder(); + $directory = $finder->directories()->in(self::$tmpDir); $i = 0; foreach ($directory as $dir) { @@ -484,7 +345,8 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testCountFiles() { - $files = Finder::create()->files()->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $finder = new Finder(); + $files = $finder->files()->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'); $i = 0; foreach ($files as $file) { @@ -494,13 +356,17 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertCount($i, $files); } - /** - * @expectedException \LogicException - */ public function testCountWithoutIn() { - $finder = Finder::create()->files(); - count($finder); + $finder = new Finder(); + $finder->files(); + + try { + count($finder); + $this->fail('Countable makes use of the getIterator command'); + } catch (\Exception $e) { + $this->assertInstanceOf('LogicException', $e, '->getIterator() throws \LogicException when no logic has been entered'); + } } protected function toAbsolute($files) @@ -525,11 +391,10 @@ class FinderTest extends Iterator\RealIteratorTestCase /** * @dataProvider getContainsTestData - * @group grep */ - public function testContains($adapter, $matchPatterns, $noMatchPatterns, $expected) + public function testContains($matchPatterns, $noMatchPatterns, $expected) { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures') ->name('*.txt')->sortByName() ->contains($matchPatterns) @@ -538,12 +403,26 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } - /** - * @dataProvider getAdaptersTestData - */ - public function testContainsOnDirectory(Adapter\AdapterInterface $adapter) + public function getContainsTestData() + { + return array( + array('', '', array()), + array('foo', 'bar', array()), + array('', 'foobar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), + array('lorem ipsum dolor sit amet', 'foobar', array('lorem.txt')), + array('sit', 'bar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), + array('dolor sit amet', '@^L@m', array('dolor.txt', 'ipsum.txt')), + array('/^lorem ipsum dolor sit amet$/m', 'foobar', array('lorem.txt')), + array('lorem', 'foobar', array('lorem.txt')), + + array('', 'lorem', array('dolor.txt', 'ipsum.txt')), + array('ipsum dolor sit amet', '/^IPSUM/m', array('lorem.txt')), + ); + } + + public function testContainsOnDirectory() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->in(__DIR__) ->directories() ->name('Fixtures') @@ -551,12 +430,9 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertIterator(array(), $finder); } - /** - * @dataProvider getAdaptersTestData - */ - public function testNotContainsOnDirectory(Adapter\AdapterInterface $adapter) + public function testNotContainsOnDirectory() { - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->in(__DIR__) ->directories() ->name('Fixtures') @@ -566,13 +442,11 @@ class FinderTest extends Iterator\RealIteratorTestCase /** * Searching in multiple locations involves AppendIterator which does an unnecessary rewind which leaves FilterIterator - * with inner FilesystemIterator in an invalid state. + * with inner FilesystemIterator in an ivalid state. * * @see https://bugs.php.net/bug.php?id=49104 - * - * @dataProvider getAdaptersTestData */ - public function testMultipleLocations(Adapter\AdapterInterface $adapter) + public function testMultipleLocations() { $locations = array( self::$tmpDir.'/', @@ -580,196 +454,9 @@ class FinderTest extends Iterator\RealIteratorTestCase ); // it is expected that there are test.py test.php in the tmpDir - $finder = $this->buildFinder($adapter); + $finder = new Finder(); $finder->in($locations)->depth('< 1')->name('test.php'); $this->assertEquals(1, count($finder)); } - - /** - * Iterator keys must be the file pathname. - * - * @dataProvider getAdaptersTestData - */ - public function testIteratorKeys(Adapter\AdapterInterface $adapter) - { - $finder = $this->buildFinder($adapter)->in(self::$tmpDir); - foreach ($finder as $key => $file) { - $this->assertEquals($file->getPathname(), $key); - } - } - - public function testAdaptersOrdering() - { - $finder = Finder::create() - ->removeAdapters() - ->addAdapter(new FakeAdapter\NamedAdapter('a'), 0) - ->addAdapter(new FakeAdapter\NamedAdapter('b'), -50) - ->addAdapter(new FakeAdapter\NamedAdapter('c'), 50) - ->addAdapter(new FakeAdapter\NamedAdapter('d'), -25) - ->addAdapter(new FakeAdapter\NamedAdapter('e'), 25); - - $this->assertEquals( - array('c', 'e', 'a', 'd', 'b'), - array_map(function(Adapter\AdapterInterface $adapter) { - return $adapter->getName(); - }, $finder->getAdapters()) - ); - } - - public function testAdaptersChaining() - { - $iterator = new \ArrayIterator(array()); - $filenames = $this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')); - foreach ($filenames as $file) { - $iterator->append(new \Symfony\Component\Finder\SplFileInfo($file, null, null)); - } - - $finder = Finder::create() - ->removeAdapters() - ->addAdapter(new FakeAdapter\UnsupportedAdapter(), 3) - ->addAdapter(new FakeAdapter\FailingAdapter(), 2) - ->addAdapter(new FakeAdapter\DummyAdapter($iterator), 1); - - $this->assertIterator($filenames, $finder->in(sys_get_temp_dir())->getIterator()); - } - - public function getAdaptersTestData() - { - return array_map( - function ($adapter) { return array($adapter); }, - $this->getValidAdapters() - ); - } - - public function getContainsTestData() - { - $tests = array( - array('', '', array()), - array('foo', 'bar', array()), - array('', 'foobar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('lorem ipsum dolor sit amet', 'foobar', array('lorem.txt')), - array('sit', 'bar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('dolor sit amet', '@^L@m', array('dolor.txt', 'ipsum.txt')), - array('/^lorem ipsum dolor sit amet$/m', 'foobar', array('lorem.txt')), - array('lorem', 'foobar', array('lorem.txt')), - array('', 'lorem', array('dolor.txt', 'ipsum.txt')), - array('ipsum dolor sit amet', '/^IPSUM/m', array('lorem.txt')), - ); - - return $this->buildTestData($tests); - } - - public function getRegexNameTestData() - { - $tests = array( - array('~.+\\.p.+~i'), - array('~t.*s~i'), - ); - - return $this->buildTestData($tests); - } - - /** - * @dataProvider getTestPathData - */ - public function testPath(Adapter\AdapterInterface $adapter, $matchPatterns, $noMatchPatterns, array $expected) - { - $finder = $this->buildFinder($adapter); - $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures') - ->path($matchPatterns) - ->notPath($noMatchPatterns); - - $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); - } - - public function testAdapterSelection() - { - // test that by default, PhpAdapter is selected - $adapters = Finder::create()->getAdapters(); - $this->assertTrue($adapters[0] instanceof Adapter\PhpAdapter); - - // test another adapter selection - $adapters = Finder::create()->setAdapter('gnu_find')->getAdapters(); - $this->assertTrue($adapters[0] instanceof Adapter\GnuFindAdapter); - - // test that useBestAdapter method removes selection - $adapters = Finder::create()->useBestAdapter()->getAdapters(); - $this->assertFalse($adapters[0] instanceof Adapter\PhpAdapter); - } - - public function getTestPathData() - { - $tests = array( - array('', '', array()), - array('/^A\/B\/C/', '/C$/', - array('A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat') - ), - array('/^A\/B/', 'foobar', - array( - 'A'.DIRECTORY_SEPARATOR.'B', - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', - ) - ), - array('A/B/C', 'foobar', - array( - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat.copy', - ) - ), - array('A/B', 'foobar', - array( - //dirs - 'A'.DIRECTORY_SEPARATOR.'B', - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', - //files - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat.copy', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat.copy', - ) - ), - ); - - return $this->buildTestData($tests); - } - - private function buildTestData(array $tests) - { - $data = array(); - foreach ($this->getValidAdapters() as $adapter) { - foreach ($tests as $test) { - $data[] = array_merge(array($adapter), $test); - } - } - - return $data; - } - - private function buildFinder(Adapter\AdapterInterface $adapter) - { - return Finder::create() - ->removeAdapters() - ->addAdapter($adapter); - } - - private function getValidAdapters() - { - return array_filter( - array( - new Adapter\BsdFindAdapter(), - new Adapter\GnuFindAdapter(), - new Adapter\PhpAdapter() - ), - function (Adapter\AdapterInterface $adapter) { - return $adapter->isSupported(); - } - ); - } } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/C/abc.dat b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/C/abc.dat deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/ab.dat b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/ab.dat deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/a.dat b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/a.dat deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/ab.dat.copy b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/ab.dat.copy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/a.dat.copy b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/a.dat.copy deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/GlobTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/GlobTest.php similarity index 77% rename from vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/GlobTest.php rename to vendor/symfony/finder/Symfony/Component/Finder/Tests/GlobTest.php index fbaeb0e237..56077a1068 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/GlobTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/GlobTest.php @@ -11,21 +11,21 @@ namespace Symfony\Component\Finder\Tests; -use Symfony\Component\Finder\Expression\Expression; +use Symfony\Component\Finder\Glob; class GlobTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider getToRegexData */ - public function testGlobToRegex($glob, $match, $noMatch) + public function testToRegex($glob, $match, $noMatch) { foreach ($match as $m) { - $this->assertRegExp(Expression::create($glob)->getRegex()->render(), $m, '::toRegex() converts a glob to a regexp'); + $this->assertRegExp(Glob::toRegex($glob), $m, '::toRegex() converts a glob to a regexp'); } foreach ($noMatch as $m) { - $this->assertNotRegExp(Expression::create($glob)->getRegex()->render(), $m, '::toRegex() converts a glob to a regexp'); + $this->assertNotRegExp(Glob::toRegex($glob), $m, '::toRegex() converts a glob to a regexp'); } } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php index 46319bfdb1..6b5099ad2b 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -31,8 +31,8 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { return array( - array(array(new DateComparator('since 20 years ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar')), - array(array(new DateComparator('since 2 months ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar')), + array(array(new DateComparator('since 20 years ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar')), + array(array(new DateComparator('since 2 months ago')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar')), array(array(new DateComparator('until last month')), array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.foo')), ); } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php deleted file mode 100644 index 8c3df32f6d..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\Iterator; - -use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; - -class DepthRangeFilterIteratorTest extends RealIteratorTestCase -{ - /** - * @dataProvider getAcceptData - */ - public function testAccept($minDepth, $maxDepth, $expected) - { - $inner = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getAbsolutePath(''), \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST); - - $iterator = new DepthRangeFilterIterator($inner, $minDepth, $maxDepth); - - $actual = array_keys(iterator_to_array($iterator)); - sort($expected); - sort($actual); - $this->assertEquals($expected, $actual); - } - - public function getAcceptData() - { - return array( - array(0, 0, array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.bar'), $this->getAbsolutePath('/foo bar'))), - array(0, 1, array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.bar'), $this->getAbsolutePath('/foo bar'), $this->getAbsolutePath('/.foo/bar'))), - array(2, INF, array()), - array(1, INF, array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.foo/bar'))), - array(1, 1, array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.foo/bar'))), - ); - } - - protected function getAbsolutePath($path) - { - return sys_get_temp_dir().'/symfony2_finder'.str_replace('/', DIRECTORY_SEPARATOR, $path); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeIteratorTest.php new file mode 100644 index 0000000000..43ad459949 --- /dev/null +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeIteratorTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests\Iterator; + +use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; +use Symfony\Component\Finder\Comparator\NumberComparator; + +class DepthRangeFilterIteratorTest extends RealIteratorTestCase +{ + /** + * @dataProvider getAcceptData + */ + public function testAccept($size, $expected) + { + $inner = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getAbsolutePath(''), \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST); + + $iterator = new DepthRangeFilterIterator($inner, $size); + + $actual = array_keys(iterator_to_array($iterator)); + sort($expected); + sort($actual); + $this->assertEquals($expected, $actual); + } + + public function getAcceptData() + { + return array( + array(array(new NumberComparator('< 1')), array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.bar'))), + array(array(new NumberComparator('<= 1')), array($this->getAbsolutePath('/.git'), $this->getAbsolutePath('/test.py'), $this->getAbsolutePath('/foo'), $this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/test.php'), $this->getAbsolutePath('/toto'), $this->getAbsolutePath('/.foo'), $this->getAbsolutePath('/.foo/.bar'), $this->getAbsolutePath('/.bar'))), + array(array(new NumberComparator('> 1')), array()), + array(array(new NumberComparator('>= 1')), array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'))), + array(array(new NumberComparator('1')), array($this->getAbsolutePath('/foo/bar.tmp'), $this->getAbsolutePath('/.foo/.bar'))), + ); + } + + protected function getAbsolutePath($path) + { + return sys_get_temp_dir().'/symfony2_finder'.str_replace('/', DIRECTORY_SEPARATOR, $path); + } +} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFileIteratorTest.php similarity index 84% rename from vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php rename to vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFileIteratorTest.php index d68d7a3605..a0c522bfe5 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFileIteratorTest.php @@ -37,25 +37,21 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase $tmpDir.DIRECTORY_SEPARATOR.'.bar', $tmpDir.DIRECTORY_SEPARATOR.'.foo', $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'.bar', - $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'bar', $tmpDir.DIRECTORY_SEPARATOR.'.git', $tmpDir.DIRECTORY_SEPARATOR.'test.py', $tmpDir.DIRECTORY_SEPARATOR.'test.php', - $tmpDir.DIRECTORY_SEPARATOR.'toto', - $tmpDir.DIRECTORY_SEPARATOR.'foo bar', + $tmpDir.DIRECTORY_SEPARATOR.'toto' )), array(array('fo'), array( $tmpDir.DIRECTORY_SEPARATOR.'.bar', $tmpDir.DIRECTORY_SEPARATOR.'.foo', $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'.bar', - $tmpDir.DIRECTORY_SEPARATOR.'.foo'.DIRECTORY_SEPARATOR.'bar', $tmpDir.DIRECTORY_SEPARATOR.'.git', $tmpDir.DIRECTORY_SEPARATOR.'test.py', $tmpDir.DIRECTORY_SEPARATOR.'foo', $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp', $tmpDir.DIRECTORY_SEPARATOR.'test.php', - $tmpDir.DIRECTORY_SEPARATOR.'toto', - $tmpDir.DIRECTORY_SEPARATOR.'foo bar', + $tmpDir.DIRECTORY_SEPARATOR.'toto' )), ); } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php deleted file mode 100644 index 61f0e9b229..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\Iterator; - -use Symfony\Component\Finder\Iterator\FilePathsIterator; - -class FilePathsIteratorTest extends RealIteratorTestCase -{ - /** - * @dataProvider getSubPathData - */ - public function testSubPath($baseDir, array $paths, array $subPaths, array $subPathnames) - { - $iterator = new FilePathsIterator($paths, $baseDir); - - foreach ($iterator as $index => $file) { - $this->assertEquals($paths[$index], $file->getPathname()); - $this->assertEquals($subPaths[$index], $iterator->getSubPath()); - $this->assertEquals($subPathnames[$index], $iterator->getSubPathname()); - } - } - - public function getSubPathData() - { - $tmpDir = sys_get_temp_dir().'/symfony2_finder'; - - return array( - array( - $tmpDir, - array( // paths - $tmpDir.DIRECTORY_SEPARATOR.'.git' => $tmpDir.DIRECTORY_SEPARATOR.'.git', - $tmpDir.DIRECTORY_SEPARATOR.'test.py' => $tmpDir.DIRECTORY_SEPARATOR.'test.py', - $tmpDir.DIRECTORY_SEPARATOR.'foo' => $tmpDir.DIRECTORY_SEPARATOR.'foo', - $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp' => $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp', - $tmpDir.DIRECTORY_SEPARATOR.'test.php' => $tmpDir.DIRECTORY_SEPARATOR.'test.php', - $tmpDir.DIRECTORY_SEPARATOR.'toto' => $tmpDir.DIRECTORY_SEPARATOR.'toto' - ), - array( // subPaths - $tmpDir.DIRECTORY_SEPARATOR.'.git' => '', - $tmpDir.DIRECTORY_SEPARATOR.'test.py' => '', - $tmpDir.DIRECTORY_SEPARATOR.'foo' => '', - $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp' => 'foo', - $tmpDir.DIRECTORY_SEPARATOR.'test.php' => '', - $tmpDir.DIRECTORY_SEPARATOR.'toto' => '' - ), - array( // subPathnames - $tmpDir.DIRECTORY_SEPARATOR.'.git' => '.git', - $tmpDir.DIRECTORY_SEPARATOR.'test.py' => 'test.py', - $tmpDir.DIRECTORY_SEPARATOR.'foo' => 'foo', - $tmpDir.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'bar.tmp' => 'foo'.DIRECTORY_SEPARATOR.'bar.tmp', - $tmpDir.DIRECTORY_SEPARATOR.'test.php' => 'test.php', - $tmpDir.DIRECTORY_SEPARATOR.'toto' => 'toto' - ), - ), - ); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php index c80b6aea29..852b19e50c 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php @@ -30,7 +30,7 @@ class FileTypeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { return array( - array(FileTypeFilterIterator::ONLY_FILES, array(sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar')), + array(FileTypeFilterIterator::ONLY_FILES, array(sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar')), array(FileTypeFilterIterator::ONLY_DIRECTORIES, array(sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.foo')), ); } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php index 5f2b398239..5f0625f9f5 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Finder\Tests\Iterator; use Symfony\Component\Finder\Iterator\FilecontentFilterIterator; -use Symfony\Component\Finder\Tests\Iterator\MockSplFileInfo; -use Symfony\Component\Finder\Tests\Iterator\MockFileListIterator; class FilecontentFilterIteratorTest extends IteratorTestCase { @@ -87,3 +85,107 @@ class FilecontentFilterIteratorTest extends IteratorTestCase ); } } + +class MockSplFileInfo extends \SplFileInfo +{ + const TYPE_DIRECTORY = 1; + const TYPE_FILE = 2; + const TYPE_UNKNOWN = 3; + + private $contents = null; + private $mode = null; + private $type = null; + + public function __construct($param) + { + if (is_string($param)) { + parent::__construct($param); + } elseif (is_array($param)) { + + $defaults = array( + 'name' => 'file.txt', + 'contents' => null, + 'mode' => null, + 'type' => null + ); + $defaults = array_merge($defaults, $param); + parent::__construct($defaults['name']); + $this->setContents($defaults['contents']); + $this->setMode($defaults['mode']); + $this->setType($defaults['type']); + } else { + throw new \RuntimeException(sprintf('Incorrect parameter "%s"', $param)); + } + } + + public function isFile() + { + if ($this->type === null) { + return preg_match('/file/', $this->getFilename()); + }; + + return self::TYPE_FILE === $this->type; + } + + public function isDir() + { + if ($this->type === null) { + return preg_match('/directory/', $this->getFilename()); + } + + return self::TYPE_DIRECTORY === $this->type; + } + + public function isReadable() + { + if ($this->mode === null) { + return preg_match('/r\+/', $this->getFilename()); + } + + return preg_match('/r\+/', $this->mode); + } + + public function getContents() + { + return $this->contents; + } + + public function setContents($contents) + { + $this->contents = $contents; + } + + public function setMode($mode) + { + $this->mode = $mode; + } + + public function setType($type) + { + if (is_string($type)) { + switch ($type) { + case 'directory': + case 'd': + $this->type = self::TYPE_DIRECTORY; + break; + case 'file': + case 'f': + $this->type = self::TYPE_FILE; + break; + default: + $this->type = self::TYPE_UNKNOWN; + } + } else { + $this->type = $type; + } + } +} + +class MockFileListIterator extends \ArrayIterator +{ + public function __construct(array $filesArray = array()) + { + $files = array_map(function($file){ return new MockSplFileInfo($file); }, $filesArray); + parent::__construct($files); + } +} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php index c4b9795918..1deea0c036 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php @@ -38,6 +38,7 @@ class FilenameFilterIteratorTest extends IteratorTestCase array(array(), array('/\.php$/'), array('test.py')), ); } + } class InnerNameIterator extends \ArrayIterator diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php index 7b3f8934e8..8810ce757d 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php @@ -15,11 +15,7 @@ abstract class IteratorTestCase extends \PHPUnit_Framework_TestCase { protected function assertIterator($expected, \Traversable $iterator) { - // set iterator_to_array $use_key to false to avoid values merge - // this made FinderTest::testAppendWithAnArray() failed with GnuFinderAdapter - $values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false)); - - $expected = array_map(function ($path) { return str_replace('/', DIRECTORY_SEPARATOR, $path); }, $expected); + $values = array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator)); sort($values); sort($expected); diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php deleted file mode 100644 index 6d8ae39561..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\Iterator; - -class MockFileListIterator extends \ArrayIterator -{ - public function __construct(array $filesArray = array()) - { - $files = array_map(function($file){ return new MockSplFileInfo($file); }, $filesArray); - parent::__construct($files); - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php deleted file mode 100644 index a50e4c9fcc..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\Iterator; - -class MockSplFileInfo extends \SplFileInfo -{ - const TYPE_DIRECTORY = 1; - const TYPE_FILE = 2; - const TYPE_UNKNOWN = 3; - - private $contents = null; - private $mode = null; - private $type = null; - private $relativePath = null; - private $relativePathname = null; - - public function __construct($param) - { - if (is_string($param)) { - parent::__construct($param); - } elseif (is_array($param)) { - $defaults = array( - 'name' => 'file.txt', - 'contents' => null, - 'mode' => null, - 'type' => null, - 'relativePath' => null, - 'relativePathname' => null, - ); - $defaults = array_merge($defaults, $param); - parent::__construct($defaults['name']); - $this->setContents($defaults['contents']); - $this->setMode($defaults['mode']); - $this->setType($defaults['type']); - $this->setRelativePath($defaults['relativePath']); - $this->setRelativePathname($defaults['relativePathname']); - } else { - throw new \RuntimeException(sprintf('Incorrect parameter "%s"', $param)); - } - } - - public function isFile() - { - if ($this->type === null) { - return preg_match('/file/', $this->getFilename()); - }; - - return self::TYPE_FILE === $this->type; - } - - public function isDir() - { - if ($this->type === null) { - return preg_match('/directory/', $this->getFilename()); - } - - return self::TYPE_DIRECTORY === $this->type; - } - - public function isReadable() - { - if ($this->mode === null) { - return preg_match('/r\+/', $this->getFilename()); - } - - return preg_match('/r\+/', $this->mode); - } - - public function getContents() - { - return $this->contents; - } - - public function setContents($contents) - { - $this->contents = $contents; - } - - public function setMode($mode) - { - $this->mode = $mode; - } - - public function setType($type) - { - if (is_string($type)) { - switch ($type) { - case 'directory': - $this->type = self::TYPE_DIRECTORY; - case 'd': - $this->type = self::TYPE_DIRECTORY; - break; - case 'file': - $this->type = self::TYPE_FILE; - case 'f': - $this->type = self::TYPE_FILE; - break; - default: - $this->type = self::TYPE_UNKNOWN; - } - } else { - $this->type = $type; - } - } - - public function setRelativePath($relativePath) - { - $this->relativePath = $relativePath; - } - - public function setRelativePathname($relativePathname) - { - $this->relativePathname = $relativePathname; - } - - public function getRelativePath() - { - return $this->relativePath; - } - - public function getRelativePathname() - { - return $this->relativePathname; - } -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php deleted file mode 100644 index 7278bebadd..0000000000 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\Iterator; - -use Symfony\Component\Finder\Iterator\PathFilterIterator; - -class PathFilterIteratorTest extends IteratorTestCase -{ - - /** - * @dataProvider getTestFilterData - */ - public function testFilter(\Iterator $inner, array $matchPatterns, array $noMatchPatterns, array $resultArray) - { - $iterator = new PathFilterIterator($inner, $matchPatterns, $noMatchPatterns); - $this->assertIterator($resultArray, $iterator); - } - - public function getTestFilterData() - { - $inner = new MockFileListIterator(); - - //PATH: A/B/C/abc.dat - $inner[] = new MockSplFileInfo(array( - 'name' => 'abc.dat', - 'relativePathname' => 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'C' . DIRECTORY_SEPARATOR . 'abc.dat', - )); - - //PATH: A/B/ab.dat - $inner[] = new MockSplFileInfo(array( - 'name' => 'ab.dat', - 'relativePathname' => 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'ab.dat', - )); - - //PATH: A/a.dat - $inner[] = new MockSplFileInfo(array( - 'name' => 'a.dat', - 'relativePathname' => 'A' . DIRECTORY_SEPARATOR . 'a.dat', - )); - - //PATH: copy/A/B/C/abc.dat.copy - $inner[] = new MockSplFileInfo(array( - 'name' => 'abc.dat.copy', - 'relativePathname' => 'copy' . DIRECTORY_SEPARATOR . 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'C' . DIRECTORY_SEPARATOR . 'abc.dat', - )); - - //PATH: copy/A/B/ab.dat.copy - $inner[] = new MockSplFileInfo(array( - 'name' => 'ab.dat.copy', - 'relativePathname' => 'copy' . DIRECTORY_SEPARATOR . 'A' . DIRECTORY_SEPARATOR . 'B' . DIRECTORY_SEPARATOR . 'ab.dat', - )); - - //PATH: copy/A/a.dat.copy - $inner[] = new MockSplFileInfo(array( - 'name' => 'a.dat.copy', - 'relativePathname' => 'copy' . DIRECTORY_SEPARATOR . 'A' . DIRECTORY_SEPARATOR . 'a.dat', - )); - - return array( - array($inner, array('/^A/'), array(), array('abc.dat', 'ab.dat', 'a.dat')), - array($inner, array('/^A\/B/'), array(), array('abc.dat', 'ab.dat')), - array($inner, array('/^A\/B\/C/'), array(), array('abc.dat')), - array($inner, array('/A\/B\/C/'), array(), array('abc.dat', 'abc.dat.copy')), - - array($inner, array('A'), array(), array('abc.dat', 'ab.dat', 'a.dat', 'abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), - array($inner, array('A/B'), array(), array('abc.dat', 'ab.dat', 'abc.dat.copy', 'ab.dat.copy')), - array($inner, array('A/B/C'), array(), array('abc.dat', 'abc.dat.copy')), - - array($inner, array('copy/A'), array(), array('abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), - array($inner, array('copy/A/B'), array(), array('abc.dat.copy', 'ab.dat.copy')), - array($inner, array('copy/A/B/C'), array(), array('abc.dat.copy')), - - ); - } - -} diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php index 6b353bb9c5..b7b7b40cc3 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php @@ -22,14 +22,12 @@ abstract class RealIteratorTestCase extends IteratorTestCase $tmpDir.'/.git/', $tmpDir.'/.foo/', $tmpDir.'/.foo/.bar', - $tmpDir.'/.foo/bar', $tmpDir.'/.bar', $tmpDir.'/test.py', $tmpDir.'/foo/', $tmpDir.'/foo/bar.tmp', $tmpDir.'/test.php', - $tmpDir.'/toto/', - $tmpDir.'/foo bar', + $tmpDir.'/toto/' ); if (is_dir($tmpDir)) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php index f231b78573..624d91ac98 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php @@ -40,9 +40,9 @@ class SortableIteratorTest extends RealIteratorTestCase public function getAcceptData() { return array( - array(SortableIterator::SORT_BY_NAME, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), - array(SortableIterator::SORT_BY_TYPE, array(sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py')), - array(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), + array(SortableIterator::SORT_BY_NAME, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), + array(SortableIterator::SORT_BY_TYPE, array(sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/toto', sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py')), + array(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealpath(), $b->getRealpath()); }, array(sys_get_temp_dir().'/symfony2_finder/.bar', sys_get_temp_dir().'/symfony2_finder/.foo', sys_get_temp_dir().'/symfony2_finder/.foo/.bar', sys_get_temp_dir().'/symfony2_finder/.git', sys_get_temp_dir().'/symfony2_finder/foo', sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', sys_get_temp_dir().'/symfony2_finder/test.php', sys_get_temp_dir().'/symfony2_finder/test.py', sys_get_temp_dir().'/symfony2_finder/toto')), ); } } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/bootstrap.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/bootstrap.php new file mode 100644 index 0000000000..3edc1b2536 --- /dev/null +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/bootstrap.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +spl_autoload_register(function ($class) { + if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Finder')) { + if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Finder')).'.php')) { + require_once $file; + } + } +}); diff --git a/vendor/symfony/finder/Symfony/Component/Finder/composer.json b/vendor/symfony/finder/Symfony/Component/Finder/composer.json index 2ad5b34ccb..0de630922b 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/composer.json +++ b/vendor/symfony/finder/Symfony/Component/Finder/composer.json @@ -19,13 +19,8 @@ "php": ">=5.3.3" }, "autoload": { - "psr-0": { "Symfony\\Component\\Finder\\": "" } + "psr-0": { "Symfony\\Component\\Finder": "" } }, "target-dir": "Symfony/Component/Finder", - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - } + "minimum-stability": "dev" } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/phpunit.xml.dist b/vendor/symfony/finder/Symfony/Component/Finder/phpunit.xml.dist index 23272235b9..cd116f5716 100644 --- a/vendor/symfony/finder/Symfony/Component/Finder/phpunit.xml.dist +++ b/vendor/symfony/finder/Symfony/Component/Finder/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="vendor/autoload.php" + bootstrap="Tests/bootstrap.php" > diff --git a/vendor/symfony/security/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php b/vendor/symfony/security/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php index 656545f2c8..4f37ba3109 100644 --- a/vendor/symfony/security/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php +++ b/vendor/symfony/security/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php @@ -82,7 +82,7 @@ class Pbkdf2PasswordEncoder extends BasePasswordEncoder $digest = ''; for ($i = 1; $i <= $blocks; $i++) { - $ib = $block = hash_hmac($algorithm, $salt . pack('N', $i), $password, true); + $ib = $block = hash_hmac($algorithm, $salt.pack('N', $i), $password, true); // Iterations for ($j = 1; $j < $iterations; $j++) { diff --git a/vendor/symfony/security/Symfony/Component/Security/Http/Firewall/ExceptionListener.php b/vendor/symfony/security/Symfony/Component/Security/Http/Firewall/ExceptionListener.php index 0f81d1bf6c..655459523a 100644 --- a/vendor/symfony/security/Symfony/Component/Security/Http/Firewall/ExceptionListener.php +++ b/vendor/symfony/security/Symfony/Component/Security/Http/Firewall/ExceptionListener.php @@ -181,7 +181,7 @@ class ExceptionListener { // session isn't required when using http basic authentication mechanism for example if ($request->hasSession() && $request->isMethodSafe()) { - $request->getSession()->set('_security.' . $this->providerKey . '.target_path', $request->getUri()); + $request->getSession()->set('_security.'.$this->providerKey.'.target_path', $request->getUri()); } } } diff --git a/vendor/symfony/security/Symfony/Component/Security/Tests/Core/Encoder/BCryptPasswordEncoderTest.php b/vendor/symfony/security/Symfony/Component/Security/Tests/Core/Encoder/BCryptPasswordEncoderTest.php index bfaf5fcec3..45c8f7430f 100644 --- a/vendor/symfony/security/Symfony/Component/Security/Tests/Core/Encoder/BCryptPasswordEncoderTest.php +++ b/vendor/symfony/security/Symfony/Component/Security/Tests/Core/Encoder/BCryptPasswordEncoderTest.php @@ -105,7 +105,7 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase $prefix = '$'.(version_compare(phpversion(), '5.3.7', '>=') ? '2y' : '2a').'$'; $salt = 'MDEyMzQ1Njc4OWFiY2RlZe'; - $expected = crypt(self::PASSWORD, $prefix . self::VALID_COST . '$' . $salt); + $expected = crypt(self::PASSWORD, $prefix.self::VALID_COST.'$'.$salt); $this->assertEquals($expected, $result); } diff --git a/vendor/symfony/security/Symfony/Component/Security/Tests/Http/Firewall/DigestDataTest.php b/vendor/symfony/security/Symfony/Component/Security/Tests/Http/Firewall/DigestDataTest.php index cfb929cacc..8b63d9c953 100644 --- a/vendor/symfony/security/Symfony/Component/Security/Tests/Http/Firewall/DigestDataTest.php +++ b/vendor/symfony/security/Symfony/Component/Security/Tests/Http/Firewall/DigestDataTest.php @@ -103,10 +103,10 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase { $time = microtime(true); $key = 'ThisIsAKey'; - $nonce = base64_encode($time . ':' . md5($time . ':' . $key)); + $nonce = base64_encode($time.':'.md5($time.':'.$key)); $digestAuth = new DigestData( - 'username="user", realm="Welcome, robot!", nonce="' . $nonce . '", ' . + 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' . 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' . 'response="b52938fc9e6d7c01be7702ece9031b42"' ); @@ -143,10 +143,10 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase { $time = microtime(true) + 10; $key = 'ThisIsAKey'; - $nonce = base64_encode($time . ':' . md5($time . ':' . $key)); + $nonce = base64_encode($time.':'.md5($time.':'.$key)); $digestAuth = new DigestData( - 'username="user", realm="Welcome, robot!", nonce="' . $nonce . '", ' . + 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' . 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' . 'response="b52938fc9e6d7c01be7702ece9031b42"' ); @@ -164,10 +164,10 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase private function calculateServerDigest($username, $realm, $password, $key, $nc, $cnonce, $qop, $method, $uri) { $time = microtime(true); - $nonce = base64_encode($time . ':' . md5($time . ':' . $key)); + $nonce = base64_encode($time.':'.md5($time.':'.$key)); $response = md5( - md5($username . ':' . $realm . ':' . $password) . ':' . $nonce . ':' . $nc . ':' . $cnonce . ':' . $qop . ':' . md5($method . ':' . $uri) + md5($username.':'.$realm.':'.$password).':'.$nonce.':'.$nc.':'.$cnonce.':'.$qop.':'.md5($method.':'.$uri) ); $digest = sprintf('username="%s", realm="%s", nonce="%s", uri="%s", cnonce="%s", nc=%s, qop="%s", response="%s"', diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php index 270817e1db..979153ac22 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -68,17 +68,17 @@ class IcuResFileDumper implements DumperInterface $resources .= pack('V', $this->getPosition($data)); $data .= pack('V', strlen($target)) - . mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') - . $this->writePadding($data) + .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') + .$this->writePadding($data) ; } $resOffset = $this->getPosition($data); $data .= pack('v', count($messages)) - . $indexes - . $this->writePadding($data) - . $resources + .$indexes + .$this->writePadding($data) + .$resources ; $bundleTop = $this->getPosition($data); @@ -103,8 +103,8 @@ class IcuResFileDumper implements DumperInterface ); $output = $header - . $root - . $data; + .$root + .$data; return $output; } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php index 448e3cd3f5..a3a2a64933 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php @@ -52,16 +52,16 @@ class MoFileDumper extends FileDumper foreach ($offsets as $offset) { $sourceOffsets .= $this->writeLong($offset[1]) - . $this->writeLong($offset[0] + $sourcesStart); + .$this->writeLong($offset[0] + $sourcesStart); $targetOffsets .= $this->writeLong($offset[3]) - . $this->writeLong($offset[2] + $sourcesStart + $sourcesSize); + .$this->writeLong($offset[2] + $sourcesStart + $sourcesSize); } $output = implode(array_map(array($this, 'writeLong'), $header)) - . $sourceOffsets - . $targetOffsets - . $sources - . $targets + .$sourceOffsets + .$targetOffsets + .$sources + .$targets ; return $output; diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd b/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd index 282cb5be90..8fcb991a00 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd +++ b/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd @@ -221,8 +221,8 @@ the XML namespace, e.g. as follows:

-          <schema . . .>
-           . . .
+          <schema.. .>
+          .. .
            <import namespace="http://www.w3.org/XML/1998/namespace"
                       schemaLocation="http://www.w3.org/2001/xml.xsd"/>
      
@@ -239,8 +239,8 @@ group defined below will have the desired effect, e.g.

-          <type . . .>
-           . . .
+          <type.. .>
+          .. .
            <attributeGroup ref="xml:specialAttrs"/>
      

diff --git a/vendor/symfony/translation/Symfony/Component/Translation/README.md b/vendor/symfony/translation/Symfony/Component/Translation/README.md index c2ac7dfc59..24e6210c88 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/README.md +++ b/vendor/symfony/translation/Symfony/Component/Translation/README.md @@ -15,7 +15,7 @@ translated strings from these including support for pluralization. 'Hello World!' => 'Bonjour', ), 'fr'); - echo $translator->trans('Hello World!') . "\n"; + echo $translator->trans('Hello World!')."\n"; Resources --------- diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php index 73b6259b04..a3bd67abaa 100644 --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php @@ -40,7 +40,7 @@ class IcuDatFileLoaderTest extends LocalizedTestCase { // bundled resource is build using pkgdata command which at least in ICU 4.2 comes in extremely! buggy form // you must specify an temporary build directory which is not the same as current directory and - // MUST reside on the same partition. pkgdata -p resources -T /srv -d . packagelist.txt + // MUST reside on the same partition. pkgdata -p resources -T /srv -d.packagelist.txt $loader = new IcuDatFileLoader(); $resource = __DIR__.'/../fixtures/resourcebundle/dat/resources'; $catalogue = $loader->load($resource, 'en', 'domain1');