From be3ea7a71dd99a24b4593687180fdededf4d26f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Andor?= Date: Mon, 31 Jul 2017 22:36:34 +0200 Subject: [PATCH] Change vendor --- .git-hooks | 24 +- .travis.yml | 7 +- README.md | 4 +- RoboFile.php | 230 ++++---- codeception.yml | 2 +- composer.json | 29 +- composer.lock | 521 +++++++++--------- phpcs.xml | 16 + src-dev/Composer/Scripts.php | 102 ++++ src/BundlerTaskLoader.php | 10 +- src/Composer/Scripts.php | 23 - src/Option/PathOption.php | 2 +- src/Task/BaseTask.php | 8 +- src/Task/BundleCheckTask.php | 4 +- src/Task/BundleExecTask.php | 2 +- src/Task/BundleInstallTask.php | 4 +- src/Task/BundleShowPathsTask.php | 2 +- src/Utils.php | 2 +- tests/_support/AcceptanceTester.php | 2 +- tests/_support/Helper/Acceptance.php | 2 +- tests/_support/Helper/Dummy/Command.php | 2 +- tests/_support/Helper/Dummy/Output.php | 2 +- tests/_support/Helper/Dummy/Process.php | 2 +- .../_support/Helper/Module/RoboTaskRunner.php | 8 +- .../Helper/RoboFiles/BundleRoboFile.php | 6 +- tests/_support/Helper/Unit.php | 2 +- tests/_support/UnitTester.php | 2 +- tests/acceptance.suite.yml | 4 +- tests/acceptance/Task/BundleCheckTaskCest.php | 6 +- tests/acceptance/Task/BundleExecTaskCest.php | 6 +- .../acceptance/Task/BundleInstallTaskCest.php | 6 +- .../Task/BundleShowPathsTaskCest.php | 6 +- tests/unit.suite.yml | 2 +- tests/unit/Task/BundleCheckTaskTest.php | 6 +- tests/unit/Task/BundleExecTaskTest.php | 8 +- tests/unit/Task/BundleInstallTaskTest.php | 6 +- tests/unit/Task/BundleShowPathsTaskTest.php | 14 +- 37 files changed, 606 insertions(+), 478 deletions(-) create mode 100644 phpcs.xml create mode 100644 src-dev/Composer/Scripts.php delete mode 100644 src/Composer/Scripts.php diff --git a/.git-hooks b/.git-hooks index e27bc32..3eac639 100644 --- a/.git-hooks +++ b/.git-hooks @@ -1,10 +1,10 @@ #!/usr/bin/env bash -echo "BEGIN Git hook: ${cghHookName}" +echo "BEGIN Git hook: ${sghHookName}" -function cghExit () +function sghExit () { - echo "END Git hook: ${cghHookName}" + echo "END Git hook: ${sghHookName}" exit $1 } @@ -12,20 +12,20 @@ function cghExit () export COMPOSER_DISABLE_XDEBUG_WARN=1 # @todo Better detection for executables: php, composer.phar. -cghRobo="$(composer config 'bin-dir')/robo" +sghRobo="$(composer config 'bin-dir')/robo" -test -s "${cghBridge}.local" && . "${cghBridge}.local" +test -s "${sghBridge}.local" && . "${sghBridge}.local" -cghTask="githook:${cghHookName}" +sghTask="githook:${sghHookName}" # Exit without error if "robo" doesn't exists or it has no corresponding task. -test -x "$cghRobo" || cghExit 0 -"${cghRobo}" help "${cghTask}" 1> /dev/null 2>&1 || cghExit 0 +test -x "$sghRobo" || sghExit 0 +"${sghRobo}" help "${sghTask}" 1> /dev/null 2>&1 || sghExit 0 -if [ "$cghHasInput" = 'true' ]; then - "$cghRobo" "${cghTask}" $@ <<< $(- -# BREW_PHP=php71 before_install: - 'src-dev/scripts/travis/before_install.sh' - 'export COMPOSER_NO_INTERACTION=1' - 'export COMPOSER_DISABLE_XDEBUG_WARN=1' - "export CUSTOM_RUBY_VERSION=$(BUNDLE_GEMFILE='tests/_data/Gemfile.fail.rb' bundle platform --ruby | awk '{print $2}')" - - 'echo "The expected ruby version is ${CUSTOM_RUBY_VERSION}"' + - 'export BREW_PHP=php71' - 'rvm install "${CUSTOM_RUBY_VERSION}"' - 'rvm --default use "${CUSTOM_RUBY_VERSION}"' - 'ruby --version' - - 'gem install bundler' - - 'BUNDLE_GEMFILE=tests/_data/Gemfile.success.rb bundle install' install: - 'composer install --no-progress' diff --git a/README.md b/README.md index a950912..ff688b8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Robo task wrapper for Bundler -[![Build Status](https://travis-ci.org/Cheppers/robo-bundler.svg?branch=master)](https://travis-ci.org/Cheppers/robo-bundler) -[![codecov](https://codecov.io/gh/Cheppers/robo-bundler/branch/master/graph/badge.svg)](https://codecov.io/gh/Cheppers/robo-bundler) +[![Build Status](https://travis-ci.org/Sweetchuck/robo-bundler.svg?branch=master)](https://travis-ci.org/Sweetchuck/robo-bundler) +[![codecov](https://codecov.io/gh/Sweetchuck/robo-bundler/branch/master/graph/badge.svg)](https://codecov.io/gh/Sweetchuck/robo-bundler) ## Currently supported commands diff --git a/RoboFile.php b/RoboFile.php index 9cca67e..3e53e6a 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -1,10 +1,11 @@ initComposerInfo() - ->initEnvNamePrefix(); + ->initEnvVarNamePrefix() + ->initEnvironmentTypeAndName(); } /** @@ -86,15 +96,13 @@ public function setContainer(ContainerInterface $container) */ public function githookPreCommit(): CollectionBuilder { - $this->environment = 'git-hook'; + $this->gitHook = 'pre-commit'; return $this ->collectionBuilder() - ->addTaskList([ - 'lint.composer.lock' => $this->taskComposerValidate(), - 'lint.phpcs.psr2' => $this->getTaskPhpcsLint(), - 'codecept' => $this->getTaskCodeceptRunSuites(), - ]); + ->addTask($this->taskComposerValidate()) + ->addTask($this->getTaskPhpcsLint()) + ->addTask($this->getTaskCodeceptRunSuites()); } /** @@ -114,10 +122,8 @@ public function lint(): CollectionBuilder { return $this ->collectionBuilder() - ->addTaskList([ - 'lint.composer.lock' => $this->taskComposerValidate(), - 'lint.phpcs.psr2' => $this->getTaskPhpcsLint(), - ]); + ->addTask($this->taskComposerValidate()) + ->addTask($this->getTaskPhpcsLint()); } protected function errorOutput(): ?OutputInterface @@ -130,35 +136,65 @@ protected function errorOutput(): ?OutputInterface /** * @return $this */ - protected function initEnvNamePrefix() + protected function initEnvVarNamePrefix() { - $this->envNamePrefix = strtoupper(str_replace('-', '_', $this->packageName)); + $this->envVarNamePrefix = strtoupper(str_replace('-', '_', $this->packageName)); return $this; } - protected function getEnvName(string $name): string + /** + * @return $this + */ + protected function initEnvironmentTypeAndName() { - return "{$this->envNamePrefix}_" . strtoupper($name); - } + $this->environmentType = getenv($this->getEnvVarName('environment_type')); + $this->environmentName = getenv($this->getEnvVarName('environment_name')); + + if (!$this->environmentType) { + if (getenv('CI') === 'true') { + // Travis and GitLab. + $this->environmentType = 'ci'; + } elseif (getenv('JENKINS_HOME')) { + $this->environmentType = 'ci'; + if (!$this->environmentName) { + $this->environmentName = 'jenkins'; + } + } + } - protected function getEnvironment(): string - { - if ($this->environment) { - return $this->environment; + if (!$this->environmentName && $this->environmentType === 'ci') { + if (getenv('GITLAB_CI') === 'true') { + $this->environmentName = 'gitlab'; + } elseif (getenv('TRAVIS') === 'true') { + $this->environmentName = 'travis'; + } + } + + if (!$this->environmentType) { + $this->environmentType = 'dev'; } - return getenv($this->getEnvName('environment')) ?: 'dev'; + if (!$this->environmentName) { + $this->environmentName = 'local'; + } + + return $this; + } + + protected function getEnvVarName(string $name): string + { + return "{$this->envVarNamePrefix}_" . strtoupper($name); } protected function getPhpExecutable(): string { - return getenv($this->getEnvName('php_executable')) ?: PHP_BINARY; + return getenv($this->getEnvVarName('php_executable')) ?: PHP_BINARY; } protected function getPhpdbgExecutable(): string { - return getenv($this->getEnvName('phpdbg_executable')) ?: Path::join(PHP_BINDIR, 'phpdbg'); + return getenv($this->getEnvVarName('phpdbg_executable')) ?: Path::join(PHP_BINDIR, 'phpdbg'); } /** @@ -220,15 +256,12 @@ protected function getTaskCodeceptRunSuites(array $suiteNames = []): CollectionB protected function getTaskCodeceptRunSuite(string $suite): CollectionBuilder { $this->initCodeceptionInfo(); - $environment = $this->getEnvironment(); - $withCoverageHtml = in_array($environment, ['dev', 'git-hook']); - $withCoverageSerialized = in_array($environment, ['jenkins', 'travis']); - $withCoverageXml = in_array($environment, ['dev', 'jenkins', 'travis']); - $withCoverageAny = $withCoverageSerialized || $withCoverageXml || $withCoverageHtml; + $withCoverageHtml = in_array($this->environmentType, ['dev']); + $withCoverageXml = in_array($this->environmentType, ['ci']); - $withUnitReportHtml = in_array($environment, ['dev', 'git-hook']); - $withUnitReportXml = in_array($environment, ['travis', 'jenkins']); + $withUnitReportHtml = in_array($this->environmentType, ['dev']); + $withUnitReportXml = in_array($this->environmentType, ['ci']); $logDir = $this->getLogDir(); @@ -247,40 +280,54 @@ protected function getTaskCodeceptRunSuite(string $suite): CollectionBuilder $cmdPattern .= ' --ansi'; $cmdPattern .= ' --verbose'; - $tasks = []; + $cb = $this->collectionBuilder(); if ($withCoverageHtml) { $cmdPattern .= ' --coverage-html=%s'; - $cmdArgs[] = escapeshellarg("test/$suite/coverage/html"); + $cmdArgs[] = escapeshellarg("human/coverage/$suite/html"); + + $cb->addTask( + $this + ->taskFilesystemStack() + ->mkdir("$logDir/human/coverage/$suite") + ); } if ($withCoverageXml) { $cmdPattern .= ' --coverage-xml=%s'; - $cmdArgs[] = escapeshellarg("test/$suite/coverage/coverage.xml"); + $cmdArgs[] = escapeshellarg("machine/coverage/$suite/coverage.xml"); } - if ($withCoverageAny) { + if ($withCoverageHtml || $withCoverageXml) { $cmdPattern .= ' --coverage=%s'; - $cmdArgs[] = escapeshellarg("test/$suite/coverage/coverage.serialized"); + $cmdArgs[] = escapeshellarg("machine/coverage/$suite/coverage.serialized"); - $tasks['prepareCoverageDir'] = $this - ->taskFilesystemStack() - ->mkdir("$logDir/test/$suite/coverage"); + $cb->addTask( + $this + ->taskFilesystemStack() + ->mkdir("$logDir/machine/coverage/$suite") + ); } if ($withUnitReportHtml) { $cmdPattern .= ' --html=%s'; - $cmdArgs[] = escapeshellarg("test/$suite/junit/junit.html"); + $cmdArgs[] = escapeshellarg("human/junit/junit.$suite.html"); + + $cb->addTask( + $this + ->taskFilesystemStack() + ->mkdir("$logDir/human/junit") + ); } if ($withUnitReportXml) { $cmdPattern .= ' --xml=%s'; - $cmdArgs[] = escapeshellarg("test/$suite/junit/junit.xml"); - } + $cmdArgs[] = escapeshellarg("machine/junit/junit.$suite.xml"); - if ($withUnitReportXml || $withUnitReportHtml) { - $tasks['prepareJUnitDir'] = $this - ->taskFilesystemStack() - ->mkdir("$logDir/test/$suite/junit"); + $cb->addTask( + $this + ->taskFilesystemStack() + ->mkdir("$logDir/machine/junit") + ); } $cmdPattern .= ' run'; @@ -289,16 +336,14 @@ protected function getTaskCodeceptRunSuite(string $suite): CollectionBuilder $cmdArgs[] = escapeshellarg($suite); } - if ($environment === 'jenkins') { + if ($this->environmentType === 'ci' && $this->environmentName === 'jenkins') { // Jenkins has to use a post-build action to mark the build "unstable". $cmdPattern .= ' || [[ "${?}" == "1" ]]'; } $command = vsprintf($cmdPattern, $cmdArgs); - return $this - ->collectionBuilder() - ->addTaskList($tasks) + return $cb ->addCode(function () use ($command) { $this->output()->writeln(strtr( '[{name}] runs {command}', @@ -307,7 +352,7 @@ protected function getTaskCodeceptRunSuite(string $suite): CollectionBuilder '{command}' => $command, ] )); - $process = new Process($command); + $process = new Process($command, null, null, null, null); $exitCode = $process->run(function ($type, $data) { switch ($type) { case Process::OUT: @@ -325,65 +370,54 @@ protected function getTaskCodeceptRunSuite(string $suite): CollectionBuilder } /** - * @return \Cheppers\Robo\Phpcs\Task\PhpcsLintFiles|\Robo\Collection\CollectionBuilder + * @return \Sweetchuck\Robo\Phpcs\Task\PhpcsLintFiles|\Robo\Collection\CollectionBuilder */ protected function getTaskPhpcsLint() { - $env = $this->getEnvironment(); - - $files = [ - 'src/', - 'tests/_support/Helper/', - 'tests/acceptance/', - 'tests/unit/', - 'RoboFile.php', - ]; - $options = [ 'failOn' => 'warning', - 'standards' => ['PSR2'], 'lintReporters' => [ 'lintVerboseReporter' => null, ], - 'ignore' => [ - 'src/GitHooks/', - ], ]; - if ($env === 'jenkins') { + if ($this->environmentType === 'ci') { $logDir = $this->getLogDir(); - $options['failOn'] = 'never'; + if ($this->environmentName === 'jenkins') { + $options['failOn'] = 'never'; + } + $options['lintReporters']['lintCheckstyleReporter'] = (new CheckstyleReporter()) - ->setDestination("$logDir/checkstyle/phpcs.psr2.xml"); + ->setDestination("$logDir/machine/checkstyle/phpcs.psr2.xml"); } - if ($env !== 'git-hook') { - return $this->taskPhpcsLintFiles($options + ['files' => $files]); + if ($this->gitHook !== 'pre-commit') { + return $this->taskPhpcsLintFiles($options); } - $assetJar = new Cheppers\AssetJar\AssetJar(); + $files = [ + 'src/', + 'src-dev/Composer/', + 'tests/_support/', + 'tests/acceptance/', + 'tests/unit/', + 'RoboFile.php', + ]; + + $options['ignore'] = [ + '*.yml', + ]; return $this ->collectionBuilder() - ->addTaskList([ - 'git.readStagedFiles' => $this - ->taskGitReadStagedFiles() - ->setCommandOnly(true) - ->setAssetJar($assetJar) - ->setAssetJarMap('files', ['files']) - ->setPaths($files), - 'lint.phpcs.psr2' => $this - ->taskPhpcsLintInput($options) - ->setIgnore([ - '*/composer.json', - '*/.gitignore', - '*.txt', - '*.yml', - ]) - ->setAssetJar($assetJar) - ->setAssetJarMap('files', ['files']), - ]); + ->addTask($this + ->taskGitReadStagedFiles() + ->setCommandOnly(true) + ->setPaths($files)) + ->addTask($this + ->taskPhpcsLintInput($options) + ->deferTaskConfiguration('setFiles', 'files')); } protected function isPhpExtensionAvailable(string $extension): bool diff --git a/codeception.yml b/codeception.yml index 48347bb..f7cac17 100644 --- a/codeception.yml +++ b/codeception.yml @@ -1,5 +1,5 @@ -namespace: Cheppers\Robo\Bundler\Test +namespace: Sweetchuck\Robo\Bundler\Test actor: Tester diff --git a/composer.json b/composer.json index 551584a..3c7c462 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "cheppers/robo-bundler", + "name": "sweetchuck/robo-bundler", "description": "Robo task wrapper for Bundler.", "license": "GPL-2.0", "config": { @@ -10,13 +10,13 @@ "prefer-stable": true, "require": { "php": ">=7.1", - "cheppers/asset-jar": "^0.0", + "sweetchuck/asset-jar": "^0.0", "consolidation/robo": "^1.0" }, "require-dev": { - "cheppers/git-hooks": "^0.0", - "cheppers/robo-git": "^0.0", - "cheppers/robo-phpcs": "^0.0", + "sweetchuck/git-hooks": "^0.0", + "sweetchuck/robo-git": "^0.0", + "sweetchuck/robo-phpcs": "^0.0", "codeception/codeception": "^2.2", "danielstjules/stringy": "^3.0", "symfony/finder": "^3.2", @@ -24,22 +24,21 @@ }, "autoload": { "psr-4": { - "Cheppers\\Robo\\Bundler\\": "src/" + "Sweetchuck\\Robo\\Bundler\\": "src/" } }, "autoload-dev": { "psr-4": { - "Cheppers\\Robo\\Bundler\\Test\\Helper\\": "tests/_support/Helper/", - "Cheppers\\Robo\\Bundler\\Tests\\Acceptance\\": "tests/acceptance/", - "Cheppers\\Robo\\Bundler\\Tests\\Unit\\": "tests/unit/" + "Sweetchuck\\Robo\\Bundler\\Composer\\": "src-dev/Composer/", + "Sweetchuck\\Robo\\Bundler\\Test\\Helper\\": "tests/_support/Helper/", + "Sweetchuck\\Robo\\Bundler\\Tests\\Acceptance\\": "tests/acceptance/", + "Sweetchuck\\Robo\\Bundler\\Tests\\Unit\\": "tests/unit/" } }, "scripts": { - "post-install-cmd": [ - "\\Cheppers\\Robo\\Bundler\\Composer\\Scripts::postInstallCmd" - ], - "post-update-cmd": [ - "\\Cheppers\\Robo\\Bundler\\Composer\\Scripts::postUpdateCmd" - ] + "post-install-cmd": "\\Sweetchuck\\Robo\\Bundler\\Composer\\Scripts::postInstallCmd", + "post-update-cmd": "\\Sweetchuck\\Robo\\Bundler\\Composer\\Scripts::postUpdateCmd", + "deploy-git-hooks": "\\Sweetchuck\\GitHooks\\Composer\\Scripts::deploy", + "bundle-check-install": "\\Sweetchuck\\Robo\\Bundler\\Composer\\Scripts::bundleCheckAndInstall" } } diff --git a/composer.lock b/composer.lock index 06c925f..d1dadea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,56 +4,24 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "43f00f36088bc6b2cf00e8046d4fe7c4", + "content-hash": "c97cae4909929448ce918f616835a8bb", "packages": [ - { - "name": "cheppers/asset-jar", - "version": "v0.0.1", - "source": { - "type": "git", - "url": "https://github.com/Cheppers/asset-jar.git", - "reference": "ef34273299c55defb0da78090b92a44125cf8ab2" - }, - "dist": { - "type": "zip", - "url": "https://github.com/gitapi/repos/Cheppers/asset-jar/zipball/ef34273299c55defb0da78090b92a44125cf8ab2", - "reference": "ef34273299c55defb0da78090b92a44125cf8ab2", - "shasum": "" - }, - "require-dev": { - "phpunit/php-code-coverage": "^4.0", - "phpunit/phpunit": "^5.4", - "squizlabs/php_codesniffer": "^2.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cheppers\\AssetJar\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "description": "Provides a very simple, shared, in-memory data storage.", - "time": "2016-07-30T09:09:38+00:00" - }, { "name": "consolidation/annotated-command", - "version": "2.4.8", + "version": "2.4.11", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "6672ea38212f8bffb71fec7eadc8b3372154b17e" + "reference": "7fbf68dc6abf2f1f0746ceab0701dee1ee97516e" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/consolidation/annotated-command/zipball/6672ea38212f8bffb71fec7eadc8b3372154b17e", - "reference": "6672ea38212f8bffb71fec7eadc8b3372154b17e", + "url": "https://github.com/gitapi/repos/consolidation/annotated-command/zipball/7fbf68dc6abf2f1f0746ceab0701dee1ee97516e", + "reference": "7fbf68dc6abf2f1f0746ceab0701dee1ee97516e", "shasum": "" }, "require": { - "consolidation/output-formatters": "^3.1.5", + "consolidation/output-formatters": "^3.1.10", "php": ">=5.4.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", "psr/log": "^1", @@ -88,20 +56,20 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2017-04-03T22:37:00+00:00" + "time": "2017-07-27T20:29:17+00:00" }, { "name": "consolidation/config", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/consolidation/config.git", - "reference": "b30571aa8f0eae40581ae8b8aeaa26706b444781" + "reference": "e3c7311f8926488fe2fbce0ec6af56be417da504" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/consolidation/config/zipball/b30571aa8f0eae40581ae8b8aeaa26706b444781", - "reference": "b30571aa8f0eae40581ae8b8aeaa26706b444781", + "url": "https://github.com/gitapi/repos/consolidation/config/zipball/e3c7311f8926488fe2fbce0ec6af56be417da504", + "reference": "e3c7311f8926488fe2fbce0ec6af56be417da504", "shasum": "" }, "require": { @@ -137,7 +105,7 @@ } ], "description": "Provide configuration services for a commandline tool.", - "time": "2017-06-28T18:24:02+00:00" + "time": "2017-07-28T18:05:53+00:00" }, { "name": "consolidation/log", @@ -237,21 +205,21 @@ }, { "name": "consolidation/robo", - "version": "1.1.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "36fe43c6be39dd2299d9a3e551f45c5ac15013ec" + "reference": "46340c0ba2477e6f30a22ebaa072da0ba2b15bb1" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/consolidation/Robo/zipball/36fe43c6be39dd2299d9a3e551f45c5ac15013ec", - "reference": "36fe43c6be39dd2299d9a3e551f45c5ac15013ec", + "url": "https://github.com/gitapi/repos/consolidation/Robo/zipball/46340c0ba2477e6f30a22ebaa072da0ba2b15bb1", + "reference": "46340c0ba2477e6f30a22ebaa072da0ba2b15bb1", "shasum": "" }, "require": { "consolidation/annotated-command": "^2.2", - "consolidation/config": "^1", + "consolidation/config": "^1.0.1", "consolidation/log": "~1", "consolidation/output-formatters": "^3.1.5", "league/container": "^2.2", @@ -312,7 +280,7 @@ } ], "description": "Modern task runner", - "time": "2017-06-29T15:42:54+00:00" + "time": "2017-07-28T21:29:52+00:00" }, { "name": "container-interop/container-interop", @@ -573,22 +541,22 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "46f7e8bb075036c92695b15a1ddb6971c751e585" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://github.com/gitapi/repos/phpDocumentor/ReflectionDocBlock/zipball/46f7e8bb075036c92695b15a1ddb6971c751e585", + "reference": "46f7e8bb075036c92695b15a1ddb6971c751e585", "shasum": "" }, "require": { "php": ">=5.5", "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { @@ -614,24 +582,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30T07:12:33+00:00" + "time": "2017-07-15T11:38:20+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2.1", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "url": "https://github.com/gitapi/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -661,7 +629,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25T06:54:22+00:00" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "psr/container", @@ -759,9 +727,44 @@ ], "time": "2016-10-10T12:19:37+00:00" }, + { + "name": "sweetchuck/asset-jar", + "version": "v0.0.2", + "source": { + "type": "git", + "url": "https://github.com/Sweetchuck/asset-jar.git", + "reference": "a6d4d67db8eef018aa10779b3906fb109bcb6508" + }, + "dist": { + "type": "zip", + "url": "https://github.com/gitapi/repos/Sweetchuck/asset-jar/zipball/a6d4d67db8eef018aa10779b3906fb109bcb6508", + "reference": "a6d4d67db8eef018aa10779b3906fb109bcb6508", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/php-code-coverage": "^4.0", + "phpunit/phpunit": "^5.4", + "squizlabs/php_codesniffer": "^2.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sweetchuck\\AssetJar\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "description": "Provides a very simple, shared, in-memory data storage.", + "time": "2017-07-29T07:37:14+00:00" + }, { "name": "symfony/console", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -830,16 +833,16 @@ }, { "name": "symfony/debug", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "bcfd02728d9b776e5c2195a4750c813fe440402f" + "reference": "63b85a968486d95ff9542228dc2e4247f16f9743" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/symfony/debug/zipball/bcfd02728d9b776e5c2195a4750c813fe440402f", - "reference": "bcfd02728d9b776e5c2195a4750c813fe440402f", + "url": "https://github.com/gitapi/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743", + "reference": "63b85a968486d95ff9542228dc2e4247f16f9743", "shasum": "" }, "require": { @@ -882,11 +885,11 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-06-06T14:51:55+00:00" + "time": "2017-07-05T13:02:37+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -949,16 +952,16 @@ }, { "name": "symfony/filesystem", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "311fa718389efbd8b627c272b9324a62437018cc" + "reference": "427987eb4eed764c3b6e38d52a0f87989e010676" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/symfony/filesystem/zipball/311fa718389efbd8b627c272b9324a62437018cc", - "reference": "311fa718389efbd8b627c272b9324a62437018cc", + "url": "https://github.com/gitapi/repos/symfony/filesystem/zipball/427987eb4eed764c3b6e38d52a0f87989e010676", + "reference": "427987eb4eed764c3b6e38d52a0f87989e010676", "shasum": "" }, "require": { @@ -994,11 +997,11 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-06-24T09:29:48+00:00" + "time": "2017-07-11T07:17:58+00:00" }, { "name": "symfony/finder", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -1106,16 +1109,16 @@ }, { "name": "symfony/process", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30" + "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/symfony/process/zipball/5ab8949b682b1bf9d4511a228b5e045c96758c30", - "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30", + "url": "https://github.com/gitapi/repos/symfony/process/zipball/07432804942b9f6dd7b7377faf9920af5f95d70a", + "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a", "shasum": "" }, "require": { @@ -1151,11 +1154,11 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-07-03T08:12:02+00:00" + "time": "2017-07-13T13:05:09+00:00" }, { "name": "symfony/yaml", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -1319,174 +1322,18 @@ ], "time": "2016-10-30T11:50:56+00:00" }, - { - "name": "cheppers/git-hooks", - "version": "v0.0.9", - "source": { - "type": "git", - "url": "https://github.com/Cheppers/git-hooks.git", - "reference": "a846af41a1ea63d09bb8d49d9b1631e1a8eb63f8" - }, - "dist": { - "type": "zip", - "url": "https://github.com/gitapi/repos/Cheppers/git-hooks/zipball/a846af41a1ea63d09bb8d49d9b1631e1a8eb63f8", - "reference": "a846af41a1ea63d09bb8d49d9b1631e1a8eb63f8", - "shasum": "" - }, - "require-dev": { - "behat/behat": "~3.1", - "consolidation/robo": "~1.0", - "pear/archive_tar": "~1.4", - "phpunit/phpunit": "~4.5", - "squizlabs/php_codesniffer": "~2.6", - "symfony/filesystem": "~3.1", - "symfony/process": "~3.1" - }, - "type": "library", - "extra": { - "cheppers/git-hooks": { - "symlink": true - } - }, - "autoload": { - "psr-4": { - "Cheppers\\GitHooks\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0" - ], - "description": "Provide a bridge between Git hooks and scripts under VCS.", - "time": "2016-10-15T10:06:14+00:00" - }, - { - "name": "cheppers/lint-report", - "version": "v0.0.5", - "source": { - "type": "git", - "url": "https://github.com/Cheppers/lint-report.git", - "reference": "adc7536bea7df3fa8de378e0dff5dcbb9b644af8" - }, - "dist": { - "type": "zip", - "url": "https://github.com/gitapi/repos/Cheppers/lint-report/zipball/adc7536bea7df3fa8de378e0dff5dcbb9b644af8", - "reference": "adc7536bea7df3fa8de378e0dff5dcbb9b644af8", - "shasum": "" - }, - "require": { - "league/container": "^2.2", - "symfony/console": "^2.8 || ^3.1", - "symfony/filesystem": "^2.8 || ^3.1", - "symfony/yaml": "^2.8 || ^3.1" - }, - "require-dev": { - "cheppers/git-hooks": "^0.0.8", - "codeception/codeception": "^2.2", - "squizlabs/php_codesniffer": "2.6.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cheppers\\LintReport\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "description": "Generate reports from lint results", - "time": "2016-12-14T21:09:07+00:00" - }, - { - "name": "cheppers/robo-git", - "version": "v0.0.5", - "source": { - "type": "git", - "url": "https://github.com/Cheppers/robo-git.git", - "reference": "3c714e25cc2432dab4a73818f8373789db94bc7c" - }, - "dist": { - "type": "zip", - "url": "https://github.com/gitapi/repos/Cheppers/robo-git/zipball/3c714e25cc2432dab4a73818f8373789db94bc7c", - "reference": "3c714e25cc2432dab4a73818f8373789db94bc7c", - "shasum": "" - }, - "require": { - "cheppers/asset-jar": "^0.0", - "consolidation/robo": "^1.0", - "php": ">=7.1" - }, - "require-dev": { - "cheppers/git-hooks": "^0.0", - "codeception/codeception": "^2.2", - "squizlabs/php_codesniffer": "^2.7" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cheppers\\Robo\\Git\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0" - ], - "description": "Robo task to read the content of the staged files", - "time": "2017-04-09T11:26:24+00:00" - }, - { - "name": "cheppers/robo-phpcs", - "version": "v0.0.13", - "source": { - "type": "git", - "url": "https://github.com/Cheppers/robo-phpcs.git", - "reference": "a51afcac51bbea71906980390b958507ec76798a" - }, - "dist": { - "type": "zip", - "url": "https://github.com/gitapi/repos/Cheppers/robo-phpcs/zipball/a51afcac51bbea71906980390b958507ec76798a", - "reference": "a51afcac51bbea71906980390b958507ec76798a", - "shasum": "" - }, - "require": { - "cheppers/asset-jar": "^0.0", - "cheppers/lint-report": "^0.0", - "consolidation/robo": "^1.0", - "php": ">=7.1", - "squizlabs/php_codesniffer": "^2.6" - }, - "require-dev": { - "cheppers/git-hooks": "^0.0", - "cheppers/robo-git": "^0.0", - "codeception/codeception": "^2.2", - "symfony/yaml": "^2.8 || ^3.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cheppers\\Robo\\Phpcs\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "description": "Robo task wrapper for PHPCS", - "time": "2017-06-15T21:08:20+00:00" - }, { "name": "codeception/codeception", - "version": "2.3.3", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "67cd520b4f20cdfc3a52d1a0022924125822a8e6" + "reference": "b5391497f9a3c9d0a9c02ae39b53441e413e35a8" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/Codeception/Codeception/zipball/67cd520b4f20cdfc3a52d1a0022924125822a8e6", - "reference": "67cd520b4f20cdfc3a52d1a0022924125822a8e6", + "url": "https://github.com/gitapi/repos/Codeception/Codeception/zipball/b5391497f9a3c9d0a9c02ae39b53441e413e35a8", + "reference": "b5391497f9a3c9d0a9c02ae39b53441e413e35a8", "shasum": "" }, "require": { @@ -1523,6 +1370,7 @@ "php-amqplib/php-amqplib": "~2.4", "predis/predis": "^1.0", "squizlabs/php_codesniffer": "~2.0", + "symfony/process": ">=2.7 <4.0", "vlucas/phpdotenv": "^2.4.0" }, "suggest": { @@ -1567,7 +1415,7 @@ "functional testing", "unit testing" ], - "time": "2017-06-02T00:22:30+00:00" + "time": "2017-07-10T19:45:09+00:00" }, { "name": "danielstjules/stringy", @@ -1627,32 +1475,32 @@ }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://github.com/gitapi/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -1677,7 +1525,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "facebook/webdriver", @@ -3244,18 +3092,175 @@ "description": "Automatic BASH completion for Symfony Console Component based applications.", "time": "2016-02-24T05:08:54+00:00" }, + { + "name": "sweetchuck/git-hooks", + "version": "v0.0.10", + "source": { + "type": "git", + "url": "https://github.com/Sweetchuck/git-hooks.git", + "reference": "59d66a1258c27101a63b35ad35d1bb4546e79071" + }, + "dist": { + "type": "zip", + "url": "https://github.com/gitapi/repos/Sweetchuck/git-hooks/zipball/59d66a1258c27101a63b35ad35d1bb4546e79071", + "reference": "59d66a1258c27101a63b35ad35d1bb4546e79071", + "shasum": "" + }, + "require-dev": { + "behat/behat": "~3.1", + "consolidation/robo": "~1.0", + "php": ">=7.1", + "phpunit/phpunit": "^6.2", + "squizlabs/php_codesniffer": "~2.6", + "symfony/filesystem": "~3.1", + "symfony/process": "~3.1" + }, + "type": "library", + "extra": { + "sweetchuck/git-hooks": { + "symlink": true + } + }, + "autoload": { + "psr-4": { + "Sweetchuck\\GitHooks\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "description": "Provide a bridge between Git hooks and scripts under VCS.", + "time": "2017-07-28T20:43:48+00:00" + }, + { + "name": "sweetchuck/lint-report", + "version": "v0.0.6", + "source": { + "type": "git", + "url": "https://github.com/Sweetchuck/lint-report.git", + "reference": "ce77db1c44c8662e798b16605d53975d44a9b91c" + }, + "dist": { + "type": "zip", + "url": "https://github.com/gitapi/repos/Sweetchuck/lint-report/zipball/ce77db1c44c8662e798b16605d53975d44a9b91c", + "reference": "ce77db1c44c8662e798b16605d53975d44a9b91c", + "shasum": "" + }, + "require": { + "league/container": "^2.2", + "php": ">=7.1", + "symfony/console": "^2.8 || ^3.1", + "symfony/filesystem": "^2.8 || ^3.1", + "symfony/yaml": "^2.8 || ^3.1" + }, + "require-dev": { + "codeception/codeception": "^2.2", + "squizlabs/php_codesniffer": "2.6.2", + "sweetchuck/git-hooks": "^0.0.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sweetchuck\\LintReport\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "description": "Generate reports from lint results", + "time": "2017-07-29T07:17:19+00:00" + }, + { + "name": "sweetchuck/robo-git", + "version": "v0.0.7", + "source": { + "type": "git", + "url": "https://github.com/Sweetchuck/robo-git.git", + "reference": "969795e6f75215d93c54dc106b698b8a524ab711" + }, + "dist": { + "type": "zip", + "url": "https://github.com/gitapi/repos/Sweetchuck/robo-git/zipball/969795e6f75215d93c54dc106b698b8a524ab711", + "reference": "969795e6f75215d93c54dc106b698b8a524ab711", + "shasum": "" + }, + "require": { + "consolidation/robo": "^1.0", + "php": ">=7.1" + }, + "require-dev": { + "codeception/codeception": "^2.2", + "squizlabs/php_codesniffer": "^3.0", + "sweetchuck/git-hooks": "^0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sweetchuck\\Robo\\Git\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "description": "Robo task to read the content of the staged files", + "time": "2017-07-29T19:26:47+00:00" + }, + { + "name": "sweetchuck/robo-phpcs", + "version": "v0.0.15", + "source": { + "type": "git", + "url": "https://github.com/Sweetchuck/robo-phpcs.git", + "reference": "8bf185f3d3a1402bb9425b412867456fedc452d1" + }, + "dist": { + "type": "zip", + "url": "https://github.com/gitapi/repos/Sweetchuck/robo-phpcs/zipball/8bf185f3d3a1402bb9425b412867456fedc452d1", + "reference": "8bf185f3d3a1402bb9425b412867456fedc452d1", + "shasum": "" + }, + "require": { + "consolidation/robo": "^1.0", + "php": ">=7.1", + "squizlabs/php_codesniffer": "^2.6", + "sweetchuck/lint-report": "^0.0" + }, + "require-dev": { + "codeception/codeception": "^2.2", + "sweetchuck/codeception-module-robo-task-runner": "^0.0", + "sweetchuck/git-hooks": "^0.0", + "sweetchuck/robo-git": "^0.0", + "symfony/yaml": "^2.8 || ^3.1", + "webmozart/path-util": "^2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sweetchuck\\Robo\\Phpcs\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "description": "Robo task wrapper for PHPCS", + "time": "2017-07-29T19:20:40+00:00" + }, { "name": "symfony/browser-kit", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "3a4435e79a8401746e8525e98039199d0924b4e5" + "reference": "8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0" }, "dist": { "type": "zip", - "url": "https://github.com/gitapi/repos/symfony/browser-kit/zipball/3a4435e79a8401746e8525e98039199d0924b4e5", - "reference": "3a4435e79a8401746e8525e98039199d0924b4e5", + "url": "https://github.com/gitapi/repos/symfony/browser-kit/zipball/8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0", + "reference": "8079a6b3668ef15cdbf73a4c7d31081abb8bb5f0", "shasum": "" }, "require": { @@ -3299,11 +3304,11 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-06-24T09:29:48+00:00" + "time": "2017-07-12T13:03:20+00:00" }, { "name": "symfony/css-selector", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -3356,7 +3361,7 @@ }, { "name": "symfony/dom-crawler", - "version": "v3.3.3", + "version": "v3.3.5", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..4dbe04f --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,16 @@ + + + src/ + src-dev/Composer/ + tests/ + tests/_data/ + tests/_output/ + tests/_support/_generated/ + RoboFile.php + + + + + RoboFile.php + + diff --git a/src-dev/Composer/Scripts.php b/src-dev/Composer/Scripts.php new file mode 100644 index 0000000..3a81bf0 --- /dev/null +++ b/src-dev/Composer/Scripts.php @@ -0,0 +1,102 @@ +isDevMode()) { + static::init($event); + + $return[] = GitHooks::deploy($event); + $return[] = static::bundleCheckAndInstall($event); + } + + return count(array_keys($return, false, true)) === 0; + } + + public static function postUpdateCmd(Event $event): bool + { + $return = []; + + if ($event->isDevMode()) { + static::init($event); + + $return[] = GitHooks::deploy($event); + } + + return count(array_keys($return, false, true)) === 0; + } + + public static function bundleCheckAndInstall(Event $event): bool + { + $return = true; + + if ($event->isDevMode()) { + static::init($event); + + $cmdPattern = [ + 'cd %s', + 'gem install bundler:%s --no-document', + 'export BUNDLE_GEMFILE=%s', + 'bundle check || bundle install', + ]; + $cmdArgs = [ + 'tests/_data', + static::$bundlerVersion, + 'Gemfile.success.rb', + static::$bundlerVersion, + ]; + + $process = new Process(vsprintf(implode(' && ', $cmdPattern), $cmdArgs)); + $exitCode = $process->run(static::$processCallbackWrapper); + + $return = !$exitCode; + } + + return $return; + } + + protected static function init(Event $event) + { + if (static::$event) { + return; + } + + static::$event = $event; + static::$processCallbackWrapper = function (string $type, string $text) { + static::processCallback($type, $text); + }; + } + + protected static function processCallback(string $type, string $text) + { + if ($type === Process::OUT) { + static::$event->getIO()->write($text); + } else { + static::$event->getIO()->writeError($text); + } + } +} diff --git a/src/BundlerTaskLoader.php b/src/BundlerTaskLoader.php index f9769ca..e282343 100644 --- a/src/BundlerTaskLoader.php +++ b/src/BundlerTaskLoader.php @@ -1,13 +1,13 @@ roboTaskStdOutput[$id]->getErrorOutput(); return $errorOutput->output; diff --git a/tests/_support/Helper/RoboFiles/BundleRoboFile.php b/tests/_support/Helper/RoboFiles/BundleRoboFile.php index a0acba2..b56d3fa 100644 --- a/tests/_support/Helper/RoboFiles/BundleRoboFile.php +++ b/tests/_support/Helper/RoboFiles/BundleRoboFile.php @@ -1,9 +1,9 @@ ['paths' => ['bundleShowPaths', 'paths']], ]; - /** @var \Cheppers\Robo\Bundler\Task\BundleShowPathsTask $task */ + /** @var \Sweetchuck\Robo\Bundler\Task\BundleShowPathsTask $task */ $task = Stub::construct( BundleShowPathsTask::class, [$options],