dependabot-composer 0.107.13 → 0.107.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/vendor/autoload.php +7 -0
- data/helpers/vendor/bin/composer +1 -0
- data/helpers/vendor/bin/jsonlint +1 -0
- data/helpers/vendor/bin/validate-json +1 -0
- data/helpers/vendor/composer/ClassLoader.php +445 -0
- data/helpers/vendor/composer/LICENSE +21 -0
- data/helpers/vendor/composer/autoload_classmap.php +9 -0
- data/helpers/vendor/composer/autoload_files.php +11 -0
- data/helpers/vendor/composer/autoload_namespaces.php +9 -0
- data/helpers/vendor/composer/autoload_psr4.php +26 -0
- data/helpers/vendor/composer/autoload_real.php +70 -0
- data/helpers/vendor/composer/autoload_static.php +128 -0
- data/helpers/vendor/composer/ca-bundle/LICENSE +19 -0
- data/helpers/vendor/composer/ca-bundle/README.md +85 -0
- data/helpers/vendor/composer/ca-bundle/composer.json +54 -0
- data/helpers/vendor/composer/ca-bundle/res/cacert.pem +3401 -0
- data/helpers/vendor/composer/ca-bundle/src/CaBundle.php +308 -0
- data/helpers/vendor/composer/composer/.gitattributes +12 -0
- data/helpers/vendor/composer/composer/.github/CONTRIBUTING.md +59 -0
- data/helpers/vendor/composer/composer/.github/ISSUE_TEMPLATE.md +25 -0
- data/helpers/vendor/composer/composer/.gitignore +11 -0
- data/helpers/vendor/composer/composer/.php_cs +58 -0
- data/helpers/vendor/composer/composer/.travis.yml +76 -0
- data/helpers/vendor/composer/composer/CHANGELOG.md +808 -0
- data/helpers/vendor/composer/composer/LICENSE +19 -0
- data/helpers/vendor/composer/composer/PORTING_INFO +39 -0
- data/helpers/vendor/composer/composer/README.md +62 -0
- data/helpers/vendor/composer/composer/appveyor.yml +33 -0
- data/helpers/vendor/composer/composer/bin/compile +31 -0
- data/helpers/vendor/composer/composer/bin/composer +62 -0
- data/helpers/vendor/composer/composer/composer.json +81 -0
- data/helpers/vendor/composer/composer/composer.lock +1800 -0
- data/helpers/vendor/composer/composer/doc/00-intro.md +156 -0
- data/helpers/vendor/composer/composer/doc/01-basic-usage.md +266 -0
- data/helpers/vendor/composer/composer/doc/02-libraries.md +153 -0
- data/helpers/vendor/composer/composer/doc/03-cli.md +931 -0
- data/helpers/vendor/composer/composer/doc/04-schema.md +924 -0
- data/helpers/vendor/composer/composer/doc/05-repositories.md +713 -0
- data/helpers/vendor/composer/composer/doc/06-config.md +277 -0
- data/helpers/vendor/composer/composer/doc/07-community.md +35 -0
- data/helpers/vendor/composer/composer/doc/articles/aliases.md +105 -0
- data/helpers/vendor/composer/composer/doc/articles/autoloader-optimization.md +111 -0
- data/helpers/vendor/composer/composer/doc/articles/custom-installers.md +204 -0
- data/helpers/vendor/composer/composer/doc/articles/handling-private-packages-with-satis.md +343 -0
- data/helpers/vendor/composer/composer/doc/articles/http-basic-authentication.md +59 -0
- data/helpers/vendor/composer/composer/doc/articles/plugins.md +285 -0
- data/helpers/vendor/composer/composer/doc/articles/scripts.md +304 -0
- data/helpers/vendor/composer/composer/doc/articles/troubleshooting.md +309 -0
- data/helpers/vendor/composer/composer/doc/articles/vendor-binaries.md +110 -0
- data/helpers/vendor/composer/composer/doc/articles/versions.md +230 -0
- data/helpers/vendor/composer/composer/doc/dev/DefaultPolicy.md +55 -0
- data/helpers/vendor/composer/composer/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md +50 -0
- data/helpers/vendor/composer/composer/doc/faqs/how-to-install-composer-programmatically.md +42 -0
- data/helpers/vendor/composer/composer/doc/faqs/how-to-install-untrusted-packages-safely.md +19 -0
- data/helpers/vendor/composer/composer/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md +32 -0
- data/helpers/vendor/composer/composer/doc/faqs/which-version-numbering-system-does-composer-itself-use.md +4 -0
- data/helpers/vendor/composer/composer/doc/faqs/why-are-unbound-version-constraints-a-bad-idea.md +21 -0
- data/helpers/vendor/composer/composer/doc/faqs/why-are-version-constraints-combining-comparisons-and-wildcards-a-bad-idea.md +21 -0
- data/helpers/vendor/composer/composer/doc/faqs/why-can't-composer-load-repositories-recursively.md +35 -0
- data/helpers/vendor/composer/composer/doc/fixtures/fixtures.md +22 -0
- data/helpers/vendor/composer/composer/doc/fixtures/repo-composer-plain/packages.json +158 -0
- data/helpers/vendor/composer/composer/doc/fixtures/repo-composer-with-providers/p/bar/baz$923363b3c22e73abb2e3fd891c8156dd4d0821a97fd3e428bc910833e3e46dbe.json +50 -0
- data/helpers/vendor/composer/composer/doc/fixtures/repo-composer-with-providers/p/foo/bar$4baabb3303afa3e34a4d3af18fb138e5f3b79029c1f8d9ab5b477ea15776ba0a.json +77 -0
- data/helpers/vendor/composer/composer/doc/fixtures/repo-composer-with-providers/p/gar/nix$5d210670cb46c8364c8e3fb449967b9bea558b971e5b082f330ae4f1d484c321.json +50 -0
- data/helpers/vendor/composer/composer/doc/fixtures/repo-composer-with-providers/p/provider-active$1893a061e579543822389ecd12d791c612db0c05e22d90e9286e233cacd86ed8.json +16 -0
- data/helpers/vendor/composer/composer/doc/fixtures/repo-composer-with-providers/p/qux/quux$c142d1a07ca354be46b613f59f1d601923a5a00ccc5fcce50a77ecdd461eb72d.json +22 -0
- data/helpers/vendor/composer/composer/doc/fixtures/repo-composer-with-providers/packages.json +9 -0
- data/helpers/vendor/composer/composer/phpunit.xml.dist +35 -0
- data/helpers/vendor/composer/composer/res/composer-repository-schema.json +110 -0
- data/helpers/vendor/composer/composer/res/composer-schema.json +843 -0
- data/helpers/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php +1061 -0
- data/helpers/vendor/composer/composer/src/Composer/Autoload/ClassLoader.php +445 -0
- data/helpers/vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php +222 -0
- data/helpers/vendor/composer/composer/src/Composer/Cache.php +251 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/AboutCommand.php +46 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ArchiveCommand.php +166 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/BaseCommand.php +181 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/BaseDependencyCommand.php +255 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/CheckPlatformReqsCommand.php +156 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ClearCacheCommand.php +74 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ConfigCommand.php +707 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/CreateProjectCommand.php +385 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/DependsCommand.php +57 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/DiagnoseCommand.php +729 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/DumpAutoloadCommand.php +88 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ExecCommand.php +97 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/GlobalCommand.php +111 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/HomeCommand.php +168 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/InitCommand.php +808 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/InstallCommand.php +124 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/LicensesCommand.php +159 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/OutdatedCommand.php +95 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ProhibitsCommand.php +57 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/RemoveCommand.php +163 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/RequireCommand.php +258 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/RunScriptCommand.php +141 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ScriptAliasCommand.php +66 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/SearchCommand.php +83 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/SelfUpdateCommand.php +405 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ShowCommand.php +1015 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/StatusCommand.php +214 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/SuggestsCommand.php +152 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/UpdateCommand.php +228 -0
- data/helpers/vendor/composer/composer/src/Composer/Command/ValidateCommand.php +172 -0
- data/helpers/vendor/composer/composer/src/Composer/Compiler.php +284 -0
- data/helpers/vendor/composer/composer/src/Composer/Composer.php +283 -0
- data/helpers/vendor/composer/composer/src/Composer/Config.php +461 -0
- data/helpers/vendor/composer/composer/src/Composer/Config/ConfigSourceInterface.php +91 -0
- data/helpers/vendor/composer/composer/src/Composer/Config/JsonConfigSource.php +267 -0
- data/helpers/vendor/composer/composer/src/Composer/Console/Application.php +481 -0
- data/helpers/vendor/composer/composer/src/Composer/Console/HtmlOutputFormatter.php +90 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Decisions.php +211 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/DefaultPolicy.php +285 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/GenericRule.php +91 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Operation/InstallOperation.php +66 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Operation/MarkAliasInstalledOperation.php +67 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Operation/MarkAliasUninstalledOperation.php +67 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Operation/OperationInterface.php +42 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Operation/SolverOperation.php +50 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Operation/UninstallOperation.php +66 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Operation/UpdateOperation.php +80 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/PolicyInterface.php +27 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Pool.php +378 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Problem.php +253 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Request.php +78 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Rule.php +268 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Rule2Literals.php +113 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/RuleSet.php +176 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/RuleSetGenerator.php +372 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/RuleSetIterator.php +94 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchChain.php +52 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchGraph.php +144 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchNode.php +113 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Solver.php +874 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/SolverBugException.php +27 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/SolverProblemsException.php +88 -0
- data/helpers/vendor/composer/composer/src/Composer/DependencyResolver/Transaction.php +244 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/ArchiveDownloader.php +135 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/ChangeReportInterface.php +32 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/DownloadManager.php +325 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/DownloaderInterface.php +64 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/DvcsDownloaderInterface.php +32 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/FileDownloader.php +322 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/FilesystemException.php +26 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/FossilDownloader.php +116 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/GitDownloader.php +516 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/GzipDownloader.php +84 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/HgDownloader.php +100 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/PathDownloader.php +202 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/PearPackageExtractor.php +266 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/PerforceDownloader.php +114 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/PharDownloader.php +36 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/RarDownloader.php +91 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/SvnDownloader.php +225 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/TarDownloader.php +31 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/TransportException.php +53 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/VcsCapableDownloaderInterface.php +32 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/VcsDownloader.php +293 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/XzDownloader.php +60 -0
- data/helpers/vendor/composer/composer/src/Composer/Downloader/ZipDownloader.php +230 -0
- data/helpers/vendor/composer/composer/src/Composer/EventDispatcher/Event.php +103 -0
- data/helpers/vendor/composer/composer/src/Composer/EventDispatcher/EventDispatcher.php +536 -0
- data/helpers/vendor/composer/composer/src/Composer/EventDispatcher/EventSubscriberInterface.php +48 -0
- data/helpers/vendor/composer/composer/src/Composer/EventDispatcher/ScriptExecutionException.php +20 -0
- data/helpers/vendor/composer/composer/src/Composer/Exception/NoSslException.php +20 -0
- data/helpers/vendor/composer/composer/src/Composer/Factory.php +653 -0
- data/helpers/vendor/composer/composer/src/Composer/IO/BaseIO.php +255 -0
- data/helpers/vendor/composer/composer/src/Composer/IO/BufferIO.php +59 -0
- data/helpers/vendor/composer/composer/src/Composer/IO/ConsoleIO.php +322 -0
- data/helpers/vendor/composer/composer/src/Composer/IO/IOInterface.php +207 -0
- data/helpers/vendor/composer/composer/src/Composer/IO/NullIO.php +129 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer.php +1798 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/BinaryInstaller.php +214 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/BinaryPresenceInterface.php +30 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/InstallationManager.php +326 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/InstallerEvent.php +161 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/InstallerEvents.php +43 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/InstallerInterface.php +79 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/LibraryInstaller.php +232 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/MetapackageInstaller.php +100 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/NoopInstaller.php +88 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/PackageEvent.php +65 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/PackageEvents.php +75 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/PearBinaryInstaller.php +144 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/PearInstaller.php +84 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/PluginInstaller.php +84 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/ProjectInstaller.php +99 -0
- data/helpers/vendor/composer/composer/src/Composer/Installer/SuggestedPackagesReporter.php +151 -0
- data/helpers/vendor/composer/composer/src/Composer/Json/JsonFile.php +301 -0
- data/helpers/vendor/composer/composer/src/Composer/Json/JsonFormatter.php +134 -0
- data/helpers/vendor/composer/composer/src/Composer/Json/JsonManipulator.php +521 -0
- data/helpers/vendor/composer/composer/src/Composer/Json/JsonValidationException.php +34 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/AliasPackage.php +404 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/ArchivableFilesFilter.php +44 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/ArchivableFilesFinder.php +105 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/ArchiveManager.php +183 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/ArchiverInterface.php +43 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/BaseExcludeFilter.php +148 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/ComposerExcludeFilter.php +31 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/GitExcludeFilter.php +79 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/HgExcludeFilter.php +107 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/PharArchiver.php +97 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Archiver/ZipArchiver.php +74 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/BasePackage.php +251 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Comparer/Comparer.php +129 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/CompletePackage.php +199 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/CompletePackageInterface.php +95 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Dumper/ArrayDumper.php +151 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Link.php +128 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/LinkConstraint/EmptyConstraint.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/LinkConstraint/MultiConstraint.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/LinkConstraint/SpecificConstraint.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/LinkConstraint/VersionConstraint.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Loader/ArrayLoader.php +290 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Loader/InvalidPackageException.php +46 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Loader/JsonLoader.php +45 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Loader/LoaderInterface.php +30 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Loader/RootPackageLoader.php +264 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Loader/ValidatingArrayLoader.php +493 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Locker.php +438 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Package.php +612 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/PackageInterface.php +361 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/RootAliasPackage.php +173 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/RootPackage.php +136 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/RootPackageInterface.php +142 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Version/VersionGuesser.php +302 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Version/VersionParser.php +81 -0
- data/helpers/vendor/composer/composer/src/Composer/Package/Version/VersionSelector.php +176 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/Capability/Capability.php +23 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/Capability/CommandProvider.php +33 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/Capable.php +43 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/CommandEvent.php +88 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/PluginEvents.php +61 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/PluginInterface.php +39 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/PluginManager.php +403 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/PreCommandRunEvent.php +68 -0
- data/helpers/vendor/composer/composer/src/Composer/Plugin/PreFileDownloadEvent.php +78 -0
- data/helpers/vendor/composer/composer/src/Composer/Question/StrictConfirmationQuestion.php +94 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php +208 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/ArtifactRepository.php +167 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/BaseRepository.php +157 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php +829 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/CompositeRepository.php +164 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/ConfigurableRepositoryInterface.php +23 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/FilesystemRepository.php +97 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/InstalledArrayRepository.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/InstalledFilesystemRepository.php +22 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/InstalledRepositoryInterface.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/InvalidRepositoryException.php +22 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/PackageRepository.php +61 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/PathRepository.php +190 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/BaseChannelReader.php +82 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/ChannelInfo.php +67 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/ChannelReader.php +101 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/ChannelRest10Reader.php +164 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/ChannelRest11Reader.php +139 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/DependencyConstraint.php +60 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/DependencyInfo.php +50 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/PackageDependencyParser.php +317 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/PackageInfo.php +94 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Pear/ReleaseInfo.php +50 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/PearRepository.php +198 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/PlatformRepository.php +342 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/RepositoryFactory.php +169 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/RepositoryInterface.php +74 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/RepositoryManager.php +177 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/RepositorySecurityException.php +22 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/BitbucketDriver.php +445 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/FossilDriver.php +238 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/GitBitbucketDriver.php +91 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/GitDriver.php +222 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/GitHubDriver.php +472 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/GitLabDriver.php +511 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/HgBitbucketDriver.php +91 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/HgDriver.php +230 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/PerforceDriver.php +181 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/SvnDriver.php +397 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/VcsDriver.php +175 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/Vcs/VcsDriverInterface.php +117 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/VcsRepository.php +407 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/VersionCacheInterface.php +23 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/WritableArrayRepository.php +66 -0
- data/helpers/vendor/composer/composer/src/Composer/Repository/WritableRepositoryInterface.php +54 -0
- data/helpers/vendor/composer/composer/src/Composer/Script/CommandEvent.php +22 -0
- data/helpers/vendor/composer/composer/src/Composer/Script/Event.php +89 -0
- data/helpers/vendor/composer/composer/src/Composer/Script/PackageEvent.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Script/ScriptEvents.php +193 -0
- data/helpers/vendor/composer/composer/src/Composer/SelfUpdate/Keys.php +36 -0
- data/helpers/vendor/composer/composer/src/Composer/SelfUpdate/Versions.php +75 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/AuthHelper.php +63 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Bitbucket.php +245 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/ComposerMirror.php +57 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/ConfigValidator.php +191 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/ErrorHandler.php +79 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Filesystem.php +715 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Git.php +374 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/GitHub.php +180 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/GitLab.php +163 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Hg.php +94 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/IniHelper.php +64 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/NoProxyPattern.php +147 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Perforce.php +581 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Platform.php +92 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/ProcessExecutor.php +192 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php +1109 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Silencer.php +78 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/SpdxLicense.php +24 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/StreamContextFactory.php +177 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Svn.php +381 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/TlsHelper.php +204 -0
- data/helpers/vendor/composer/composer/src/Composer/Util/Url.php +55 -0
- data/helpers/vendor/composer/composer/src/Composer/XdebugHandler.php +31 -0
- data/helpers/vendor/composer/composer/src/bootstrap.php +24 -0
- data/helpers/vendor/composer/installed.json +947 -0
- data/helpers/vendor/composer/semver/CHANGELOG.md +72 -0
- data/helpers/vendor/composer/semver/LICENSE +19 -0
- data/helpers/vendor/composer/semver/README.md +70 -0
- data/helpers/vendor/composer/semver/composer.json +58 -0
- data/helpers/vendor/composer/semver/src/Comparator.php +111 -0
- data/helpers/vendor/composer/semver/src/Constraint/AbstractConstraint.php +63 -0
- data/helpers/vendor/composer/semver/src/Constraint/Constraint.php +219 -0
- data/helpers/vendor/composer/semver/src/Constraint/ConstraintInterface.php +32 -0
- data/helpers/vendor/composer/semver/src/Constraint/EmptyConstraint.php +59 -0
- data/helpers/vendor/composer/semver/src/Constraint/MultiConstraint.php +120 -0
- data/helpers/vendor/composer/semver/src/Semver.php +127 -0
- data/helpers/vendor/composer/semver/src/VersionParser.php +540 -0
- data/helpers/vendor/composer/spdx-licenses/.php_cs.dist +59 -0
- data/helpers/vendor/composer/spdx-licenses/CHANGELOG.md +89 -0
- data/helpers/vendor/composer/spdx-licenses/LICENSE +19 -0
- data/helpers/vendor/composer/spdx-licenses/README.md +69 -0
- data/helpers/vendor/composer/spdx-licenses/composer.json +56 -0
- data/helpers/vendor/composer/spdx-licenses/res/spdx-exceptions.json +101 -0
- data/helpers/vendor/composer/spdx-licenses/res/spdx-licenses.json +1932 -0
- data/helpers/vendor/composer/spdx-licenses/src/SpdxLicenses.php +343 -0
- data/helpers/vendor/composer/xdebug-handler/CHANGELOG.md +55 -0
- data/helpers/vendor/composer/xdebug-handler/LICENSE +21 -0
- data/helpers/vendor/composer/xdebug-handler/README.md +288 -0
- data/helpers/vendor/composer/xdebug-handler/composer.json +40 -0
- data/helpers/vendor/composer/xdebug-handler/src/PhpConfig.php +73 -0
- data/helpers/vendor/composer/xdebug-handler/src/Process.php +160 -0
- data/helpers/vendor/composer/xdebug-handler/src/Status.php +163 -0
- data/helpers/vendor/composer/xdebug-handler/src/XdebugHandler.php +565 -0
- data/helpers/vendor/justinrainbow/json-schema/.gitattributes +5 -0
- data/helpers/vendor/justinrainbow/json-schema/.php_cs.dist +30 -0
- data/helpers/vendor/justinrainbow/json-schema/LICENSE +21 -0
- data/helpers/vendor/justinrainbow/json-schema/README.md +206 -0
- data/helpers/vendor/justinrainbow/json-schema/bin/validate-json +251 -0
- data/helpers/vendor/justinrainbow/json-schema/composer.json +76 -0
- data/helpers/vendor/justinrainbow/json-schema/demo/README.md +14 -0
- data/helpers/vendor/justinrainbow/json-schema/demo/data.json +3 -0
- data/helpers/vendor/justinrainbow/json-schema/demo/demo.php +18 -0
- data/helpers/vendor/justinrainbow/json-schema/demo/schema.json +3 -0
- data/helpers/vendor/justinrainbow/json-schema/dist/schema/json-schema-draft-03.json +174 -0
- data/helpers/vendor/justinrainbow/json-schema/dist/schema/json-schema-draft-04.json +150 -0
- data/helpers/vendor/justinrainbow/json-schema/phpunit.xml.dist +26 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/BaseConstraint.php +148 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php +121 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php +213 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ConstraintInterface.php +65 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/EnumConstraint.php +54 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Factory.php +220 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/FormatConstraint.php +214 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/NumberConstraint.php +81 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/ObjectConstraint.php +192 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/SchemaConstraint.php +94 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/StringConstraint.php +60 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php +68 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php +40 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeCheck/TypeCheckInterface.php +18 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/TypeConstraint.php +261 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php +413 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Entity/JsonPointer.php +161 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/ExceptionInterface.php +7 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidArgumentException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidConfigException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSchemaException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSchemaMediaTypeException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/InvalidSourceUriException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/JsonDecodingException.php +40 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/ResourceNotFoundException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/RuntimeException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/UnresolvableJsonPointerException.php +19 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/UriResolverException.php +17 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Exception/ValidationException.php +14 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Iterator/ObjectIterator.php +149 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Rfc3339.php +30 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorage.php +169 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorageInterface.php +41 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/AbstractRetriever.php +34 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/Curl.php +83 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/FileGetContents.php +93 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/PredefinedArray.php +56 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php +36 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php +175 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriRetriever.php +349 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/UriResolverInterface.php +26 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/UriRetrieverInterface.php +26 -0
- data/helpers/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php +90 -0
- data/helpers/vendor/psr/log/.gitignore +1 -0
- data/helpers/vendor/psr/log/LICENSE +19 -0
- data/helpers/vendor/psr/log/Psr/Log/AbstractLogger.php +128 -0
- data/helpers/vendor/psr/log/Psr/Log/InvalidArgumentException.php +7 -0
- data/helpers/vendor/psr/log/Psr/Log/LogLevel.php +18 -0
- data/helpers/vendor/psr/log/Psr/Log/LoggerAwareInterface.php +18 -0
- data/helpers/vendor/psr/log/Psr/Log/LoggerAwareTrait.php +26 -0
- data/helpers/vendor/psr/log/Psr/Log/LoggerInterface.php +123 -0
- data/helpers/vendor/psr/log/Psr/Log/LoggerTrait.php +140 -0
- data/helpers/vendor/psr/log/Psr/Log/NullLogger.php +28 -0
- data/helpers/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +144 -0
- data/helpers/vendor/psr/log/Psr/Log/Test/TestLogger.php +146 -0
- data/helpers/vendor/psr/log/README.md +52 -0
- data/helpers/vendor/psr/log/composer.json +26 -0
- data/helpers/vendor/seld/jsonlint/.gitignore +3 -0
- data/helpers/vendor/seld/jsonlint/.travis.yml +25 -0
- data/helpers/vendor/seld/jsonlint/CHANGELOG.md +66 -0
- data/helpers/vendor/seld/jsonlint/LICENSE +19 -0
- data/helpers/vendor/seld/jsonlint/README.md +89 -0
- data/helpers/vendor/seld/jsonlint/bin/jsonlint +117 -0
- data/helpers/vendor/seld/jsonlint/composer.json +24 -0
- data/helpers/vendor/seld/jsonlint/phpunit.xml.dist +25 -0
- data/helpers/vendor/seld/jsonlint/src/Seld/JsonLint/DuplicateKeyException.php +26 -0
- data/helpers/vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php +502 -0
- data/helpers/vendor/seld/jsonlint/src/Seld/JsonLint/Lexer.php +217 -0
- data/helpers/vendor/seld/jsonlint/src/Seld/JsonLint/ParsingException.php +28 -0
- data/helpers/vendor/seld/jsonlint/src/Seld/JsonLint/Undefined.php +16 -0
- data/helpers/vendor/seld/jsonlint/tests/JsonParserTest.php +230 -0
- data/helpers/vendor/seld/jsonlint/tests/bom.json +6 -0
- data/helpers/vendor/seld/jsonlint/tests/bootstrap.php +13 -0
- data/helpers/vendor/seld/phar-utils/.gitignore +1 -0
- data/helpers/vendor/seld/phar-utils/LICENSE +19 -0
- data/helpers/vendor/seld/phar-utils/README.md +39 -0
- data/helpers/vendor/seld/phar-utils/composer.json +26 -0
- data/helpers/vendor/seld/phar-utils/composer.lock +19 -0
- data/helpers/vendor/seld/phar-utils/src/Timestamps.php +192 -0
- data/helpers/vendor/symfony/console/.gitignore +3 -0
- data/helpers/vendor/symfony/console/Application.php +1181 -0
- data/helpers/vendor/symfony/console/CHANGELOG.md +140 -0
- data/helpers/vendor/symfony/console/Command/Command.php +654 -0
- data/helpers/vendor/symfony/console/Command/HelpCommand.php +81 -0
- data/helpers/vendor/symfony/console/Command/ListCommand.php +90 -0
- data/helpers/vendor/symfony/console/Command/LockableTrait.php +71 -0
- data/helpers/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php +37 -0
- data/helpers/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php +55 -0
- data/helpers/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php +62 -0
- data/helpers/vendor/symfony/console/ConsoleEvents.php +47 -0
- data/helpers/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +98 -0
- data/helpers/vendor/symfony/console/Descriptor/ApplicationDescription.php +144 -0
- data/helpers/vendor/symfony/console/Descriptor/Descriptor.php +107 -0
- data/helpers/vendor/symfony/console/Descriptor/DescriptorInterface.php +31 -0
- data/helpers/vendor/symfony/console/Descriptor/JsonDescriptor.php +168 -0
- data/helpers/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +182 -0
- data/helpers/vendor/symfony/console/Descriptor/TextDescriptor.php +342 -0
- data/helpers/vendor/symfony/console/Descriptor/XmlDescriptor.php +245 -0
- data/helpers/vendor/symfony/console/Event/ConsoleCommandEvent.php +60 -0
- data/helpers/vendor/symfony/console/Event/ConsoleErrorEvent.php +58 -0
- data/helpers/vendor/symfony/console/Event/ConsoleEvent.php +67 -0
- data/helpers/vendor/symfony/console/Event/ConsoleTerminateEvent.php +53 -0
- data/helpers/vendor/symfony/console/EventListener/ErrorListener.php +91 -0
- data/helpers/vendor/symfony/console/Exception/CommandNotFoundException.php +43 -0
- data/helpers/vendor/symfony/console/Exception/ExceptionInterface.php +21 -0
- data/helpers/vendor/symfony/console/Exception/InvalidArgumentException.php +19 -0
- data/helpers/vendor/symfony/console/Exception/InvalidOptionException.php +21 -0
- data/helpers/vendor/symfony/console/Exception/LogicException.php +19 -0
- data/helpers/vendor/symfony/console/Exception/NamespaceNotFoundException.php +21 -0
- data/helpers/vendor/symfony/console/Exception/RuntimeException.php +19 -0
- data/helpers/vendor/symfony/console/Formatter/OutputFormatter.php +282 -0
- data/helpers/vendor/symfony/console/Formatter/OutputFormatterInterface.php +71 -0
- data/helpers/vendor/symfony/console/Formatter/OutputFormatterStyle.php +203 -0
- data/helpers/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php +62 -0
- data/helpers/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +110 -0
- data/helpers/vendor/symfony/console/Formatter/WrappableOutputFormatterInterface.php +25 -0
- data/helpers/vendor/symfony/console/Helper/DebugFormatterHelper.php +127 -0
- data/helpers/vendor/symfony/console/Helper/DescriptorHelper.php +94 -0
- data/helpers/vendor/symfony/console/Helper/FormatterHelper.php +106 -0
- data/helpers/vendor/symfony/console/Helper/Helper.php +138 -0
- data/helpers/vendor/symfony/console/Helper/HelperInterface.php +39 -0
- data/helpers/vendor/symfony/console/Helper/HelperSet.php +108 -0
- data/helpers/vendor/symfony/console/Helper/InputAwareHelper.php +33 -0
- data/helpers/vendor/symfony/console/Helper/ProcessHelper.php +156 -0
- data/helpers/vendor/symfony/console/Helper/ProgressBar.php +527 -0
- data/helpers/vendor/symfony/console/Helper/ProgressIndicator.php +269 -0
- data/helpers/vendor/symfony/console/Helper/QuestionHelper.php +447 -0
- data/helpers/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +96 -0
- data/helpers/vendor/symfony/console/Helper/Table.php +813 -0
- data/helpers/vendor/symfony/console/Helper/TableCell.php +68 -0
- data/helpers/vendor/symfony/console/Helper/TableRows.php +32 -0
- data/helpers/vendor/symfony/console/Helper/TableSeparator.php +25 -0
- data/helpers/vendor/symfony/console/Helper/TableStyle.php +458 -0
- data/helpers/vendor/symfony/console/Input/ArgvInput.php +365 -0
- data/helpers/vendor/symfony/console/Input/ArrayInput.php +206 -0
- data/helpers/vendor/symfony/console/Input/Input.php +203 -0
- data/helpers/vendor/symfony/console/Input/InputArgument.php +129 -0
- data/helpers/vendor/symfony/console/Input/InputAwareInterface.php +26 -0
- data/helpers/vendor/symfony/console/Input/InputDefinition.php +404 -0
- data/helpers/vendor/symfony/console/Input/InputInterface.php +163 -0
- data/helpers/vendor/symfony/console/Input/InputOption.php +208 -0
- data/helpers/vendor/symfony/console/Input/StreamableInputInterface.php +37 -0
- data/helpers/vendor/symfony/console/Input/StringInput.php +72 -0
- data/helpers/vendor/symfony/console/LICENSE +19 -0
- data/helpers/vendor/symfony/console/Logger/ConsoleLogger.php +124 -0
- data/helpers/vendor/symfony/console/Output/BufferedOutput.php +45 -0
- data/helpers/vendor/symfony/console/Output/ConsoleOutput.php +161 -0
- data/helpers/vendor/symfony/console/Output/ConsoleOutputInterface.php +32 -0
- data/helpers/vendor/symfony/console/Output/ConsoleSectionOutput.php +141 -0
- data/helpers/vendor/symfony/console/Output/NullOutput.php +123 -0
- data/helpers/vendor/symfony/console/Output/Output.php +177 -0
- data/helpers/vendor/symfony/console/Output/OutputInterface.php +114 -0
- data/helpers/vendor/symfony/console/Output/StreamOutput.php +124 -0
- data/helpers/vendor/symfony/console/Question/ChoiceQuestion.php +184 -0
- data/helpers/vendor/symfony/console/Question/ConfirmationQuestion.php +59 -0
- data/helpers/vendor/symfony/console/Question/Question.php +246 -0
- data/helpers/vendor/symfony/console/README.md +20 -0
- data/helpers/vendor/symfony/console/Resources/bin/hiddeninput.exe +0 -0
- data/helpers/vendor/symfony/console/Style/OutputStyle.php +155 -0
- data/helpers/vendor/symfony/console/Style/StyleInterface.php +154 -0
- data/helpers/vendor/symfony/console/Style/SymfonyStyle.php +438 -0
- data/helpers/vendor/symfony/console/Terminal.php +137 -0
- data/helpers/vendor/symfony/console/Tester/ApplicationTester.php +77 -0
- data/helpers/vendor/symfony/console/Tester/CommandTester.php +78 -0
- data/helpers/vendor/symfony/console/Tester/TesterTrait.php +177 -0
- data/helpers/vendor/symfony/console/Tests/ApplicationTest.php +1814 -0
- data/helpers/vendor/symfony/console/Tests/Command/CommandTest.php +436 -0
- data/helpers/vendor/symfony/console/Tests/Command/HelpCommandTest.php +71 -0
- data/helpers/vendor/symfony/console/Tests/Command/ListCommandTest.php +113 -0
- data/helpers/vendor/symfony/console/Tests/Command/LockableTraitTest.php +67 -0
- data/helpers/vendor/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php +61 -0
- data/helpers/vendor/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php +60 -0
- data/helpers/vendor/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php +258 -0
- data/helpers/vendor/symfony/console/Tests/Descriptor/AbstractDescriptorTest.php +107 -0
- data/helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php +35 -0
- data/helpers/vendor/symfony/console/Tests/Descriptor/MarkdownDescriptorTest.php +45 -0
- data/helpers/vendor/symfony/console/Tests/Descriptor/ObjectsProvider.php +82 -0
- data/helpers/vendor/symfony/console/Tests/Descriptor/TextDescriptorTest.php +53 -0
- data/helpers/vendor/symfony/console/Tests/Descriptor/XmlDescriptorTest.php +27 -0
- data/helpers/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php +156 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/BarBucCommand.php +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorApplication1.php +18 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorApplication2.php +26 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorApplicationMbString.php +24 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorCommand1.php +27 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorCommand2.php +32 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorCommand3.php +27 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorCommand4.php +25 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DescriptorCommandMbString.php +32 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/DummyOutput.php +36 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Foo1Command.php +26 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Foo2Command.php +21 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Foo3Command.php +29 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Foo4Command.php +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Foo5Command.php +10 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Foo6Command.php +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooCommand.php +33 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooLock2Command.php +28 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooLockCommand.php +27 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooOptCommand.php +36 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooSubnamespaced1Command.php +26 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooSubnamespaced2Command.php +26 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FooWithoutAliasCommand.php +21 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/FoobarCommand.php +25 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php +13 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php +17 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php +12 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php +13 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php +14 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php +17 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php +14 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php +15 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php +13 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php +16 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php +12 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php +34 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_4_with_iterators.php +34 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php +37 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php +16 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php +15 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php +26 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php +19 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/interactive_output_1.txt +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_0.txt +3 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_1.txt +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_10.txt +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_11.txt +4 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_12.txt +6 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_13.txt +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_14.txt +6 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_15.txt +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_16.txt +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_17.txt +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt +13 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_3.txt +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_4.txt +32 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_4_with_iterators.txt +32 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_5.txt +18 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_6.txt +6 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_7.txt +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_8.txt +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_9.txt +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/TestCommand.php +28 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/TestTiti.php +21 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/TestToto.php +22 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_1.json +156 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_1.md +172 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_1.txt +17 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_1.xml +104 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_2.json +509 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_2.md +431 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_2.txt +21 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_2.xml +254 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_filtered_namespace.txt +16 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_gethelp.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_mbstring.md +269 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_mbstring.txt +19 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception1.txt +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception2.txt +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt +18 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt +18 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt +6 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception_escapeslines.txt +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_renderexception_linebreaks.txt +11 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_run1.txt +17 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_run2.txt +29 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_run3.txt +29 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/application_run4.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_1.json +15 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_1.md +12 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_1.txt +10 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_1.xml +12 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_2.json +33 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_2.md +29 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_2.txt +16 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_2.xml +21 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_mbstring.md +29 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/command_mbstring.txt +16 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_1.json +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_1.md +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_1.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_1.xml +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_2.json +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_2.md +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_2.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_2.xml +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_3.json +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_3.md +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_3.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_3.xml +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_4.json +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_4.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_4.txt +2 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_4.xml +6 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.json +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.md +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.xml +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_style.json +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_style.md +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_style.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_argument_with_style.xml +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_1.json +4 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_1.md +0 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_1.txt +0 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_1.xml +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_2.json +12 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_2.md +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_2.txt +2 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_2.xml +10 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_3.json +14 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_3.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_3.txt +2 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_3.xml +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_4.json +22 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_4.md +16 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_4.txt +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_definition_4.xml +14 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_1.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_1.md +6 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_1.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_1.xml +4 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_2.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_2.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_2.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_2.xml +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_3.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_3.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_3.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_3.xml +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_4.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_4.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_4.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_4.xml +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_5.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_5.md +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_5.txt +2 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_5.xml +6 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_6.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_6.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_6.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_6.xml +5 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.xml +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style.json +9 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style.xml +7 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style_array.json +12 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style_array.md +8 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style_array.txt +1 -0
- data/helpers/vendor/symfony/console/Tests/Fixtures/input_option_with_style_array.xml +8 -0
- data/helpers/vendor/symfony/console/Tests/Formatter/OutputFormatterStyleStackTest.php +71 -0
- data/helpers/vendor/symfony/console/Tests/Formatter/OutputFormatterStyleTest.php +100 -0
- data/helpers/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php +355 -0
- data/helpers/vendor/symfony/console/Tests/Helper/AbstractQuestionHelperTest.php +34 -0
- data/helpers/vendor/symfony/console/Tests/Helper/FormatterHelperTest.php +129 -0
- data/helpers/vendor/symfony/console/Tests/Helper/HelperSetTest.php +127 -0
- data/helpers/vendor/symfony/console/Tests/Helper/HelperTest.php +55 -0
- data/helpers/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php +133 -0
- data/helpers/vendor/symfony/console/Tests/Helper/ProgressBarTest.php +912 -0
- data/helpers/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php +183 -0
- data/helpers/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php +715 -0
- data/helpers/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php +168 -0
- data/helpers/vendor/symfony/console/Tests/Helper/TableStyleTest.php +28 -0
- data/helpers/vendor/symfony/console/Tests/Helper/TableTest.php +1199 -0
- data/helpers/vendor/symfony/console/Tests/Input/ArgvInputTest.php +466 -0
- data/helpers/vendor/symfony/console/Tests/Input/ArrayInputTest.php +177 -0
- data/helpers/vendor/symfony/console/Tests/Input/InputArgumentTest.php +103 -0
- data/helpers/vendor/symfony/console/Tests/Input/InputDefinitionTest.php +407 -0
- data/helpers/vendor/symfony/console/Tests/Input/InputOptionTest.php +196 -0
- data/helpers/vendor/symfony/console/Tests/Input/InputTest.php +149 -0
- data/helpers/vendor/symfony/console/Tests/Input/StringInputTest.php +87 -0
- data/helpers/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php +215 -0
- data/helpers/vendor/symfony/console/Tests/Output/ConsoleOutputTest.php +42 -0
- data/helpers/vendor/symfony/console/Tests/Output/ConsoleSectionOutputTest.php +163 -0
- data/helpers/vendor/symfony/console/Tests/Output/NullOutputTest.php +88 -0
- data/helpers/vendor/symfony/console/Tests/Output/OutputTest.php +189 -0
- data/helpers/vendor/symfony/console/Tests/Output/StreamOutputTest.php +61 -0
- data/helpers/vendor/symfony/console/Tests/Question/ConfirmationQuestionTest.php +62 -0
- data/helpers/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php +118 -0
- data/helpers/vendor/symfony/console/Tests/TerminalTest.php +59 -0
- data/helpers/vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php +113 -0
- data/helpers/vendor/symfony/console/Tests/Tester/CommandTesterTest.php +235 -0
- data/helpers/vendor/symfony/console/composer.json +56 -0
- data/helpers/vendor/symfony/console/phpunit.xml.dist +41 -0
- data/helpers/vendor/symfony/contracts/.gitignore +3 -0
- data/helpers/vendor/symfony/contracts/CHANGELOG.md +12 -0
- data/helpers/vendor/symfony/contracts/Cache/CacheInterface.php +57 -0
- data/helpers/vendor/symfony/contracts/Cache/CacheTrait.php +71 -0
- data/helpers/vendor/symfony/contracts/Cache/CallbackInterface.php +30 -0
- data/helpers/vendor/symfony/contracts/Cache/ItemInterface.php +60 -0
- data/helpers/vendor/symfony/contracts/Cache/TagAwareCacheInterface.php +38 -0
- data/helpers/vendor/symfony/contracts/LICENSE +19 -0
- data/helpers/vendor/symfony/contracts/README.md +70 -0
- data/helpers/vendor/symfony/contracts/Service/ResetInterface.php +30 -0
- data/helpers/vendor/symfony/contracts/Service/ServiceLocatorTrait.php +97 -0
- data/helpers/vendor/symfony/contracts/Service/ServiceSubscriberInterface.php +53 -0
- data/helpers/vendor/symfony/contracts/Service/ServiceSubscriberTrait.php +61 -0
- data/helpers/vendor/symfony/contracts/Tests/Cache/CacheTraitTest.php +165 -0
- data/helpers/vendor/symfony/contracts/Tests/Service/ServiceLocatorTest.php +94 -0
- data/helpers/vendor/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php +65 -0
- data/helpers/vendor/symfony/contracts/Tests/Translation/TranslatorTest.php +353 -0
- data/helpers/vendor/symfony/contracts/Translation/LocaleAwareInterface.php +31 -0
- data/helpers/vendor/symfony/contracts/Translation/TranslatorInterface.php +65 -0
- data/helpers/vendor/symfony/contracts/Translation/TranslatorTrait.php +255 -0
- data/helpers/vendor/symfony/contracts/composer.json +44 -0
- data/helpers/vendor/symfony/contracts/phpunit.xml.dist +31 -0
- data/helpers/vendor/symfony/filesystem/.gitignore +3 -0
- data/helpers/vendor/symfony/filesystem/CHANGELOG.md +59 -0
- data/helpers/vendor/symfony/filesystem/Exception/ExceptionInterface.php +21 -0
- data/helpers/vendor/symfony/filesystem/Exception/FileNotFoundException.php +34 -0
- data/helpers/vendor/symfony/filesystem/Exception/IOException.php +39 -0
- data/helpers/vendor/symfony/filesystem/Exception/IOExceptionInterface.php +27 -0
- data/helpers/vendor/symfony/filesystem/Exception/InvalidArgumentException.php +19 -0
- data/helpers/vendor/symfony/filesystem/Filesystem.php +767 -0
- data/helpers/vendor/symfony/filesystem/LICENSE +19 -0
- data/helpers/vendor/symfony/filesystem/README.md +13 -0
- data/helpers/vendor/symfony/filesystem/Tests/ExceptionTest.php +47 -0
- data/helpers/vendor/symfony/filesystem/Tests/FilesystemTest.php +1686 -0
- data/helpers/vendor/symfony/filesystem/Tests/FilesystemTestCase.php +166 -0
- data/helpers/vendor/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php +46 -0
- data/helpers/vendor/symfony/filesystem/composer.json +34 -0
- data/helpers/vendor/symfony/filesystem/phpunit.xml.dist +30 -0
- data/helpers/vendor/symfony/finder/.gitignore +3 -0
- data/helpers/vendor/symfony/finder/CHANGELOG.md +69 -0
- data/helpers/vendor/symfony/finder/Comparator/Comparator.php +98 -0
- data/helpers/vendor/symfony/finder/Comparator/DateComparator.php +51 -0
- data/helpers/vendor/symfony/finder/Comparator/NumberComparator.php +79 -0
- data/helpers/vendor/symfony/finder/Exception/AccessDeniedException.php +19 -0
- data/helpers/vendor/symfony/finder/Finder.php +783 -0
- data/helpers/vendor/symfony/finder/Glob.php +116 -0
- data/helpers/vendor/symfony/finder/Iterator/CustomFilterIterator.php +61 -0
- data/helpers/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +58 -0
- data/helpers/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +45 -0
- data/helpers/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +84 -0
- data/helpers/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +53 -0
- data/helpers/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +58 -0
- data/helpers/vendor/symfony/finder/Iterator/FilenameFilterIterator.php +47 -0
- data/helpers/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +112 -0
- data/helpers/vendor/symfony/finder/Iterator/PathFilterIterator.php +56 -0
- data/helpers/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +140 -0
- data/helpers/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +57 -0
- data/helpers/vendor/symfony/finder/Iterator/SortableIterator.php +99 -0
- data/helpers/vendor/symfony/finder/LICENSE +19 -0
- data/helpers/vendor/symfony/finder/README.md +14 -0
- data/helpers/vendor/symfony/finder/SplFileInfo.php +78 -0
- data/helpers/vendor/symfony/finder/Tests/Comparator/ComparatorTest.php +65 -0
- data/helpers/vendor/symfony/finder/Tests/Comparator/DateComparatorTest.php +64 -0
- data/helpers/vendor/symfony/finder/Tests/Comparator/NumberComparatorTest.php +108 -0
- data/helpers/vendor/symfony/finder/Tests/FinderTest.php +1384 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/.dot/a +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/.dot/b/c.neon +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/.dot/b/d.neon +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/A/B/C/abc.dat +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/A/B/ab.dat +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/A/a.dat +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/copy/A/B/ab.dat.copy +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/copy/A/a.dat.copy +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/dolor.txt +2 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/ipsum.txt +2 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/lorem.txt +2 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/one/.dot +1 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/one/a +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/one/b/c.neon +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/one/b/d.neon +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/r+e.gex[c]a(r)s/dir/bar.dat +0 -0
- data/helpers/vendor/symfony/finder/Tests/Fixtures/with space/foo.txt b/data/helpers/vendor/symfony/finder/Tests/Fixtures/with → space/foo.txt +0 -0
- data/helpers/vendor/symfony/finder/Tests/GlobTest.php +95 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/CustomFilterIteratorTest.php +46 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php +92 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/DepthRangeFilterIteratorTest.php +103 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php +107 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/FileTypeFilterIteratorTest.php +82 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/FilecontentFilterIteratorTest.php +86 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/FilenameFilterIteratorTest.php +54 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/Iterator.php +55 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php +100 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/MockFileListIterator.php +21 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php +132 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php +71 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php +82 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php +128 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +59 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php +70 -0
- data/helpers/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php +262 -0
- data/helpers/vendor/symfony/finder/composer.json +33 -0
- data/helpers/vendor/symfony/finder/phpunit.xml.dist +30 -0
- data/helpers/vendor/symfony/polyfill-ctype/Ctype.php +227 -0
- data/helpers/vendor/symfony/polyfill-ctype/LICENSE +19 -0
- data/helpers/vendor/symfony/polyfill-ctype/README.md +12 -0
- data/helpers/vendor/symfony/polyfill-ctype/bootstrap.php +26 -0
- data/helpers/vendor/symfony/polyfill-ctype/composer.json +34 -0
- data/helpers/vendor/symfony/polyfill-mbstring/LICENSE +19 -0
- data/helpers/vendor/symfony/polyfill-mbstring/Mbstring.php +800 -0
- data/helpers/vendor/symfony/polyfill-mbstring/README.md +13 -0
- data/helpers/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +1096 -0
- data/helpers/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +5 -0
- data/helpers/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +1104 -0
- data/helpers/vendor/symfony/polyfill-mbstring/bootstrap.php +58 -0
- data/helpers/vendor/symfony/polyfill-mbstring/composer.json +34 -0
- data/helpers/vendor/symfony/process/.gitignore +3 -0
- data/helpers/vendor/symfony/process/CHANGELOG.md +90 -0
- data/helpers/vendor/symfony/process/Exception/ExceptionInterface.php +21 -0
- data/helpers/vendor/symfony/process/Exception/InvalidArgumentException.php +21 -0
- data/helpers/vendor/symfony/process/Exception/LogicException.php +21 -0
- data/helpers/vendor/symfony/process/Exception/ProcessFailedException.php +54 -0
- data/helpers/vendor/symfony/process/Exception/ProcessSignaledException.php +41 -0
- data/helpers/vendor/symfony/process/Exception/ProcessTimedOutException.php +69 -0
- data/helpers/vendor/symfony/process/Exception/RuntimeException.php +21 -0
- data/helpers/vendor/symfony/process/ExecutableFinder.php +88 -0
- data/helpers/vendor/symfony/process/InputStream.php +90 -0
- data/helpers/vendor/symfony/process/LICENSE +19 -0
- data/helpers/vendor/symfony/process/PhpExecutableFinder.php +101 -0
- data/helpers/vendor/symfony/process/PhpProcess.php +75 -0
- data/helpers/vendor/symfony/process/Pipes/AbstractPipes.php +178 -0
- data/helpers/vendor/symfony/process/Pipes/PipesInterface.php +67 -0
- data/helpers/vendor/symfony/process/Pipes/UnixPipes.php +153 -0
- data/helpers/vendor/symfony/process/Pipes/WindowsPipes.php +191 -0
- data/helpers/vendor/symfony/process/Process.php +1652 -0
- data/helpers/vendor/symfony/process/ProcessUtils.php +69 -0
- data/helpers/vendor/symfony/process/README.md +13 -0
- data/helpers/vendor/symfony/process/Tests/ExecutableFinderTest.php +178 -0
- data/helpers/vendor/symfony/process/Tests/KillableProcessWithOutput.php +25 -0
- data/helpers/vendor/symfony/process/Tests/NonStopableProcess.php +47 -0
- data/helpers/vendor/symfony/process/Tests/PhpExecutableFinderTest.php +49 -0
- data/helpers/vendor/symfony/process/Tests/PhpProcessTest.php +63 -0
- data/helpers/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php +72 -0
- data/helpers/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php +137 -0
- data/helpers/vendor/symfony/process/Tests/ProcessTest.php +1537 -0
- data/helpers/vendor/symfony/process/Tests/SignalListener.php +21 -0
- data/helpers/vendor/symfony/process/composer.json +33 -0
- data/helpers/vendor/symfony/process/phpunit.xml.dist +30 -0
- metadata +902 -3
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2004-2019 Fabien Potencier
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is furnished
|
8
|
+
to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Filesystem Component
|
2
|
+
====================
|
3
|
+
|
4
|
+
The Filesystem component provides basic utilities for the filesystem.
|
5
|
+
|
6
|
+
Resources
|
7
|
+
---------
|
8
|
+
|
9
|
+
* [Documentation](https://symfony.com/doc/current/components/filesystem/index.html)
|
10
|
+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
|
11
|
+
* [Report issues](https://github.com/symfony/symfony/issues) and
|
12
|
+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
|
13
|
+
in the [main Symfony repository](https://github.com/symfony/symfony)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/*
|
4
|
+
* This file is part of the Symfony package.
|
5
|
+
*
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7
|
+
*
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
9
|
+
* file that was distributed with this source code.
|
10
|
+
*/
|
11
|
+
|
12
|
+
namespace Symfony\Component\Filesystem\Tests;
|
13
|
+
|
14
|
+
use PHPUnit\Framework\TestCase;
|
15
|
+
use Symfony\Component\Filesystem\Exception\FileNotFoundException;
|
16
|
+
use Symfony\Component\Filesystem\Exception\IOException;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Test class for Filesystem.
|
20
|
+
*/
|
21
|
+
class ExceptionTest extends TestCase
|
22
|
+
{
|
23
|
+
public function testGetPath()
|
24
|
+
{
|
25
|
+
$e = new IOException('', 0, null, '/foo');
|
26
|
+
$this->assertEquals('/foo', $e->getPath(), 'The pass should be returned.');
|
27
|
+
}
|
28
|
+
|
29
|
+
public function testGeneratedMessage()
|
30
|
+
{
|
31
|
+
$e = new FileNotFoundException(null, 0, null, '/foo');
|
32
|
+
$this->assertEquals('/foo', $e->getPath());
|
33
|
+
$this->assertEquals('File "/foo" could not be found.', $e->getMessage(), 'A message should be generated.');
|
34
|
+
}
|
35
|
+
|
36
|
+
public function testGeneratedMessageWithoutPath()
|
37
|
+
{
|
38
|
+
$e = new FileNotFoundException();
|
39
|
+
$this->assertEquals('File could not be found.', $e->getMessage(), 'A message should be generated.');
|
40
|
+
}
|
41
|
+
|
42
|
+
public function testCustomMessage()
|
43
|
+
{
|
44
|
+
$e = new FileNotFoundException('bar', 0, null, '/foo');
|
45
|
+
$this->assertEquals('bar', $e->getMessage(), 'A custom message should be possible still.');
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,1686 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/*
|
4
|
+
* This file is part of the Symfony package.
|
5
|
+
*
|
6
|
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7
|
+
*
|
8
|
+
* For the full copyright and license information, please view the LICENSE
|
9
|
+
* file that was distributed with this source code.
|
10
|
+
*/
|
11
|
+
|
12
|
+
namespace Symfony\Component\Filesystem\Tests;
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Test class for Filesystem.
|
16
|
+
*/
|
17
|
+
class FilesystemTest extends FilesystemTestCase
|
18
|
+
{
|
19
|
+
public function testCopyCreatesNewFile()
|
20
|
+
{
|
21
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
22
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
23
|
+
|
24
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
25
|
+
|
26
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath);
|
27
|
+
|
28
|
+
$this->assertFileExists($targetFilePath);
|
29
|
+
$this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE');
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
34
|
+
*/
|
35
|
+
public function testCopyFails()
|
36
|
+
{
|
37
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
38
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
39
|
+
|
40
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath);
|
41
|
+
}
|
42
|
+
|
43
|
+
/**
|
44
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
45
|
+
*/
|
46
|
+
public function testCopyUnreadableFileFails()
|
47
|
+
{
|
48
|
+
// skip test on Windows; PHP can't easily set file as unreadable on Windows
|
49
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
50
|
+
$this->markTestSkipped('This test cannot run on Windows.');
|
51
|
+
}
|
52
|
+
|
53
|
+
if (!getenv('USER') || 'root' === getenv('USER')) {
|
54
|
+
$this->markTestSkipped('This test will fail if run under superuser');
|
55
|
+
}
|
56
|
+
|
57
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
58
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
59
|
+
|
60
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
61
|
+
|
62
|
+
// make sure target cannot be read
|
63
|
+
$this->filesystem->chmod($sourceFilePath, 0222);
|
64
|
+
|
65
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath);
|
66
|
+
}
|
67
|
+
|
68
|
+
public function testCopyOverridesExistingFileIfModified()
|
69
|
+
{
|
70
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
71
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
72
|
+
|
73
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
74
|
+
file_put_contents($targetFilePath, 'TARGET FILE');
|
75
|
+
touch($targetFilePath, time() - 1000);
|
76
|
+
|
77
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath);
|
78
|
+
|
79
|
+
$this->assertFileExists($targetFilePath);
|
80
|
+
$this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE');
|
81
|
+
}
|
82
|
+
|
83
|
+
public function testCopyDoesNotOverrideExistingFileByDefault()
|
84
|
+
{
|
85
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
86
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
87
|
+
|
88
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
89
|
+
file_put_contents($targetFilePath, 'TARGET FILE');
|
90
|
+
|
91
|
+
// make sure both files have the same modification time
|
92
|
+
$modificationTime = time() - 1000;
|
93
|
+
touch($sourceFilePath, $modificationTime);
|
94
|
+
touch($targetFilePath, $modificationTime);
|
95
|
+
|
96
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath);
|
97
|
+
|
98
|
+
$this->assertFileExists($targetFilePath);
|
99
|
+
$this->assertStringEqualsFile($targetFilePath, 'TARGET FILE');
|
100
|
+
}
|
101
|
+
|
102
|
+
public function testCopyOverridesExistingFileIfForced()
|
103
|
+
{
|
104
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
105
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
106
|
+
|
107
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
108
|
+
file_put_contents($targetFilePath, 'TARGET FILE');
|
109
|
+
|
110
|
+
// make sure both files have the same modification time
|
111
|
+
$modificationTime = time() - 1000;
|
112
|
+
touch($sourceFilePath, $modificationTime);
|
113
|
+
touch($targetFilePath, $modificationTime);
|
114
|
+
|
115
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath, true);
|
116
|
+
|
117
|
+
$this->assertFileExists($targetFilePath);
|
118
|
+
$this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE');
|
119
|
+
}
|
120
|
+
|
121
|
+
/**
|
122
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
123
|
+
*/
|
124
|
+
public function testCopyWithOverrideWithReadOnlyTargetFails()
|
125
|
+
{
|
126
|
+
// skip test on Windows; PHP can't easily set file as unwritable on Windows
|
127
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
128
|
+
$this->markTestSkipped('This test cannot run on Windows.');
|
129
|
+
}
|
130
|
+
|
131
|
+
if (!getenv('USER') || 'root' === getenv('USER')) {
|
132
|
+
$this->markTestSkipped('This test will fail if run under superuser');
|
133
|
+
}
|
134
|
+
|
135
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
136
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
137
|
+
|
138
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
139
|
+
file_put_contents($targetFilePath, 'TARGET FILE');
|
140
|
+
|
141
|
+
// make sure both files have the same modification time
|
142
|
+
$modificationTime = time() - 1000;
|
143
|
+
touch($sourceFilePath, $modificationTime);
|
144
|
+
touch($targetFilePath, $modificationTime);
|
145
|
+
|
146
|
+
// make sure target is read-only
|
147
|
+
$this->filesystem->chmod($targetFilePath, 0444);
|
148
|
+
|
149
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath, true);
|
150
|
+
}
|
151
|
+
|
152
|
+
public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
|
153
|
+
{
|
154
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
155
|
+
$targetFileDirectory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
|
156
|
+
$targetFilePath = $targetFileDirectory.\DIRECTORY_SEPARATOR.'copy_target_file';
|
157
|
+
|
158
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
159
|
+
|
160
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath);
|
161
|
+
|
162
|
+
$this->assertTrue(is_dir($targetFileDirectory));
|
163
|
+
$this->assertFileExists($targetFilePath);
|
164
|
+
$this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE');
|
165
|
+
}
|
166
|
+
|
167
|
+
/**
|
168
|
+
* @group network
|
169
|
+
*/
|
170
|
+
public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
|
171
|
+
{
|
172
|
+
if (!\in_array('https', stream_get_wrappers())) {
|
173
|
+
$this->markTestSkipped('"https" stream wrapper is not enabled.');
|
174
|
+
}
|
175
|
+
$sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png';
|
176
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
177
|
+
|
178
|
+
file_put_contents($targetFilePath, 'TARGET FILE');
|
179
|
+
|
180
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath, false);
|
181
|
+
|
182
|
+
$this->assertFileExists($targetFilePath);
|
183
|
+
$this->assertEquals(file_get_contents($sourceFilePath), file_get_contents($targetFilePath));
|
184
|
+
}
|
185
|
+
|
186
|
+
public function testMkdirCreatesDirectoriesRecursively()
|
187
|
+
{
|
188
|
+
$directory = $this->workspace
|
189
|
+
.\DIRECTORY_SEPARATOR.'directory'
|
190
|
+
.\DIRECTORY_SEPARATOR.'sub_directory';
|
191
|
+
|
192
|
+
$this->filesystem->mkdir($directory);
|
193
|
+
|
194
|
+
$this->assertTrue(is_dir($directory));
|
195
|
+
}
|
196
|
+
|
197
|
+
public function testMkdirCreatesDirectoriesFromArray()
|
198
|
+
{
|
199
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
200
|
+
$directories = [
|
201
|
+
$basePath.'1', $basePath.'2', $basePath.'3',
|
202
|
+
];
|
203
|
+
|
204
|
+
$this->filesystem->mkdir($directories);
|
205
|
+
|
206
|
+
$this->assertTrue(is_dir($basePath.'1'));
|
207
|
+
$this->assertTrue(is_dir($basePath.'2'));
|
208
|
+
$this->assertTrue(is_dir($basePath.'3'));
|
209
|
+
}
|
210
|
+
|
211
|
+
public function testMkdirCreatesDirectoriesFromTraversableObject()
|
212
|
+
{
|
213
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
214
|
+
$directories = new \ArrayObject([
|
215
|
+
$basePath.'1', $basePath.'2', $basePath.'3',
|
216
|
+
]);
|
217
|
+
|
218
|
+
$this->filesystem->mkdir($directories);
|
219
|
+
|
220
|
+
$this->assertTrue(is_dir($basePath.'1'));
|
221
|
+
$this->assertTrue(is_dir($basePath.'2'));
|
222
|
+
$this->assertTrue(is_dir($basePath.'3'));
|
223
|
+
}
|
224
|
+
|
225
|
+
/**
|
226
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
227
|
+
*/
|
228
|
+
public function testMkdirCreatesDirectoriesFails()
|
229
|
+
{
|
230
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
231
|
+
$dir = $basePath.'2';
|
232
|
+
|
233
|
+
file_put_contents($dir, '');
|
234
|
+
|
235
|
+
$this->filesystem->mkdir($dir);
|
236
|
+
}
|
237
|
+
|
238
|
+
public function testTouchCreatesEmptyFile()
|
239
|
+
{
|
240
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'1';
|
241
|
+
|
242
|
+
$this->filesystem->touch($file);
|
243
|
+
|
244
|
+
$this->assertFileExists($file);
|
245
|
+
}
|
246
|
+
|
247
|
+
/**
|
248
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
249
|
+
*/
|
250
|
+
public function testTouchFails()
|
251
|
+
{
|
252
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'1'.\DIRECTORY_SEPARATOR.'2';
|
253
|
+
|
254
|
+
$this->filesystem->touch($file);
|
255
|
+
}
|
256
|
+
|
257
|
+
public function testTouchCreatesEmptyFilesFromArray()
|
258
|
+
{
|
259
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
260
|
+
$files = [
|
261
|
+
$basePath.'1', $basePath.'2', $basePath.'3',
|
262
|
+
];
|
263
|
+
|
264
|
+
$this->filesystem->touch($files);
|
265
|
+
|
266
|
+
$this->assertFileExists($basePath.'1');
|
267
|
+
$this->assertFileExists($basePath.'2');
|
268
|
+
$this->assertFileExists($basePath.'3');
|
269
|
+
}
|
270
|
+
|
271
|
+
public function testTouchCreatesEmptyFilesFromTraversableObject()
|
272
|
+
{
|
273
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
274
|
+
$files = new \ArrayObject([
|
275
|
+
$basePath.'1', $basePath.'2', $basePath.'3',
|
276
|
+
]);
|
277
|
+
|
278
|
+
$this->filesystem->touch($files);
|
279
|
+
|
280
|
+
$this->assertFileExists($basePath.'1');
|
281
|
+
$this->assertFileExists($basePath.'2');
|
282
|
+
$this->assertFileExists($basePath.'3');
|
283
|
+
}
|
284
|
+
|
285
|
+
public function testRemoveCleansFilesAndDirectoriesIteratively()
|
286
|
+
{
|
287
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
|
288
|
+
|
289
|
+
mkdir($basePath);
|
290
|
+
mkdir($basePath.'dir');
|
291
|
+
touch($basePath.'file');
|
292
|
+
|
293
|
+
$this->filesystem->remove($basePath);
|
294
|
+
|
295
|
+
$this->assertFileNotExists($basePath);
|
296
|
+
}
|
297
|
+
|
298
|
+
public function testRemoveCleansArrayOfFilesAndDirectories()
|
299
|
+
{
|
300
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
301
|
+
|
302
|
+
mkdir($basePath.'dir');
|
303
|
+
touch($basePath.'file');
|
304
|
+
|
305
|
+
$files = [
|
306
|
+
$basePath.'dir', $basePath.'file',
|
307
|
+
];
|
308
|
+
|
309
|
+
$this->filesystem->remove($files);
|
310
|
+
|
311
|
+
$this->assertFileNotExists($basePath.'dir');
|
312
|
+
$this->assertFileNotExists($basePath.'file');
|
313
|
+
}
|
314
|
+
|
315
|
+
public function testRemoveCleansTraversableObjectOfFilesAndDirectories()
|
316
|
+
{
|
317
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
318
|
+
|
319
|
+
mkdir($basePath.'dir');
|
320
|
+
touch($basePath.'file');
|
321
|
+
|
322
|
+
$files = new \ArrayObject([
|
323
|
+
$basePath.'dir', $basePath.'file',
|
324
|
+
]);
|
325
|
+
|
326
|
+
$this->filesystem->remove($files);
|
327
|
+
|
328
|
+
$this->assertFileNotExists($basePath.'dir');
|
329
|
+
$this->assertFileNotExists($basePath.'file');
|
330
|
+
}
|
331
|
+
|
332
|
+
public function testRemoveIgnoresNonExistingFiles()
|
333
|
+
{
|
334
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
335
|
+
|
336
|
+
mkdir($basePath.'dir');
|
337
|
+
|
338
|
+
$files = [
|
339
|
+
$basePath.'dir', $basePath.'file',
|
340
|
+
];
|
341
|
+
|
342
|
+
$this->filesystem->remove($files);
|
343
|
+
|
344
|
+
$this->assertFileNotExists($basePath.'dir');
|
345
|
+
}
|
346
|
+
|
347
|
+
public function testRemoveCleansInvalidLinks()
|
348
|
+
{
|
349
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
350
|
+
|
351
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
|
352
|
+
|
353
|
+
mkdir($basePath);
|
354
|
+
mkdir($basePath.'dir');
|
355
|
+
// create symlink to nonexistent file
|
356
|
+
@symlink($basePath.'file', $basePath.'file-link');
|
357
|
+
|
358
|
+
// create symlink to dir using trailing forward slash
|
359
|
+
$this->filesystem->symlink($basePath.'dir/', $basePath.'dir-link');
|
360
|
+
$this->assertTrue(is_dir($basePath.'dir-link'));
|
361
|
+
|
362
|
+
// create symlink to nonexistent dir
|
363
|
+
rmdir($basePath.'dir');
|
364
|
+
$this->assertFalse('\\' === \DIRECTORY_SEPARATOR ? @readlink($basePath.'dir-link') : is_dir($basePath.'dir-link'));
|
365
|
+
|
366
|
+
$this->filesystem->remove($basePath);
|
367
|
+
|
368
|
+
$this->assertFileNotExists($basePath);
|
369
|
+
}
|
370
|
+
|
371
|
+
public function testFilesExists()
|
372
|
+
{
|
373
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
|
374
|
+
|
375
|
+
mkdir($basePath);
|
376
|
+
touch($basePath.'file1');
|
377
|
+
mkdir($basePath.'folder');
|
378
|
+
|
379
|
+
$this->assertTrue($this->filesystem->exists($basePath.'file1'));
|
380
|
+
$this->assertTrue($this->filesystem->exists($basePath.'folder'));
|
381
|
+
}
|
382
|
+
|
383
|
+
/**
|
384
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
385
|
+
*/
|
386
|
+
public function testFilesExistsFails()
|
387
|
+
{
|
388
|
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
389
|
+
$this->markTestSkipped('Long file names are an issue on Windows');
|
390
|
+
}
|
391
|
+
$basePath = $this->workspace.'\\directory\\';
|
392
|
+
$maxPathLength = PHP_MAXPATHLEN - 2;
|
393
|
+
|
394
|
+
$oldPath = getcwd();
|
395
|
+
mkdir($basePath);
|
396
|
+
chdir($basePath);
|
397
|
+
$file = str_repeat('T', $maxPathLength - \strlen($basePath) + 1);
|
398
|
+
$path = $basePath.$file;
|
399
|
+
exec('TYPE NUL >>'.$file); // equivalent of touch, we can not use the php touch() here because it suffers from the same limitation
|
400
|
+
$this->longPathNamesWindows[] = $path; // save this so we can clean up later
|
401
|
+
chdir($oldPath);
|
402
|
+
$this->filesystem->exists($path);
|
403
|
+
}
|
404
|
+
|
405
|
+
public function testFilesExistsTraversableObjectOfFilesAndDirectories()
|
406
|
+
{
|
407
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
408
|
+
|
409
|
+
mkdir($basePath.'dir');
|
410
|
+
touch($basePath.'file');
|
411
|
+
|
412
|
+
$files = new \ArrayObject([
|
413
|
+
$basePath.'dir', $basePath.'file',
|
414
|
+
]);
|
415
|
+
|
416
|
+
$this->assertTrue($this->filesystem->exists($files));
|
417
|
+
}
|
418
|
+
|
419
|
+
public function testFilesNotExistsTraversableObjectOfFilesAndDirectories()
|
420
|
+
{
|
421
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR;
|
422
|
+
|
423
|
+
mkdir($basePath.'dir');
|
424
|
+
touch($basePath.'file');
|
425
|
+
touch($basePath.'file2');
|
426
|
+
|
427
|
+
$files = new \ArrayObject([
|
428
|
+
$basePath.'dir', $basePath.'file', $basePath.'file2',
|
429
|
+
]);
|
430
|
+
|
431
|
+
unlink($basePath.'file');
|
432
|
+
|
433
|
+
$this->assertFalse($this->filesystem->exists($files));
|
434
|
+
}
|
435
|
+
|
436
|
+
public function testInvalidFileNotExists()
|
437
|
+
{
|
438
|
+
$basePath = $this->workspace.\DIRECTORY_SEPARATOR.'directory'.\DIRECTORY_SEPARATOR;
|
439
|
+
|
440
|
+
$this->assertFalse($this->filesystem->exists($basePath.time()));
|
441
|
+
}
|
442
|
+
|
443
|
+
public function testChmodChangesFileMode()
|
444
|
+
{
|
445
|
+
$this->markAsSkippedIfChmodIsMissing();
|
446
|
+
|
447
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
448
|
+
mkdir($dir);
|
449
|
+
$file = $dir.\DIRECTORY_SEPARATOR.'file';
|
450
|
+
touch($file);
|
451
|
+
|
452
|
+
$this->filesystem->chmod($file, 0400);
|
453
|
+
$this->filesystem->chmod($dir, 0753);
|
454
|
+
|
455
|
+
$this->assertFilePermissions(753, $dir);
|
456
|
+
$this->assertFilePermissions(400, $file);
|
457
|
+
}
|
458
|
+
|
459
|
+
public function testChmodWithWrongModLeavesPreviousPermissionsUntouched()
|
460
|
+
{
|
461
|
+
$this->markAsSkippedIfChmodIsMissing();
|
462
|
+
|
463
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
464
|
+
touch($dir);
|
465
|
+
|
466
|
+
$permissions = fileperms($dir);
|
467
|
+
|
468
|
+
$this->filesystem->chmod($dir, 'Wrongmode');
|
469
|
+
|
470
|
+
$this->assertSame($permissions, fileperms($dir));
|
471
|
+
}
|
472
|
+
|
473
|
+
public function testChmodRecursive()
|
474
|
+
{
|
475
|
+
$this->markAsSkippedIfChmodIsMissing();
|
476
|
+
|
477
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
478
|
+
mkdir($dir);
|
479
|
+
$file = $dir.\DIRECTORY_SEPARATOR.'file';
|
480
|
+
touch($file);
|
481
|
+
|
482
|
+
$this->filesystem->chmod($file, 0400, 0000, true);
|
483
|
+
$this->filesystem->chmod($dir, 0753, 0000, true);
|
484
|
+
|
485
|
+
$this->assertFilePermissions(753, $dir);
|
486
|
+
$this->assertFilePermissions(753, $file);
|
487
|
+
}
|
488
|
+
|
489
|
+
public function testChmodAppliesUmask()
|
490
|
+
{
|
491
|
+
$this->markAsSkippedIfChmodIsMissing();
|
492
|
+
|
493
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
494
|
+
touch($file);
|
495
|
+
|
496
|
+
$this->filesystem->chmod($file, 0770, 0022);
|
497
|
+
$this->assertFilePermissions(750, $file);
|
498
|
+
}
|
499
|
+
|
500
|
+
public function testChmodChangesModeOfArrayOfFiles()
|
501
|
+
{
|
502
|
+
$this->markAsSkippedIfChmodIsMissing();
|
503
|
+
|
504
|
+
$directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
|
505
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
506
|
+
$files = [$directory, $file];
|
507
|
+
|
508
|
+
mkdir($directory);
|
509
|
+
touch($file);
|
510
|
+
|
511
|
+
$this->filesystem->chmod($files, 0753);
|
512
|
+
|
513
|
+
$this->assertFilePermissions(753, $file);
|
514
|
+
$this->assertFilePermissions(753, $directory);
|
515
|
+
}
|
516
|
+
|
517
|
+
public function testChmodChangesModeOfTraversableFileObject()
|
518
|
+
{
|
519
|
+
$this->markAsSkippedIfChmodIsMissing();
|
520
|
+
|
521
|
+
$directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
|
522
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
523
|
+
$files = new \ArrayObject([$directory, $file]);
|
524
|
+
|
525
|
+
mkdir($directory);
|
526
|
+
touch($file);
|
527
|
+
|
528
|
+
$this->filesystem->chmod($files, 0753);
|
529
|
+
|
530
|
+
$this->assertFilePermissions(753, $file);
|
531
|
+
$this->assertFilePermissions(753, $directory);
|
532
|
+
}
|
533
|
+
|
534
|
+
public function testChmodChangesZeroModeOnSubdirectoriesOnRecursive()
|
535
|
+
{
|
536
|
+
$this->markAsSkippedIfChmodIsMissing();
|
537
|
+
|
538
|
+
$directory = $this->workspace.\DIRECTORY_SEPARATOR.'directory';
|
539
|
+
$subdirectory = $directory.\DIRECTORY_SEPARATOR.'subdirectory';
|
540
|
+
|
541
|
+
mkdir($directory);
|
542
|
+
mkdir($subdirectory);
|
543
|
+
chmod($subdirectory, 0000);
|
544
|
+
|
545
|
+
$this->filesystem->chmod($directory, 0753, 0000, true);
|
546
|
+
|
547
|
+
$this->assertFilePermissions(753, $subdirectory);
|
548
|
+
}
|
549
|
+
|
550
|
+
public function testChown()
|
551
|
+
{
|
552
|
+
$this->markAsSkippedIfPosixIsMissing();
|
553
|
+
|
554
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
555
|
+
mkdir($dir);
|
556
|
+
|
557
|
+
$owner = $this->getFileOwner($dir);
|
558
|
+
$this->filesystem->chown($dir, $owner);
|
559
|
+
|
560
|
+
$this->assertSame($owner, $this->getFileOwner($dir));
|
561
|
+
}
|
562
|
+
|
563
|
+
public function testChownRecursive()
|
564
|
+
{
|
565
|
+
$this->markAsSkippedIfPosixIsMissing();
|
566
|
+
|
567
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
568
|
+
mkdir($dir);
|
569
|
+
$file = $dir.\DIRECTORY_SEPARATOR.'file';
|
570
|
+
touch($file);
|
571
|
+
|
572
|
+
$owner = $this->getFileOwner($dir);
|
573
|
+
$this->filesystem->chown($dir, $owner, true);
|
574
|
+
|
575
|
+
$this->assertSame($owner, $this->getFileOwner($file));
|
576
|
+
}
|
577
|
+
|
578
|
+
public function testChownSymlink()
|
579
|
+
{
|
580
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
581
|
+
|
582
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
583
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
584
|
+
|
585
|
+
touch($file);
|
586
|
+
|
587
|
+
$this->filesystem->symlink($file, $link);
|
588
|
+
|
589
|
+
$owner = $this->getFileOwner($link);
|
590
|
+
$this->filesystem->chown($link, $owner);
|
591
|
+
|
592
|
+
$this->assertSame($owner, $this->getFileOwner($link));
|
593
|
+
}
|
594
|
+
|
595
|
+
public function testChownLink()
|
596
|
+
{
|
597
|
+
$this->markAsSkippedIfLinkIsMissing();
|
598
|
+
|
599
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
600
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
601
|
+
|
602
|
+
touch($file);
|
603
|
+
|
604
|
+
$this->filesystem->hardlink($file, $link);
|
605
|
+
|
606
|
+
$owner = $this->getFileOwner($link);
|
607
|
+
$this->filesystem->chown($link, $owner);
|
608
|
+
|
609
|
+
$this->assertSame($owner, $this->getFileOwner($link));
|
610
|
+
}
|
611
|
+
|
612
|
+
/**
|
613
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
614
|
+
*/
|
615
|
+
public function testChownSymlinkFails()
|
616
|
+
{
|
617
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
618
|
+
|
619
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
620
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
621
|
+
|
622
|
+
touch($file);
|
623
|
+
|
624
|
+
$this->filesystem->symlink($file, $link);
|
625
|
+
|
626
|
+
$this->filesystem->chown($link, 'user'.time().mt_rand(1000, 9999));
|
627
|
+
}
|
628
|
+
|
629
|
+
/**
|
630
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
631
|
+
*/
|
632
|
+
public function testChownLinkFails()
|
633
|
+
{
|
634
|
+
$this->markAsSkippedIfLinkIsMissing();
|
635
|
+
|
636
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
637
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
638
|
+
|
639
|
+
touch($file);
|
640
|
+
|
641
|
+
$this->filesystem->hardlink($file, $link);
|
642
|
+
|
643
|
+
$this->filesystem->chown($link, 'user'.time().mt_rand(1000, 9999));
|
644
|
+
}
|
645
|
+
|
646
|
+
/**
|
647
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
648
|
+
*/
|
649
|
+
public function testChownFail()
|
650
|
+
{
|
651
|
+
$this->markAsSkippedIfPosixIsMissing();
|
652
|
+
|
653
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
654
|
+
mkdir($dir);
|
655
|
+
|
656
|
+
$this->filesystem->chown($dir, 'user'.time().mt_rand(1000, 9999));
|
657
|
+
}
|
658
|
+
|
659
|
+
public function testChgrp()
|
660
|
+
{
|
661
|
+
$this->markAsSkippedIfPosixIsMissing();
|
662
|
+
|
663
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
664
|
+
mkdir($dir);
|
665
|
+
|
666
|
+
$group = $this->getFileGroup($dir);
|
667
|
+
$this->filesystem->chgrp($dir, $group);
|
668
|
+
|
669
|
+
$this->assertSame($group, $this->getFileGroup($dir));
|
670
|
+
}
|
671
|
+
|
672
|
+
public function testChgrpRecursive()
|
673
|
+
{
|
674
|
+
$this->markAsSkippedIfPosixIsMissing();
|
675
|
+
|
676
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
677
|
+
mkdir($dir);
|
678
|
+
$file = $dir.\DIRECTORY_SEPARATOR.'file';
|
679
|
+
touch($file);
|
680
|
+
|
681
|
+
$group = $this->getFileGroup($dir);
|
682
|
+
$this->filesystem->chgrp($dir, $group, true);
|
683
|
+
|
684
|
+
$this->assertSame($group, $this->getFileGroup($file));
|
685
|
+
}
|
686
|
+
|
687
|
+
public function testChgrpSymlink()
|
688
|
+
{
|
689
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
690
|
+
|
691
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
692
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
693
|
+
|
694
|
+
touch($file);
|
695
|
+
|
696
|
+
$this->filesystem->symlink($file, $link);
|
697
|
+
|
698
|
+
$group = $this->getFileGroup($link);
|
699
|
+
$this->filesystem->chgrp($link, $group);
|
700
|
+
|
701
|
+
$this->assertSame($group, $this->getFileGroup($link));
|
702
|
+
}
|
703
|
+
|
704
|
+
public function testChgrpLink()
|
705
|
+
{
|
706
|
+
$this->markAsSkippedIfLinkIsMissing();
|
707
|
+
|
708
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
709
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
710
|
+
|
711
|
+
touch($file);
|
712
|
+
|
713
|
+
$this->filesystem->hardlink($file, $link);
|
714
|
+
|
715
|
+
$group = $this->getFileGroup($link);
|
716
|
+
$this->filesystem->chgrp($link, $group);
|
717
|
+
|
718
|
+
$this->assertSame($group, $this->getFileGroup($link));
|
719
|
+
}
|
720
|
+
|
721
|
+
/**
|
722
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
723
|
+
*/
|
724
|
+
public function testChgrpSymlinkFails()
|
725
|
+
{
|
726
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
727
|
+
|
728
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
729
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
730
|
+
|
731
|
+
touch($file);
|
732
|
+
|
733
|
+
$this->filesystem->symlink($file, $link);
|
734
|
+
|
735
|
+
$this->filesystem->chgrp($link, 'user'.time().mt_rand(1000, 9999));
|
736
|
+
}
|
737
|
+
|
738
|
+
/**
|
739
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
740
|
+
*/
|
741
|
+
public function testChgrpLinkFails()
|
742
|
+
{
|
743
|
+
$this->markAsSkippedIfLinkIsMissing();
|
744
|
+
|
745
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
746
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
747
|
+
|
748
|
+
touch($file);
|
749
|
+
|
750
|
+
$this->filesystem->hardlink($file, $link);
|
751
|
+
|
752
|
+
$this->filesystem->chgrp($link, 'user'.time().mt_rand(1000, 9999));
|
753
|
+
}
|
754
|
+
|
755
|
+
/**
|
756
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
757
|
+
*/
|
758
|
+
public function testChgrpFail()
|
759
|
+
{
|
760
|
+
$this->markAsSkippedIfPosixIsMissing();
|
761
|
+
|
762
|
+
$dir = $this->workspace.\DIRECTORY_SEPARATOR.'dir';
|
763
|
+
mkdir($dir);
|
764
|
+
|
765
|
+
$this->filesystem->chgrp($dir, 'user'.time().mt_rand(1000, 9999));
|
766
|
+
}
|
767
|
+
|
768
|
+
public function testRename()
|
769
|
+
{
|
770
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
771
|
+
$newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
|
772
|
+
touch($file);
|
773
|
+
|
774
|
+
$this->filesystem->rename($file, $newPath);
|
775
|
+
|
776
|
+
$this->assertFileNotExists($file);
|
777
|
+
$this->assertFileExists($newPath);
|
778
|
+
}
|
779
|
+
|
780
|
+
/**
|
781
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
782
|
+
*/
|
783
|
+
public function testRenameThrowsExceptionIfTargetAlreadyExists()
|
784
|
+
{
|
785
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
786
|
+
$newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
|
787
|
+
|
788
|
+
touch($file);
|
789
|
+
touch($newPath);
|
790
|
+
|
791
|
+
$this->filesystem->rename($file, $newPath);
|
792
|
+
}
|
793
|
+
|
794
|
+
public function testRenameOverwritesTheTargetIfItAlreadyExists()
|
795
|
+
{
|
796
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
797
|
+
$newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
|
798
|
+
|
799
|
+
touch($file);
|
800
|
+
touch($newPath);
|
801
|
+
|
802
|
+
$this->filesystem->rename($file, $newPath, true);
|
803
|
+
|
804
|
+
$this->assertFileNotExists($file);
|
805
|
+
$this->assertFileExists($newPath);
|
806
|
+
}
|
807
|
+
|
808
|
+
/**
|
809
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
810
|
+
*/
|
811
|
+
public function testRenameThrowsExceptionOnError()
|
812
|
+
{
|
813
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.uniqid('fs_test_', true);
|
814
|
+
$newPath = $this->workspace.\DIRECTORY_SEPARATOR.'new_file';
|
815
|
+
|
816
|
+
$this->filesystem->rename($file, $newPath);
|
817
|
+
}
|
818
|
+
|
819
|
+
public function testSymlink()
|
820
|
+
{
|
821
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
822
|
+
$this->markTestSkipped('Windows does not support creating "broken" symlinks');
|
823
|
+
}
|
824
|
+
|
825
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
826
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
827
|
+
|
828
|
+
// $file does not exists right now: creating "broken" links is a wanted feature
|
829
|
+
$this->filesystem->symlink($file, $link);
|
830
|
+
|
831
|
+
$this->assertTrue(is_link($link));
|
832
|
+
|
833
|
+
// Create the linked file AFTER creating the link
|
834
|
+
touch($file);
|
835
|
+
|
836
|
+
$this->assertEquals($file, readlink($link));
|
837
|
+
}
|
838
|
+
|
839
|
+
/**
|
840
|
+
* @depends testSymlink
|
841
|
+
*/
|
842
|
+
public function testRemoveSymlink()
|
843
|
+
{
|
844
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
845
|
+
|
846
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
847
|
+
|
848
|
+
$this->filesystem->remove($link);
|
849
|
+
|
850
|
+
$this->assertFalse(is_link($link));
|
851
|
+
$this->assertFalse(is_file($link));
|
852
|
+
$this->assertFalse(is_dir($link));
|
853
|
+
}
|
854
|
+
|
855
|
+
public function testSymlinkIsOverwrittenIfPointsToDifferentTarget()
|
856
|
+
{
|
857
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
858
|
+
|
859
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
860
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
861
|
+
|
862
|
+
touch($file);
|
863
|
+
symlink($this->workspace, $link);
|
864
|
+
|
865
|
+
$this->filesystem->symlink($file, $link);
|
866
|
+
|
867
|
+
$this->assertTrue(is_link($link));
|
868
|
+
$this->assertEquals($file, readlink($link));
|
869
|
+
}
|
870
|
+
|
871
|
+
public function testSymlinkIsNotOverwrittenIfAlreadyCreated()
|
872
|
+
{
|
873
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
874
|
+
|
875
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
876
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
877
|
+
|
878
|
+
touch($file);
|
879
|
+
symlink($file, $link);
|
880
|
+
|
881
|
+
$this->filesystem->symlink($file, $link);
|
882
|
+
|
883
|
+
$this->assertTrue(is_link($link));
|
884
|
+
$this->assertEquals($file, readlink($link));
|
885
|
+
}
|
886
|
+
|
887
|
+
public function testSymlinkCreatesTargetDirectoryIfItDoesNotExist()
|
888
|
+
{
|
889
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
890
|
+
|
891
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
892
|
+
$link1 = $this->workspace.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'link';
|
893
|
+
$link2 = $this->workspace.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'subdir'.\DIRECTORY_SEPARATOR.'link';
|
894
|
+
|
895
|
+
touch($file);
|
896
|
+
|
897
|
+
$this->filesystem->symlink($file, $link1);
|
898
|
+
$this->filesystem->symlink($file, $link2);
|
899
|
+
|
900
|
+
$this->assertTrue(is_link($link1));
|
901
|
+
$this->assertEquals($file, readlink($link1));
|
902
|
+
$this->assertTrue(is_link($link2));
|
903
|
+
$this->assertEquals($file, readlink($link2));
|
904
|
+
}
|
905
|
+
|
906
|
+
public function testLink()
|
907
|
+
{
|
908
|
+
$this->markAsSkippedIfLinkIsMissing();
|
909
|
+
|
910
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
911
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
912
|
+
|
913
|
+
touch($file);
|
914
|
+
$this->filesystem->hardlink($file, $link);
|
915
|
+
|
916
|
+
$this->assertTrue(is_file($link));
|
917
|
+
$this->assertEquals(fileinode($file), fileinode($link));
|
918
|
+
}
|
919
|
+
|
920
|
+
/**
|
921
|
+
* @depends testLink
|
922
|
+
*/
|
923
|
+
public function testRemoveLink()
|
924
|
+
{
|
925
|
+
$this->markAsSkippedIfLinkIsMissing();
|
926
|
+
|
927
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
928
|
+
|
929
|
+
$this->filesystem->remove($link);
|
930
|
+
|
931
|
+
$this->assertTrue(!is_file($link));
|
932
|
+
}
|
933
|
+
|
934
|
+
public function testLinkIsOverwrittenIfPointsToDifferentTarget()
|
935
|
+
{
|
936
|
+
$this->markAsSkippedIfLinkIsMissing();
|
937
|
+
|
938
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
939
|
+
$file2 = $this->workspace.\DIRECTORY_SEPARATOR.'file2';
|
940
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
941
|
+
|
942
|
+
touch($file);
|
943
|
+
touch($file2);
|
944
|
+
link($file2, $link);
|
945
|
+
|
946
|
+
$this->filesystem->hardlink($file, $link);
|
947
|
+
|
948
|
+
$this->assertTrue(is_file($link));
|
949
|
+
$this->assertEquals(fileinode($file), fileinode($link));
|
950
|
+
}
|
951
|
+
|
952
|
+
public function testLinkIsNotOverwrittenIfAlreadyCreated()
|
953
|
+
{
|
954
|
+
$this->markAsSkippedIfLinkIsMissing();
|
955
|
+
|
956
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
957
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
958
|
+
|
959
|
+
touch($file);
|
960
|
+
link($file, $link);
|
961
|
+
|
962
|
+
$this->filesystem->hardlink($file, $link);
|
963
|
+
|
964
|
+
$this->assertTrue(is_file($link));
|
965
|
+
$this->assertEquals(fileinode($file), fileinode($link));
|
966
|
+
}
|
967
|
+
|
968
|
+
public function testLinkWithSeveralTargets()
|
969
|
+
{
|
970
|
+
$this->markAsSkippedIfLinkIsMissing();
|
971
|
+
|
972
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
973
|
+
$link1 = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
974
|
+
$link2 = $this->workspace.\DIRECTORY_SEPARATOR.'link2';
|
975
|
+
|
976
|
+
touch($file);
|
977
|
+
|
978
|
+
$this->filesystem->hardlink($file, [$link1, $link2]);
|
979
|
+
|
980
|
+
$this->assertTrue(is_file($link1));
|
981
|
+
$this->assertEquals(fileinode($file), fileinode($link1));
|
982
|
+
$this->assertTrue(is_file($link2));
|
983
|
+
$this->assertEquals(fileinode($file), fileinode($link2));
|
984
|
+
}
|
985
|
+
|
986
|
+
public function testLinkWithSameTarget()
|
987
|
+
{
|
988
|
+
$this->markAsSkippedIfLinkIsMissing();
|
989
|
+
|
990
|
+
$file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
|
991
|
+
$link = $this->workspace.\DIRECTORY_SEPARATOR.'link';
|
992
|
+
|
993
|
+
touch($file);
|
994
|
+
|
995
|
+
// practically same as testLinkIsNotOverwrittenIfAlreadyCreated
|
996
|
+
$this->filesystem->hardlink($file, [$link, $link]);
|
997
|
+
|
998
|
+
$this->assertTrue(is_file($link));
|
999
|
+
$this->assertEquals(fileinode($file), fileinode($link));
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
public function testReadRelativeLink()
|
1003
|
+
{
|
1004
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
1005
|
+
|
1006
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
1007
|
+
$this->markTestSkipped('Relative symbolic links are not supported on Windows');
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
$file = $this->workspace.'/file';
|
1011
|
+
$link1 = $this->workspace.'/dir/link';
|
1012
|
+
$link2 = $this->workspace.'/dir/link2';
|
1013
|
+
touch($file);
|
1014
|
+
|
1015
|
+
$this->filesystem->symlink('../file', $link1);
|
1016
|
+
$this->filesystem->symlink('link', $link2);
|
1017
|
+
|
1018
|
+
$this->assertEquals($this->normalize('../file'), $this->filesystem->readlink($link1));
|
1019
|
+
$this->assertEquals('link', $this->filesystem->readlink($link2));
|
1020
|
+
$this->assertEquals($file, $this->filesystem->readlink($link1, true));
|
1021
|
+
$this->assertEquals($file, $this->filesystem->readlink($link2, true));
|
1022
|
+
$this->assertEquals($file, $this->filesystem->readlink($file, true));
|
1023
|
+
}
|
1024
|
+
|
1025
|
+
public function testReadAbsoluteLink()
|
1026
|
+
{
|
1027
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
1028
|
+
|
1029
|
+
$file = $this->normalize($this->workspace.'/file');
|
1030
|
+
$link1 = $this->normalize($this->workspace.'/dir/link');
|
1031
|
+
$link2 = $this->normalize($this->workspace.'/dir/link2');
|
1032
|
+
touch($file);
|
1033
|
+
|
1034
|
+
$this->filesystem->symlink($file, $link1);
|
1035
|
+
$this->filesystem->symlink($link1, $link2);
|
1036
|
+
|
1037
|
+
$this->assertEquals($file, $this->filesystem->readlink($link1));
|
1038
|
+
$this->assertEquals($link1, $this->filesystem->readlink($link2));
|
1039
|
+
$this->assertEquals($file, $this->filesystem->readlink($link1, true));
|
1040
|
+
$this->assertEquals($file, $this->filesystem->readlink($link2, true));
|
1041
|
+
$this->assertEquals($file, $this->filesystem->readlink($file, true));
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
public function testReadBrokenLink()
|
1045
|
+
{
|
1046
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
1047
|
+
|
1048
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
1049
|
+
$this->markTestSkipped('Windows does not support creating "broken" symlinks');
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
$file = $this->workspace.'/file';
|
1053
|
+
$link = $this->workspace.'/link';
|
1054
|
+
|
1055
|
+
$this->filesystem->symlink($file, $link);
|
1056
|
+
|
1057
|
+
$this->assertEquals($file, $this->filesystem->readlink($link));
|
1058
|
+
$this->assertNull($this->filesystem->readlink($link, true));
|
1059
|
+
|
1060
|
+
touch($file);
|
1061
|
+
$this->assertEquals($file, $this->filesystem->readlink($link, true));
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
public function testReadLinkDefaultPathDoesNotExist()
|
1065
|
+
{
|
1066
|
+
$this->assertNull($this->filesystem->readlink($this->normalize($this->workspace.'/invalid')));
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
public function testReadLinkDefaultPathNotLink()
|
1070
|
+
{
|
1071
|
+
$file = $this->normalize($this->workspace.'/file');
|
1072
|
+
touch($file);
|
1073
|
+
|
1074
|
+
$this->assertNull($this->filesystem->readlink($file));
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
public function testReadLinkCanonicalizePath()
|
1078
|
+
{
|
1079
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
1080
|
+
|
1081
|
+
$file = $this->normalize($this->workspace.'/file');
|
1082
|
+
mkdir($this->normalize($this->workspace.'/dir'));
|
1083
|
+
touch($file);
|
1084
|
+
|
1085
|
+
$this->assertEquals($file, $this->filesystem->readlink($this->normalize($this->workspace.'/dir/../file'), true));
|
1086
|
+
}
|
1087
|
+
|
1088
|
+
public function testReadLinkCanonicalizedPathDoesNotExist()
|
1089
|
+
{
|
1090
|
+
$this->assertNull($this->filesystem->readlink($this->normalize($this->workspace.'invalid'), true));
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
/**
|
1094
|
+
* @dataProvider providePathsForMakePathRelative
|
1095
|
+
*/
|
1096
|
+
public function testMakePathRelative($endPath, $startPath, $expectedPath)
|
1097
|
+
{
|
1098
|
+
$path = $this->filesystem->makePathRelative($endPath, $startPath);
|
1099
|
+
|
1100
|
+
$this->assertEquals($expectedPath, $path);
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
public function providePathsForMakePathRelative()
|
1104
|
+
{
|
1105
|
+
$paths = [
|
1106
|
+
['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../'],
|
1107
|
+
['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component/', '../'],
|
1108
|
+
['/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component', '../'],
|
1109
|
+
['/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component/', '../'],
|
1110
|
+
['/usr/lib/symfony/', '/var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/'],
|
1111
|
+
['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/', 'src/Symfony/'],
|
1112
|
+
['/aa/bb', '/aa/bb', './'],
|
1113
|
+
['/aa/bb', '/aa/bb/', './'],
|
1114
|
+
['/aa/bb/', '/aa/bb', './'],
|
1115
|
+
['/aa/bb/', '/aa/bb/', './'],
|
1116
|
+
['/aa/bb/cc', '/aa/bb/cc/dd', '../'],
|
1117
|
+
['/aa/bb/cc', '/aa/bb/cc/dd/', '../'],
|
1118
|
+
['/aa/bb/cc/', '/aa/bb/cc/dd', '../'],
|
1119
|
+
['/aa/bb/cc/', '/aa/bb/cc/dd/', '../'],
|
1120
|
+
['/aa/bb/cc', '/aa', 'bb/cc/'],
|
1121
|
+
['/aa/bb/cc', '/aa/', 'bb/cc/'],
|
1122
|
+
['/aa/bb/cc/', '/aa', 'bb/cc/'],
|
1123
|
+
['/aa/bb/cc/', '/aa/', 'bb/cc/'],
|
1124
|
+
['/a/aab/bb', '/a/aa', '../aab/bb/'],
|
1125
|
+
['/a/aab/bb', '/a/aa/', '../aab/bb/'],
|
1126
|
+
['/a/aab/bb/', '/a/aa', '../aab/bb/'],
|
1127
|
+
['/a/aab/bb/', '/a/aa/', '../aab/bb/'],
|
1128
|
+
['/a/aab/bb/', '/', 'a/aab/bb/'],
|
1129
|
+
['/a/aab/bb/', '/b/aab', '../../a/aab/bb/'],
|
1130
|
+
['/aab/bb', '/aa', '../aab/bb/'],
|
1131
|
+
['/aab', '/aa', '../aab/'],
|
1132
|
+
['/aa/bb/cc', '/aa/dd/..', 'bb/cc/'],
|
1133
|
+
['/aa/../bb/cc', '/aa/dd/..', '../bb/cc/'],
|
1134
|
+
['/aa/bb/../../cc', '/aa/../dd/..', 'cc/'],
|
1135
|
+
['/../aa/bb/cc', '/aa/dd/..', 'bb/cc/'],
|
1136
|
+
['/../../aa/../bb/cc', '/aa/dd/..', '../bb/cc/'],
|
1137
|
+
['C:/aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'],
|
1138
|
+
['c:/aa/../bb/cc', 'c:/aa/dd/..', '../bb/cc/'],
|
1139
|
+
['C:/aa/bb/../../cc', 'C:/aa/../dd/..', 'cc/'],
|
1140
|
+
['C:/../aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'],
|
1141
|
+
['C:/../../aa/../bb/cc', 'C:/aa/dd/..', '../bb/cc/'],
|
1142
|
+
];
|
1143
|
+
|
1144
|
+
if ('\\' === \DIRECTORY_SEPARATOR) {
|
1145
|
+
$paths[] = ['c:\var\lib/symfony/src/Symfony/', 'c:/var/lib/symfony/', 'src/Symfony/'];
|
1146
|
+
}
|
1147
|
+
|
1148
|
+
return $paths;
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
/**
|
1152
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\InvalidArgumentException
|
1153
|
+
* @expectedExceptionMessage The start path "var/lib/symfony/src/Symfony/Component" is not absolute.
|
1154
|
+
*/
|
1155
|
+
public function testMakePathRelativeWithRelativeStartPath()
|
1156
|
+
{
|
1157
|
+
$this->assertSame('../../../', $this->filesystem->makePathRelative('/var/lib/symfony/', 'var/lib/symfony/src/Symfony/Component'));
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
/**
|
1161
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\InvalidArgumentException
|
1162
|
+
* @expectedExceptionMessage The end path "var/lib/symfony/" is not absolute.
|
1163
|
+
*/
|
1164
|
+
public function testMakePathRelativeWithRelativeEndPath()
|
1165
|
+
{
|
1166
|
+
$this->assertSame('../../../', $this->filesystem->makePathRelative('var/lib/symfony/', '/var/lib/symfony/src/Symfony/Component'));
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
public function testMirrorCopiesFilesAndDirectoriesRecursively()
|
1170
|
+
{
|
1171
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1172
|
+
$directory = $sourcePath.'directory'.\DIRECTORY_SEPARATOR;
|
1173
|
+
$file1 = $directory.'file1';
|
1174
|
+
$file2 = $sourcePath.'file2';
|
1175
|
+
|
1176
|
+
mkdir($sourcePath);
|
1177
|
+
mkdir($directory);
|
1178
|
+
file_put_contents($file1, 'FILE1');
|
1179
|
+
file_put_contents($file2, 'FILE2');
|
1180
|
+
|
1181
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1182
|
+
|
1183
|
+
$this->filesystem->mirror($sourcePath, $targetPath);
|
1184
|
+
|
1185
|
+
$this->assertTrue(is_dir($targetPath));
|
1186
|
+
$this->assertTrue(is_dir($targetPath.'directory'));
|
1187
|
+
$this->assertFileEquals($file1, $targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1');
|
1188
|
+
$this->assertFileEquals($file2, $targetPath.'file2');
|
1189
|
+
|
1190
|
+
$this->filesystem->remove($file1);
|
1191
|
+
|
1192
|
+
$this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => false]);
|
1193
|
+
$this->assertTrue($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
|
1194
|
+
|
1195
|
+
$this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]);
|
1196
|
+
$this->assertFalse($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
|
1197
|
+
|
1198
|
+
file_put_contents($file1, 'FILE1');
|
1199
|
+
|
1200
|
+
$this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]);
|
1201
|
+
$this->assertTrue($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
|
1202
|
+
|
1203
|
+
$this->filesystem->remove($directory);
|
1204
|
+
$this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]);
|
1205
|
+
$this->assertFalse($this->filesystem->exists($targetPath.'directory'));
|
1206
|
+
$this->assertFalse($this->filesystem->exists($targetPath.'directory'.\DIRECTORY_SEPARATOR.'file1'));
|
1207
|
+
}
|
1208
|
+
|
1209
|
+
public function testMirrorCreatesEmptyDirectory()
|
1210
|
+
{
|
1211
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1212
|
+
|
1213
|
+
mkdir($sourcePath);
|
1214
|
+
|
1215
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1216
|
+
|
1217
|
+
$this->filesystem->mirror($sourcePath, $targetPath);
|
1218
|
+
|
1219
|
+
$this->assertTrue(is_dir($targetPath));
|
1220
|
+
|
1221
|
+
$this->filesystem->remove($sourcePath);
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
public function testMirrorCopiesLinks()
|
1225
|
+
{
|
1226
|
+
$this->markAsSkippedIfSymlinkIsMissing();
|
1227
|
+
|
1228
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1229
|
+
|
1230
|
+
mkdir($sourcePath);
|
1231
|
+
file_put_contents($sourcePath.'file1', 'FILE1');
|
1232
|
+
symlink($sourcePath.'file1', $sourcePath.'link1');
|
1233
|
+
|
1234
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1235
|
+
|
1236
|
+
$this->filesystem->mirror($sourcePath, $targetPath);
|
1237
|
+
|
1238
|
+
$this->assertTrue(is_dir($targetPath));
|
1239
|
+
$this->assertFileEquals($sourcePath.'file1', $targetPath.'link1');
|
1240
|
+
$this->assertTrue(is_link($targetPath.\DIRECTORY_SEPARATOR.'link1'));
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
public function testMirrorCopiesLinkedDirectoryContents()
|
1244
|
+
{
|
1245
|
+
$this->markAsSkippedIfSymlinkIsMissing(true);
|
1246
|
+
|
1247
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1248
|
+
|
1249
|
+
mkdir($sourcePath.'nested/', 0777, true);
|
1250
|
+
file_put_contents($sourcePath.'/nested/file1.txt', 'FILE1');
|
1251
|
+
// Note: We symlink directory, not file
|
1252
|
+
symlink($sourcePath.'nested', $sourcePath.'link1');
|
1253
|
+
|
1254
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1255
|
+
|
1256
|
+
$this->filesystem->mirror($sourcePath, $targetPath);
|
1257
|
+
|
1258
|
+
$this->assertTrue(is_dir($targetPath));
|
1259
|
+
$this->assertFileEquals($sourcePath.'/nested/file1.txt', $targetPath.'link1/file1.txt');
|
1260
|
+
$this->assertTrue(is_link($targetPath.\DIRECTORY_SEPARATOR.'link1'));
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
public function testMirrorCopiesRelativeLinkedContents()
|
1264
|
+
{
|
1265
|
+
$this->markAsSkippedIfSymlinkIsMissing(true);
|
1266
|
+
|
1267
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1268
|
+
$oldPath = getcwd();
|
1269
|
+
|
1270
|
+
mkdir($sourcePath.'nested/', 0777, true);
|
1271
|
+
file_put_contents($sourcePath.'/nested/file1.txt', 'FILE1');
|
1272
|
+
// Note: Create relative symlink
|
1273
|
+
chdir($sourcePath);
|
1274
|
+
symlink('nested', 'link1');
|
1275
|
+
|
1276
|
+
chdir($oldPath);
|
1277
|
+
|
1278
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1279
|
+
|
1280
|
+
$this->filesystem->mirror($sourcePath, $targetPath);
|
1281
|
+
|
1282
|
+
$this->assertTrue(is_dir($targetPath));
|
1283
|
+
$this->assertFileEquals($sourcePath.'/nested/file1.txt', $targetPath.'link1/file1.txt');
|
1284
|
+
$this->assertTrue(is_link($targetPath.\DIRECTORY_SEPARATOR.'link1'));
|
1285
|
+
$this->assertEquals('\\' === \DIRECTORY_SEPARATOR ? realpath($sourcePath.'\nested') : 'nested', readlink($targetPath.\DIRECTORY_SEPARATOR.'link1'));
|
1286
|
+
}
|
1287
|
+
|
1288
|
+
public function testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption()
|
1289
|
+
{
|
1290
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1291
|
+
|
1292
|
+
mkdir($sourcePath);
|
1293
|
+
touch($sourcePath.'source');
|
1294
|
+
touch($sourcePath.'target');
|
1295
|
+
|
1296
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1297
|
+
|
1298
|
+
$oldPath = getcwd();
|
1299
|
+
chdir($this->workspace);
|
1300
|
+
|
1301
|
+
$this->filesystem->mirror('source', $targetPath);
|
1302
|
+
|
1303
|
+
chdir($oldPath);
|
1304
|
+
|
1305
|
+
$this->assertTrue(is_dir($targetPath));
|
1306
|
+
$this->assertFileExists($targetPath.'source');
|
1307
|
+
$this->assertFileExists($targetPath.'target');
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
|
1311
|
+
{
|
1312
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1313
|
+
|
1314
|
+
mkdir($sourcePath);
|
1315
|
+
touch($sourcePath.'source');
|
1316
|
+
|
1317
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1318
|
+
|
1319
|
+
mkdir($targetPath);
|
1320
|
+
touch($targetPath.'source');
|
1321
|
+
touch($targetPath.'target');
|
1322
|
+
|
1323
|
+
$oldPath = getcwd();
|
1324
|
+
chdir($this->workspace);
|
1325
|
+
|
1326
|
+
$this->filesystem->mirror('source', 'target', null, ['delete' => true]);
|
1327
|
+
|
1328
|
+
chdir($oldPath);
|
1329
|
+
|
1330
|
+
$this->assertTrue(is_dir($targetPath));
|
1331
|
+
$this->assertFileExists($targetPath.'source');
|
1332
|
+
$this->assertFileNotExists($targetPath.'target');
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
public function testMirrorWithCustomIterator()
|
1336
|
+
{
|
1337
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1338
|
+
mkdir($sourcePath);
|
1339
|
+
|
1340
|
+
$file = $sourcePath.\DIRECTORY_SEPARATOR.'file';
|
1341
|
+
file_put_contents($file, 'FILE');
|
1342
|
+
|
1343
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1344
|
+
|
1345
|
+
$splFile = new \SplFileInfo($file);
|
1346
|
+
$iterator = new \ArrayObject([$splFile]);
|
1347
|
+
|
1348
|
+
$this->filesystem->mirror($sourcePath, $targetPath, $iterator);
|
1349
|
+
|
1350
|
+
$this->assertTrue(is_dir($targetPath));
|
1351
|
+
$this->assertFileEquals($file, $targetPath.\DIRECTORY_SEPARATOR.'file');
|
1352
|
+
}
|
1353
|
+
|
1354
|
+
/**
|
1355
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
1356
|
+
* @expectedExceptionMessageRegExp /Unable to mirror "(.*)" directory/
|
1357
|
+
*/
|
1358
|
+
public function testMirrorWithCustomIteratorWithRelativePath()
|
1359
|
+
{
|
1360
|
+
$sourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1361
|
+
$realSourcePath = $this->workspace.\DIRECTORY_SEPARATOR.'source'.\DIRECTORY_SEPARATOR;
|
1362
|
+
mkdir($realSourcePath);
|
1363
|
+
|
1364
|
+
$file = $realSourcePath.'file';
|
1365
|
+
file_put_contents($file, 'FILE');
|
1366
|
+
|
1367
|
+
$targetPath = $this->workspace.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'target'.\DIRECTORY_SEPARATOR;
|
1368
|
+
|
1369
|
+
$splFile = new \SplFileInfo($file);
|
1370
|
+
$iterator = new \ArrayObject([$splFile]);
|
1371
|
+
|
1372
|
+
$this->filesystem->mirror($sourcePath, $targetPath, $iterator);
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
/**
|
1376
|
+
* @dataProvider providePathsForIsAbsolutePath
|
1377
|
+
*/
|
1378
|
+
public function testIsAbsolutePath($path, $expectedResult)
|
1379
|
+
{
|
1380
|
+
$result = $this->filesystem->isAbsolutePath($path);
|
1381
|
+
|
1382
|
+
$this->assertEquals($expectedResult, $result);
|
1383
|
+
}
|
1384
|
+
|
1385
|
+
public function providePathsForIsAbsolutePath()
|
1386
|
+
{
|
1387
|
+
return [
|
1388
|
+
['/var/lib', true],
|
1389
|
+
['c:\\\\var\\lib', true],
|
1390
|
+
['\\var\\lib', true],
|
1391
|
+
['var/lib', false],
|
1392
|
+
['../var/lib', false],
|
1393
|
+
['', false],
|
1394
|
+
[null, false],
|
1395
|
+
];
|
1396
|
+
}
|
1397
|
+
|
1398
|
+
public function testTempnam()
|
1399
|
+
{
|
1400
|
+
$dirname = $this->workspace;
|
1401
|
+
|
1402
|
+
$filename = $this->filesystem->tempnam($dirname, 'foo');
|
1403
|
+
|
1404
|
+
$this->assertFileExists($filename);
|
1405
|
+
}
|
1406
|
+
|
1407
|
+
public function testTempnamWithFileScheme()
|
1408
|
+
{
|
1409
|
+
$scheme = 'file://';
|
1410
|
+
$dirname = $scheme.$this->workspace;
|
1411
|
+
|
1412
|
+
$filename = $this->filesystem->tempnam($dirname, 'foo');
|
1413
|
+
|
1414
|
+
$this->assertStringStartsWith($scheme, $filename);
|
1415
|
+
$this->assertFileExists($filename);
|
1416
|
+
}
|
1417
|
+
|
1418
|
+
public function testTempnamWithMockScheme()
|
1419
|
+
{
|
1420
|
+
stream_wrapper_register('mock', 'Symfony\Component\Filesystem\Tests\Fixtures\MockStream\MockStream');
|
1421
|
+
|
1422
|
+
$scheme = 'mock://';
|
1423
|
+
$dirname = $scheme.$this->workspace;
|
1424
|
+
|
1425
|
+
$filename = $this->filesystem->tempnam($dirname, 'foo');
|
1426
|
+
|
1427
|
+
$this->assertStringStartsWith($scheme, $filename);
|
1428
|
+
$this->assertFileExists($filename);
|
1429
|
+
}
|
1430
|
+
|
1431
|
+
/**
|
1432
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
1433
|
+
*/
|
1434
|
+
public function testTempnamWithZlibSchemeFails()
|
1435
|
+
{
|
1436
|
+
$scheme = 'compress.zlib://';
|
1437
|
+
$dirname = $scheme.$this->workspace;
|
1438
|
+
|
1439
|
+
// The compress.zlib:// stream does not support mode x: creates the file, errors "failed to open stream: operation failed" and returns false
|
1440
|
+
$this->filesystem->tempnam($dirname, 'bar');
|
1441
|
+
}
|
1442
|
+
|
1443
|
+
public function testTempnamWithPHPTempSchemeFails()
|
1444
|
+
{
|
1445
|
+
$scheme = 'php://temp';
|
1446
|
+
$dirname = $scheme;
|
1447
|
+
|
1448
|
+
$filename = $this->filesystem->tempnam($dirname, 'bar');
|
1449
|
+
|
1450
|
+
$this->assertStringStartsWith($scheme, $filename);
|
1451
|
+
|
1452
|
+
// The php://temp stream deletes the file after close
|
1453
|
+
$this->assertFileNotExists($filename);
|
1454
|
+
}
|
1455
|
+
|
1456
|
+
/**
|
1457
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
1458
|
+
*/
|
1459
|
+
public function testTempnamWithPharSchemeFails()
|
1460
|
+
{
|
1461
|
+
// Skip test if Phar disabled phar.readonly must be 0 in php.ini
|
1462
|
+
if (!\Phar::canWrite()) {
|
1463
|
+
$this->markTestSkipped('This test cannot run when phar.readonly is 1.');
|
1464
|
+
}
|
1465
|
+
|
1466
|
+
$scheme = 'phar://';
|
1467
|
+
$dirname = $scheme.$this->workspace;
|
1468
|
+
$pharname = 'foo.phar';
|
1469
|
+
|
1470
|
+
new \Phar($this->workspace.'/'.$pharname, 0, $pharname);
|
1471
|
+
// The phar:// stream does not support mode x: fails to create file, errors "failed to open stream: phar error: "$filename" is not a file in phar "$pharname"" and returns false
|
1472
|
+
$this->filesystem->tempnam($dirname, $pharname.'/bar');
|
1473
|
+
}
|
1474
|
+
|
1475
|
+
/**
|
1476
|
+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
1477
|
+
*/
|
1478
|
+
public function testTempnamWithHTTPSchemeFails()
|
1479
|
+
{
|
1480
|
+
$scheme = 'http://';
|
1481
|
+
$dirname = $scheme.$this->workspace;
|
1482
|
+
|
1483
|
+
// The http:// scheme is read-only
|
1484
|
+
$this->filesystem->tempnam($dirname, 'bar');
|
1485
|
+
}
|
1486
|
+
|
1487
|
+
public function testTempnamOnUnwritableFallsBackToSysTmp()
|
1488
|
+
{
|
1489
|
+
$scheme = 'file://';
|
1490
|
+
$dirname = $scheme.$this->workspace.\DIRECTORY_SEPARATOR.'does_not_exist';
|
1491
|
+
|
1492
|
+
$filename = $this->filesystem->tempnam($dirname, 'bar');
|
1493
|
+
$realTempDir = realpath(sys_get_temp_dir());
|
1494
|
+
$this->assertStringStartsWith(rtrim($scheme.$realTempDir, \DIRECTORY_SEPARATOR), $filename);
|
1495
|
+
$this->assertFileExists($filename);
|
1496
|
+
|
1497
|
+
// Tear down
|
1498
|
+
@unlink($filename);
|
1499
|
+
}
|
1500
|
+
|
1501
|
+
public function testDumpFile()
|
1502
|
+
{
|
1503
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
|
1504
|
+
|
1505
|
+
// skip mode check on Windows
|
1506
|
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
1507
|
+
$oldMask = umask(0002);
|
1508
|
+
}
|
1509
|
+
|
1510
|
+
$this->filesystem->dumpFile($filename, 'bar');
|
1511
|
+
$this->assertFileExists($filename);
|
1512
|
+
$this->assertStringEqualsFile($filename, 'bar');
|
1513
|
+
|
1514
|
+
// skip mode check on Windows
|
1515
|
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
1516
|
+
$this->assertFilePermissions(664, $filename);
|
1517
|
+
umask($oldMask);
|
1518
|
+
}
|
1519
|
+
}
|
1520
|
+
|
1521
|
+
public function testDumpFileWithArray()
|
1522
|
+
{
|
1523
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
|
1524
|
+
|
1525
|
+
$this->filesystem->dumpFile($filename, ['bar']);
|
1526
|
+
|
1527
|
+
$this->assertFileExists($filename);
|
1528
|
+
$this->assertStringEqualsFile($filename, 'bar');
|
1529
|
+
}
|
1530
|
+
|
1531
|
+
public function testDumpFileWithResource()
|
1532
|
+
{
|
1533
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
|
1534
|
+
|
1535
|
+
$resource = fopen('php://memory', 'rw');
|
1536
|
+
fwrite($resource, 'bar');
|
1537
|
+
fseek($resource, 0);
|
1538
|
+
|
1539
|
+
$this->filesystem->dumpFile($filename, $resource);
|
1540
|
+
|
1541
|
+
fclose($resource);
|
1542
|
+
$this->assertFileExists($filename);
|
1543
|
+
$this->assertStringEqualsFile($filename, 'bar');
|
1544
|
+
}
|
1545
|
+
|
1546
|
+
public function testDumpFileOverwritesAnExistingFile()
|
1547
|
+
{
|
1548
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo.txt';
|
1549
|
+
file_put_contents($filename, 'FOO BAR');
|
1550
|
+
|
1551
|
+
$this->filesystem->dumpFile($filename, 'bar');
|
1552
|
+
|
1553
|
+
$this->assertFileExists($filename);
|
1554
|
+
$this->assertStringEqualsFile($filename, 'bar');
|
1555
|
+
}
|
1556
|
+
|
1557
|
+
public function testDumpFileWithFileScheme()
|
1558
|
+
{
|
1559
|
+
$scheme = 'file://';
|
1560
|
+
$filename = $scheme.$this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
|
1561
|
+
|
1562
|
+
$this->filesystem->dumpFile($filename, 'bar');
|
1563
|
+
|
1564
|
+
$this->assertFileExists($filename);
|
1565
|
+
$this->assertStringEqualsFile($filename, 'bar');
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
public function testDumpFileWithZlibScheme()
|
1569
|
+
{
|
1570
|
+
$scheme = 'compress.zlib://';
|
1571
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
|
1572
|
+
|
1573
|
+
$this->filesystem->dumpFile($filename, 'bar');
|
1574
|
+
|
1575
|
+
// Zlib stat uses file:// wrapper so remove scheme
|
1576
|
+
$this->assertFileExists(str_replace($scheme, '', $filename));
|
1577
|
+
$this->assertStringEqualsFile($filename, 'bar');
|
1578
|
+
}
|
1579
|
+
|
1580
|
+
public function testAppendToFile()
|
1581
|
+
{
|
1582
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.txt';
|
1583
|
+
|
1584
|
+
// skip mode check on Windows
|
1585
|
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
1586
|
+
$oldMask = umask(0002);
|
1587
|
+
}
|
1588
|
+
|
1589
|
+
$this->filesystem->dumpFile($filename, 'foo');
|
1590
|
+
|
1591
|
+
$this->filesystem->appendToFile($filename, 'bar');
|
1592
|
+
|
1593
|
+
$this->assertFileExists($filename);
|
1594
|
+
$this->assertStringEqualsFile($filename, 'foobar');
|
1595
|
+
|
1596
|
+
// skip mode check on Windows
|
1597
|
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
1598
|
+
$this->assertFilePermissions(664, $filename);
|
1599
|
+
umask($oldMask);
|
1600
|
+
}
|
1601
|
+
}
|
1602
|
+
|
1603
|
+
public function testAppendToFileWithScheme()
|
1604
|
+
{
|
1605
|
+
$scheme = 'file://';
|
1606
|
+
$filename = $scheme.$this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
|
1607
|
+
$this->filesystem->dumpFile($filename, 'foo');
|
1608
|
+
|
1609
|
+
$this->filesystem->appendToFile($filename, 'bar');
|
1610
|
+
|
1611
|
+
$this->assertFileExists($filename);
|
1612
|
+
$this->assertStringEqualsFile($filename, 'foobar');
|
1613
|
+
}
|
1614
|
+
|
1615
|
+
public function testAppendToFileWithZlibScheme()
|
1616
|
+
{
|
1617
|
+
$scheme = 'compress.zlib://';
|
1618
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'baz.txt';
|
1619
|
+
$this->filesystem->dumpFile($filename, 'foo');
|
1620
|
+
|
1621
|
+
// Zlib stat uses file:// wrapper so remove it
|
1622
|
+
$this->assertStringEqualsFile(str_replace($scheme, '', $filename), 'foo');
|
1623
|
+
|
1624
|
+
$this->filesystem->appendToFile($filename, 'bar');
|
1625
|
+
|
1626
|
+
$this->assertFileExists($filename);
|
1627
|
+
$this->assertStringEqualsFile($filename, 'foobar');
|
1628
|
+
}
|
1629
|
+
|
1630
|
+
public function testAppendToFileCreateTheFileIfNotExists()
|
1631
|
+
{
|
1632
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo'.\DIRECTORY_SEPARATOR.'bar.txt';
|
1633
|
+
|
1634
|
+
// skip mode check on Windows
|
1635
|
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
1636
|
+
$oldMask = umask(0002);
|
1637
|
+
}
|
1638
|
+
|
1639
|
+
$this->filesystem->appendToFile($filename, 'bar');
|
1640
|
+
|
1641
|
+
// skip mode check on Windows
|
1642
|
+
if ('\\' !== \DIRECTORY_SEPARATOR) {
|
1643
|
+
$this->assertFilePermissions(664, $filename);
|
1644
|
+
umask($oldMask);
|
1645
|
+
}
|
1646
|
+
|
1647
|
+
$this->assertFileExists($filename);
|
1648
|
+
$this->assertStringEqualsFile($filename, 'bar');
|
1649
|
+
}
|
1650
|
+
|
1651
|
+
public function testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile()
|
1652
|
+
{
|
1653
|
+
$this->markAsSkippedIfChmodIsMissing();
|
1654
|
+
|
1655
|
+
$filename = $this->workspace.\DIRECTORY_SEPARATOR.'foo.txt';
|
1656
|
+
file_put_contents($filename, 'FOO BAR');
|
1657
|
+
chmod($filename, 0745);
|
1658
|
+
|
1659
|
+
$this->filesystem->dumpFile($filename, 'bar', null);
|
1660
|
+
|
1661
|
+
$this->assertFilePermissions(745, $filename);
|
1662
|
+
}
|
1663
|
+
|
1664
|
+
public function testCopyShouldKeepExecutionPermission()
|
1665
|
+
{
|
1666
|
+
$this->markAsSkippedIfChmodIsMissing();
|
1667
|
+
|
1668
|
+
$sourceFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_source_file';
|
1669
|
+
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
1670
|
+
|
1671
|
+
file_put_contents($sourceFilePath, 'SOURCE FILE');
|
1672
|
+
chmod($sourceFilePath, 0745);
|
1673
|
+
|
1674
|
+
$this->filesystem->copy($sourceFilePath, $targetFilePath);
|
1675
|
+
|
1676
|
+
$this->assertFilePermissions(767, $targetFilePath);
|
1677
|
+
}
|
1678
|
+
|
1679
|
+
/**
|
1680
|
+
* Normalize the given path (transform each blackslash into a real directory separator).
|
1681
|
+
*/
|
1682
|
+
private function normalize(string $path): string
|
1683
|
+
{
|
1684
|
+
return str_replace('/', \DIRECTORY_SEPARATOR, $path);
|
1685
|
+
}
|
1686
|
+
}
|