diff --git a/CHANGELOG.md b/CHANGELOG.md index 2518249a..eb635075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Not released yet +* Add support for importing remote functions and tasks * Add a option `ignoreValidationErrors` on `AsTask` attribute to ignore parameters & options validation errors * Add a way to merge an application `box.json` config file used by `castor:repack`command diff --git a/bin/generate-tests.php b/bin/generate-tests.php index db6c9065..14d06a73 100755 --- a/bin/generate-tests.php +++ b/bin/generate-tests.php @@ -26,9 +26,15 @@ $application = ApplicationFactory::create(); $application->setAutoExit(false); $application - ->run(new ArrayInput(['command' => 'list', '--format' => 'json']), $o = new BufferedOutput()) + ->run(new ArrayInput(['command' => 'list', '--format' => 'json', '--no-interaction']), $o = new BufferedOutput()) ; -$applicationDescription = json_decode($o->fetch(), true); +$json = $o->fetch(); + +try { + $applicationDescription = json_decode($json, true, flags: \JSON_THROW_ON_ERROR); +} catch (JsonException $e) { + throw new RuntimeException('Could not get the list of commands: ' . $json, previous: $e); +} $taskFilterList = [ '_complete', @@ -69,10 +75,14 @@ 'log:info', 'log:with-context', 'parallel:sleep', + 'remote-import:remote-tasks', 'run:ls', 'run:run-parallel', + // Imported tasks + 'pyrech:hello-example', + 'pyrech:foobar', ]; -$optionFilterList = array_flip(['help', 'quiet', 'verbose', 'version', 'ansi', 'no-ansi', 'no-interaction', 'context']); +$optionFilterList = array_flip(['help', 'quiet', 'verbose', 'version', 'ansi', 'no-ansi', 'no-interaction', 'context', 'no-remote', 'update-remotes']); foreach ($applicationDescription['commands'] as $task) { if (in_array($task['name'], $taskFilterList, true)) { continue; @@ -144,6 +154,7 @@ function add_test(array $args, string $class, ?string $cwd = null) env: [ 'COLUMNS' => 120, 'ENDPOINT' => $_SERVER['ENDPOINT'], + 'CASTOR_NO_REMOTE' => 1, ], timeout: null, ); diff --git a/doc/getting-started/basic-usage.md b/doc/getting-started/basic-usage.md index c9bdd065..ab2ec88b 100644 --- a/doc/getting-started/basic-usage.md +++ b/doc/getting-started/basic-usage.md @@ -73,6 +73,10 @@ import(__DIR__ . '/my-app/castor'); > You cannot dynamically import tasks. The `import()` function must be called > at the top level of the file. +> [!NOTE] +> You can also import functions from a remote resource. See the +> [related documentation](../going-further/extending-castor/remote-imports.md). + ## Overriding task name, namespace or description The `Castor\Attribute\AsTask` attribute takes three optional diff --git a/doc/going-further/extending-castor/events.md b/doc/going-further/extending-castor/events.md index 65679837..7a216e73 100644 --- a/doc/going-further/extending-castor/events.md +++ b/doc/going-further/extending-castor/events.md @@ -30,6 +30,10 @@ function my_event_listener(AfterApplicationInitializationEvent|AfterExecuteTaskE Here is the built-in events triggered by Castor: +* `Castor\Event\BeforeApplicationInitializationEvent`: This event is triggered + before the application has been initialized and before the task and context + has been looked at. It provides access to the `Application` instance; + * `Castor\Event\AfterApplicationInitializationEvent`: This event is triggered after the application has been initialized. It provides access to the `Application` instance and an array of `TaskDescriptor` objects; diff --git a/doc/going-further/extending-castor/remote-imports.md b/doc/going-further/extending-castor/remote-imports.md new file mode 100644 index 00000000..d0bd46ab --- /dev/null +++ b/doc/going-further/extending-castor/remote-imports.md @@ -0,0 +1,143 @@ +# Import remote functions + +Castor can import functions from your filesystem but also from a remote resource. + +## Importing functions + +When importing functions from a remote resource, Castor will use Composer to +download the packages and store them in `.castor/vendor/`. + +To import functions, you need to use the same `import()` function used to import +your tasks, but this time with a different syntax for the `path` argument. + +The import syntax depends on the source of the packages. + +### From a Composer package (scheme `composer://`) + +This is the most common use case when the functions to import are defined in a +Composer package. You can directly import them by using the package name +prefixed with the `composer://` scheme: + +```php +use function Castor\import; + +import('composer://organization/package'); +``` + +This will import all the tasks defined in the package. + +#### Specify the version + +You can define the version of the package to import by using the `version` +argument: + +```php +use function Castor\import; + +import('composer://organization/package', version: '^1.0'); +``` + +You can use any version constraint supported by Composer (like `*`, `dev-main`, +`^1.0`, etc.). See the [Composer documentation](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints) +for more information. + +> [!TIP] +> The `version` argument is optional and will default to `*` (aka the latest +> stable version). + +#### Import from a package not pushed to packagist.org + +In some cases, you may have a Composer package that is not pushed to +packagist.org (like a private package hosted on packagist.com or another package +registry). In such cases, you can import it by using the `vcs` argument to +specify the repository URL where the package is hosted: + +```php + +use function Castor\import; + +import('composer://organization/package', vcs: 'https://github.com/organization/repository.git'); +``` + +### From a repository (scheme `package://`) + +If the functions you want to import are not available as a Composer package, you +can still import them by using a special configuration that Composer will +understand. This will now use the `package://` scheme. + +```php +use function Castor\import; + +import('package://organization/package', source: [ + 'url' => 'https://github.com/organization/repository.git', + 'type' => 'git', // 'Any source type supported by Composer (git, svn, etc)' + 'reference' => 'main', // A commit id, a branch or a tag name +]); +``` + +> [!NOTE] +> The "organization/package" name can be whatever you want and we only be used +> internally by Castor and Composer to make the repository behave like a normal +> Composer package. + +> [!TIP] +> Rather than using the `package://` scheme, it may be simpler to create a +> standard `composer.json` to your repository and import your newly created +> package by using the `composer://` scheme and the `vcs` argument. + +## Import only a specific file + +No matter where does the package come from (Composer package, git repository, +etc.), you can restrict the file (or directory) to be imported. This is +configured by using the `file` argument specifying the path inside the package +or repository. + +```php +use function Castor\import; + +import('composer://organization/package', file: 'castor/my-tasks.php'); +``` + +> [!NOTE] +> The `file` argument is optional and will empty by default, causing Castor to +> import and parse all the PHP files in the package. While handy, it's probably +> not what you want if your package contains PHP code that are not related to +> Castor. + +## Preventing remote imports + +In case you have trouble with the imported functions (or if you don't trust +them), you can prevent Castor from importing and running any of them. Just add +the `--no-remote` option when calling any Castor tasks: + +```bash +$ castor --no-remote my-task +``` + +This will trigger a warning to remind you that the remote imports are disabled. +Also, any task or configuration using an imported function will trigger an error +with Castor complaining about undefined functions. + +If you want to disable remote imports every time, you can define the +`CASTOR_NO_REMOTE` environment variable to 1: + +```bash +$ export CASTOR_NO_REMOTE=1 +$ castor my-task # will not import any remote functions +``` + +## Update imported packages + +When you import a package in a given version, Castor will not update +automatically update the packages once a new version of your dependency is +available. + +To update your dependencies, you will either need to: +- change the required version yourself (thus every one using your Castor project +will profit of the update once they run your project); +- force the update on your side only by either using the `--update-remotes` +option or by removing the `.castor/vendor/` folder. + +```bash +$ castor --update-remotes +``` diff --git a/doc/going-further/index.md b/doc/going-further/index.md index e99d8a04..1502e1ae 100644 --- a/doc/going-further/index.md +++ b/doc/going-further/index.md @@ -7,5 +7,5 @@ help you write your tasks. * [Interacting with Castor](interacting-with-castor/advanced-context.md): how to interact with Castor's output, context, logs, etc. * [Extending Castor](extending-castor/events.md): how to wire some logic -inside Castor, how to redistribute your project as your own phar or static -binary. +inside Castor, import remote tasks, redistribute your project as your own phar +or static binary, etc. diff --git a/examples/remote-import.php b/examples/remote-import.php new file mode 100644 index 00000000..3d30947e --- /dev/null +++ b/examples/remote-import.php @@ -0,0 +1,25 @@ + 'https://github.com/pyrech/castor-example-misc.git', + 'type' => 'git', + 'reference' => 'main', // commit id, branch or tag name +]); + +#[AsTask(description: 'Use functions imported from remote packages')] +function remote_tasks(): void +{ + \pyrech\helloExample(); // from composer://pyrech/castor-example + \pyrech\foobar(); // from package://pyrech/foobar +} diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9c18cc20..3126631b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,6 +5,11 @@ parameters: count: 1 path: examples/args.php + - + message: "#^Function pyrech\\\\.* not found\\.$#" + count: 2 + path: examples/ + - message: "#^Default value of the parameter \\#1 \\$data \\(array\\{\\}\\) of method Castor\\\\Context\\:\\:__construct\\(\\) is incompatible with type array\\{name\\: string, production\\: bool, foo\\?\\: string\\}\\.$#" count: 1 diff --git a/src/Console/Application.php b/src/Console/Application.php index 618ec635..e71f2bf7 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -10,6 +10,7 @@ use Castor\ContextGeneratorDescriptor; use Castor\ContextRegistry; use Castor\Event\AfterApplicationInitializationEvent; +use Castor\Event\BeforeApplicationInitializationEvent; use Castor\EventDispatcher; use Castor\ExpressionLanguage; use Castor\Fingerprint\FingerprintHelper; @@ -17,6 +18,7 @@ use Castor\GlobalHelper; use Castor\ListenerDescriptor; use Castor\PlatformUtil; +use Castor\Remote\Importer; use Castor\SectionOutput; use Castor\SymfonyTaskDescriptor; use Castor\TaskDescriptor; @@ -60,10 +62,11 @@ public function __construct( public readonly ExpressionLanguage $expressionLanguage, public readonly Logger $logger, public readonly Filesystem $fs, + public readonly WaitForHelper $waitForHelper, + public readonly FingerprintHelper $fingerprintHelper, + public readonly Importer $importer, public HttpClientInterface $httpClient, public CacheItemPoolInterface&CacheInterface $cache, - public WaitForHelper $waitForHelper, - public FingerprintHelper $fingerprintHelper, ) { $handler = ErrorHandler::register(); $handler->setDefaultLogger($logger, [ @@ -134,6 +137,9 @@ public function doRun(InputInterface $input, OutputInterface $output): int $this->symfonyStyle = new SymfonyStyle($input, $output); $this->logger->pushHandler(new ConsoleHandler($output)); + $event = new BeforeApplicationInitializationEvent($this); + $this->eventDispatcher->dispatch($event); + $descriptors = $this->initializeApplication($input); // Must be done after the initializeApplication() call, to ensure all @@ -218,6 +224,24 @@ private function initializeApplication(InputInterface $input): TaskDescriptorCol )); } + $this->getDefinition()->addOption( + new InputOption( + 'no-remote', + null, + InputOption::VALUE_NONE, + 'Skips the import of all remote remote packages.', + ) + ); + + $this->getDefinition()->addOption( + new InputOption( + 'update-remotes', + null, + InputOption::VALUE_NONE, + 'Force the update of remote packages.', + ) + ); + return new TaskDescriptorCollection($tasks, $symfonyTasks); } diff --git a/src/Console/ApplicationFactory.php b/src/Console/ApplicationFactory.php index 98303351..835fdae0 100644 --- a/src/Console/ApplicationFactory.php +++ b/src/Console/ApplicationFactory.php @@ -15,6 +15,9 @@ use Castor\Monolog\Processor\ProcessProcessor; use Castor\PathHelper; use Castor\PlatformUtil; +use Castor\Remote\Composer; +use Castor\Remote\Importer; +use Castor\Remote\Listener\RemoteImportListener; use Castor\Stub\StubsGenerator; use Castor\WaitForHelper; use Monolog\Logger; @@ -49,6 +52,7 @@ public static function create(): SymfonyApplication $cache = new FilesystemAdapter(directory: $cacheDir); $logger = new Logger('castor', [], [new ProcessProcessor()]); $fs = new Filesystem(); + $importer = new Importer($logger, new Composer($fs, $logger)); $eventDispatcher = new EventDispatcher(logger: $logger); $eventDispatcher->addSubscriber(new UpdateCastorListener( $cache, @@ -59,6 +63,7 @@ public static function create(): SymfonyApplication new StubsGenerator($logger), $rootDir, )); + $eventDispatcher->addSubscriber(new RemoteImportListener($importer)); /** @var SymfonyApplication */ // @phpstan-ignore-next-line @@ -70,10 +75,11 @@ public static function create(): SymfonyApplication new ExpressionLanguage($contextRegistry), $logger, $fs, - $httpClient, - $cache, new WaitForHelper($httpClient, $logger), new FingerprintHelper($cache), + $importer, + $httpClient, + $cache, ); $application->setDispatcher($eventDispatcher); diff --git a/src/Event/BeforeApplicationInitializationEvent.php b/src/Event/BeforeApplicationInitializationEvent.php new file mode 100644 index 00000000..3bedb62b --- /dev/null +++ b/src/Event/BeforeApplicationInitializationEvent.php @@ -0,0 +1,13 @@ + 'This file is managed by Castor. Do not edit it manually.', + 'config' => [ + 'sort-packages' => true, + ], + 'replace' => [ + 'castor/castor' => Application::VERSION, + ], + ]; + + public function __construct( + private readonly Filesystem $filesystem, + private readonly LoggerInterface $logger, + /** @var array */ + private array $configuration = self::DEFAULT_COMPOSER_CONFIGURATION, + ) { + } + + /** + * @return array + */ + public function getConfiguration(): array + { + return $this->configuration; + } + + /** + * @param array $configuration + */ + public function setConfiguration(array $configuration): void + { + $this->configuration = $configuration; + } + + public function update(bool $force = false, bool $displayProgress = true): void + { + $composer = (new ExecutableFinder())->find('composer'); + + if (!$composer) { + throw new ComposerError('The "composer" executable was not found. In order to use remote import, please make sure that Composer is installed and available in your PATH.'); + } + + $dir = PathHelper::getRoot() . self::VENDOR_DIR; + + if (!is_dir($dir)) { + mkdir($dir, recursive: true); + } + + file_put_contents($dir . '.gitignore', "*\n"); + + $this->writeJsonFile($dir . 'composer.json', $this->configuration); + + $ran = fingerprint(function () use ($displayProgress) { + $progressIndicator = null; + if ($displayProgress) { + $progressIndicator = new ProgressIndicator(GlobalHelper::getOutput(), null, 100, ['⠏', '⠛', '⠹', '⢸', '⣰', '⣤', '⣆', '⡇']); + $progressIndicator->start('Downloading remote packages'); + } + + $this->run(['update'], callback: function () use ($progressIndicator) { + if ($progressIndicator) { + $progressIndicator->advance(); + } + }); + + if ($progressIndicator) { + $progressIndicator->finish('Remote packages imported'); + } + }, (string) json_encode($this->configuration, \JSON_THROW_ON_ERROR), $force); + + if (!$ran) { + $this->logger->debug('Packages were already required, no need to run Composer.'); + } + } + + public function remove(): void + { + $this->filesystem->remove(PathHelper::getRoot() . self::VENDOR_DIR); + } + + /** + * @param string[] $args + */ + private function run(array $args, callable $callback): void + { + $this->logger->debug('Running Composer command.', [ + 'args' => implode(' ', $args), + ]); + + $dir = PathHelper::getRoot() . self::VENDOR_DIR; + + $process = new Process(['composer', ...$args, '--working-dir', $dir]); + $process->setEnv([ + 'COMPOSER_VENDOR_DIR' => $dir, + ]); + $process->run($callback); + + if (!$process->isSuccessful()) { + throw new ComposerError('The Composer process failed: ' . $process->getErrorOutput()); + } + + $this->logger->debug('Composer command was successful.', [ + 'args' => implode(' ', $args), + 'output' => $process->getOutput(), + ]); + } + + /** + * @param array $json + */ + private function writeJsonFile(string $path, array $json): void + { + file_put_contents($path, json_encode($json, \JSON_PRETTY_PRINT | \JSON_THROW_ON_ERROR)); + } +} diff --git a/src/Remote/Exception/ComposerError.php b/src/Remote/Exception/ComposerError.php new file mode 100644 index 00000000..98506db9 --- /dev/null +++ b/src/Remote/Exception/ComposerError.php @@ -0,0 +1,7 @@ +>> */ + private array $imports = [], + ) { + } + + /** + * @param ?array{ + * url?: string, + * type?: "git" | "svn", + * reference?: string, + * } $source + */ + public function importFunctionsFrom(string $scheme, string $package, ?string $file = null, ?string $version = null, ?string $vcs = null, ?array $source = null): void + { + if (!$this->allowsRemote()) { + throw new ImportError(sprintf('Remote imports are disabled, skipping import of "%s".', $package)); + } + + if (isset($this->imports[$package]) && ($requiredVersion = array_key_first($this->imports[$package])) !== $version) { + throw new ImportError(sprintf('The package "%s" is already required in version "%s", could not require it in version "%s"', $package, $requiredVersion, $version)); + } + + if (!preg_match('#^(?[^/]+)/(?[^/]+)$#', $package)) { + throw new InvalidImportFormat(sprintf('The import path must be formatted like this: "%s:///".', $scheme)); + } + + if ('composer' === $scheme) { + if (null !== $source) { + throw new InvalidImportFormat('The "source" argument is not supported for Composer/Packagist packages.'); + } + + $this->importPackageWithComposer($package, version: $version ?? '*', repositoryUrl: $vcs, file: $file); + + return; + } + + if ('package' === $scheme) { + if (null !== $version || null !== $vcs) { + throw new InvalidImportFormat('The "source" and "vcs" arguments are not supported for non-Composer packages.'); + } + if (null === $source) { + throw new InvalidImportFormat('The "source" argument is required for non-Composer packages.'); + } + + $this->importPackageWithComposer($package, version: 'v1', source: $source, file: $file); + + return; + } + + throw new InvalidImportFormat(sprintf('The import scheme "%s" is not supported.', $scheme)); + } + + public function fetchPackages(): void + { + if (!$this->imports) { + $this->composer->remove(); + + return; + } + + $input = GlobalHelper::getApplication()->getInput(); + + // Need to look for the raw options as the input is not yet parsed + $forceUpdate = null === $input->getParameterOption('--update-remotes', true); + $displayProgress = null === $input->getParameterOption('--no-interaction', true); + + $autoloadPath = PathHelper::getRoot() . Composer::VENDOR_DIR . 'autoload.php'; + + if (!file_exists($autoloadPath)) { + $forceUpdate = true; + } + + $this->composer->update($forceUpdate, $displayProgress); + + require_once $autoloadPath; + + foreach ($this->imports as $package => $data) { + foreach ($data as $version => $files) { + foreach ($files as $file) { + import(PathHelper::getRoot() . Composer::VENDOR_DIR . $package . '/' . ($file ?? '')); + } + } + } + } + + /** + * @param ?array{ + * url?: string, + * type?: "git" | "svn", + * reference?: string, + * } $source + */ + private function importPackageWithComposer(string $package, string $version, ?string $repositoryUrl = null, ?array $source = null, ?string $file = null): void + { + $this->logger->notice('Importing remote package with Composer.', [ + 'package' => $package, + 'version' => $version, + ]); + + $json = $this->composer->getConfiguration(); + + $json['require'][$package] = $version; + + if ($repositoryUrl) { + $json['repositories'][] = [ + 'type' => 'vcs', + 'url' => $repositoryUrl, + ]; + } + + if ($source) { + if (!isset($source['url'], $source['type'], $source['reference'])) { + throw new ImportError('The "source" argument must contain "url", "type" and "reference" keys.'); + } + + $json['repositories'][] = [ + 'type' => 'package', + 'package' => [ + 'name' => $package, + 'version' => $version, + 'source' => $source, + ], + ]; + } + + $this->composer->setConfiguration($json); + + $this->imports[$package][$version][] = $file; + } + + private function allowsRemote(): bool + { + if ($_SERVER['CASTOR_NO_REMOTE'] ?? false) { + return false; + } + + $input = GlobalHelper::getApplication()->getInput(); + + // Need to look for the raw options as the input is not yet parsed + $noRemote = $input->getParameterOption('--no-remote', true); + + return true === $noRemote; + } +} diff --git a/src/Remote/Listener/RemoteImportListener.php b/src/Remote/Listener/RemoteImportListener.php new file mode 100644 index 00000000..37a10abf --- /dev/null +++ b/src/Remote/Listener/RemoteImportListener.php @@ -0,0 +1,27 @@ + 'afterInitialize', + ]; + } + + public function afterInitialize(AfterApplicationInitializationEvent $event): void + { + $this->importer->fetchPackages(); + } +} diff --git a/src/functions.php b/src/functions.php index abed0c6f..92ac15a7 100644 --- a/src/functions.php +++ b/src/functions.php @@ -9,6 +9,8 @@ use Castor\Exception\MinimumVersionRequirementNotMetException; use Castor\Exception\WaitFor\ExitedBeforeTimeoutException; use Castor\Exception\WaitFor\TimeoutReachedException; +use Castor\Remote\Exception\ImportError; +use Castor\Remote\Exception\InvalidImportFormat; use Joli\JoliNotif\Notification; use Joli\JoliNotif\NotifierFactory; use JoliCode\PhpOsHelper\OsHelper; @@ -763,8 +765,40 @@ function http_client(): HttpClientInterface return GlobalHelper::getHttpClient(); } -function import(string $path): void +/** + * @param ?array{ + * url?: string, + * type?: "git" | "svn", + * reference?: string, + * } $source + */ +function import(string $path, ?string $file = null, ?string $version = null, ?string $vcs = null, ?array $source = null): void { + $scheme = parse_url($path, \PHP_URL_SCHEME); + + if ($scheme) { + try { + GlobalHelper::getApplication()->importer->importFunctionsFrom( + $scheme, + mb_substr($path, mb_strlen($scheme) + 3), + $file, + $version, + $vcs, + $source, + ); + + return; + } catch (InvalidImportFormat $e) { + throw fix_exception(new \InvalidArgumentException($e->getMessage(), 0, $e)); + } catch (ImportError $e) { + log($e->getMessage(), 'warning'); + + return; + } + } elseif (null !== $file || null !== $version || null !== $vcs || null !== $source) { + throw fix_exception(new \InvalidArgumentException('The "file", "version", "vcs" and "source" arguments can only be used with a remote import.')); + } + if (!file_exists($path)) { throw fix_exception(new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $path))); } diff --git a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_not_runnable.txt b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_not_runnable.txt index e232b1fb..c8642a88 100644 --- a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_not_runnable.txt +++ b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_not_runnable.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello Task with Fingerprint! Cool! I finished! diff --git a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_runnable.txt b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_runnable.txt index 4eb89b59..2c9190c8 100644 --- a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_runnable.txt +++ b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintAndForceTest.php.output_runnable.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello Task with Fingerprint! Cool, no fingerprint! Executing... Fingerprint has been executed! diff --git a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_not_runnable.txt b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_not_runnable.txt index e232b1fb..c8642a88 100644 --- a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_not_runnable.txt +++ b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_not_runnable.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello Task with Fingerprint! Cool! I finished! diff --git a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_runnable.txt b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_runnable.txt index 00f0ed61..47b5600a 100644 --- a/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_runnable.txt +++ b/tests/Examples/Fingerprint/FingerprintTaskWithAFingerprintTest.php.output_runnable.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello Task with Fingerprint! Cool, no fingerprint! Executing... Cool! I finished! diff --git a/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_not_runnable.txt b/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_not_runnable.txt index e232b1fb..c8642a88 100644 --- a/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_not_runnable.txt +++ b/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_not_runnable.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello Task with Fingerprint! Cool! I finished! diff --git a/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_runnable.txt b/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_runnable.txt index 00f0ed61..47b5600a 100644 --- a/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_runnable.txt +++ b/tests/Examples/Fingerprint/FingerprintTaskWithCompleteFingerprintTest.php.output_runnable.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello Task with Fingerprint! Cool, no fingerprint! Executing... Cool! I finished! diff --git a/tests/Examples/Generated/ArgPassthruExpanded.php.output.txt b/tests/Examples/Generated/ArgPassthruExpanded.php.output.txt index 01aefae4..4ed353af 100644 --- a/tests/Examples/Generated/ArgPassthruExpanded.php.output.txt +++ b/tests/Examples/Generated/ArgPassthruExpanded.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". array(6) { [0]=> string(1) "a" diff --git a/tests/Examples/Generated/ArgsAnotherArgsTest.php.output.txt b/tests/Examples/Generated/ArgsAnotherArgsTest.php.output.txt index 7481b541..8efb2ab3 100644 --- a/tests/Examples/Generated/ArgsAnotherArgsTest.php.output.txt +++ b/tests/Examples/Generated/ArgsAnotherArgsTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". FIXME(required) 1 diff --git a/tests/Examples/Generated/ArgsArgsTest.php.output.txt b/tests/Examples/Generated/ArgsArgsTest.php.output.txt index b6fcf8fb..389e7116 100644 --- a/tests/Examples/Generated/ArgsArgsTest.php.output.txt +++ b/tests/Examples/Generated/ArgsArgsTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". array(4) { [0]=> string(11) "FIXME(word)" diff --git a/tests/Examples/Generated/ArgsPassthruTest.php.output.txt b/tests/Examples/Generated/ArgsPassthruTest.php.output.txt index 63a30c0d..ff6fc14f 100644 --- a/tests/Examples/Generated/ArgsPassthruTest.php.output.txt +++ b/tests/Examples/Generated/ArgsPassthruTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". array(0) { } diff --git a/tests/Examples/Generated/BarBarTest.php.output.txt b/tests/Examples/Generated/BarBarTest.php.output.txt index 3bd1f0e2..2714570a 100644 --- a/tests/Examples/Generated/BarBarTest.php.output.txt +++ b/tests/Examples/Generated/BarBarTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". foo bar diff --git a/tests/Examples/Generated/CacheComplexTest.php.output.txt b/tests/Examples/Generated/CacheComplexTest.php.output.txt index 0b0145ef..a67c6793 100644 --- a/tests/Examples/Generated/CacheComplexTest.php.output.txt +++ b/tests/Examples/Generated/CacheComplexTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". First call: yes Second call: no diff --git a/tests/Examples/Generated/CacheSimpleTest.php.output.txt b/tests/Examples/Generated/CacheSimpleTest.php.output.txt index 663333f1..0a437b9c 100644 --- a/tests/Examples/Generated/CacheSimpleTest.php.output.txt +++ b/tests/Examples/Generated/CacheSimpleTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". SALUT SALUT diff --git a/tests/Examples/Generated/CdDirectoryTest.php.output.txt b/tests/Examples/Generated/CdDirectoryTest.php.output.txt index 2e76108b..68f798b8 100644 --- a/tests/Examples/Generated/CdDirectoryTest.php.output.txt +++ b/tests/Examples/Generated/CdDirectoryTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". ... .../src/Attribute ... diff --git a/tests/Examples/Generated/ContextContextDoNotExistTest.php.output.txt b/tests/Examples/Generated/ContextContextDoNotExistTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/ContextContextDoNotExistTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextDoNotExistTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/ContextContextDynamicTest.php.output.txt b/tests/Examples/Generated/ContextContextDynamicTest.php.output.txt index 41f37814..92c00022 100644 --- a/tests/Examples/Generated/ContextContextDynamicTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextDynamicTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: dynamic Production? no verbosity: 1 diff --git a/tests/Examples/Generated/ContextContextInfoForcedTest.php.output.txt b/tests/Examples/Generated/ContextContextInfoForcedTest.php.output.txt index 4a840f0b..1b8c3a44 100644 --- a/tests/Examples/Generated/ContextContextInfoForcedTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextInfoForcedTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: dynamic diff --git a/tests/Examples/Generated/ContextContextMyDefaultTest.php.output.txt b/tests/Examples/Generated/ContextContextMyDefaultTest.php.output.txt index ec169891..ad5ad8fd 100644 --- a/tests/Examples/Generated/ContextContextMyDefaultTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextMyDefaultTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: my_default Production? no verbosity: 2 diff --git a/tests/Examples/Generated/ContextContextPathTest.php.output.txt b/tests/Examples/Generated/ContextContextPathTest.php.output.txt index 9682015f..8c5dbac0 100644 --- a/tests/Examples/Generated/ContextContextPathTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextPathTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: path Production? yes verbosity: 1 diff --git a/tests/Examples/Generated/ContextContextProductionTest.php.output.txt b/tests/Examples/Generated/ContextContextProductionTest.php.output.txt index b165b460..6526f517 100644 --- a/tests/Examples/Generated/ContextContextProductionTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextProductionTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: production Production? yes verbosity: 1 diff --git a/tests/Examples/Generated/ContextContextRunTest.php.output.txt b/tests/Examples/Generated/ContextContextRunTest.php.output.txt index 10168f4a..71001055 100644 --- a/tests/Examples/Generated/ContextContextRunTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextRunTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: run Production? no verbosity: 1 diff --git a/tests/Examples/Generated/ContextContextTest.php.output.txt b/tests/Examples/Generated/ContextContextTest.php.output.txt index afc29c98..503f7652 100644 --- a/tests/Examples/Generated/ContextContextTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: my_default Production? no verbosity: 1 diff --git a/tests/Examples/Generated/ContextContextWithTest.php.output.txt b/tests/Examples/Generated/ContextContextWithTest.php.output.txt index 9d78a4ca..e4073340 100644 --- a/tests/Examples/Generated/ContextContextWithTest.php.output.txt +++ b/tests/Examples/Generated/ContextContextWithTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". context name: dynamic Production? no verbosity: -1 diff --git a/tests/Examples/Generated/EnabledInProduction.php.output.txt b/tests/Examples/Generated/EnabledInProduction.php.output.txt index cd087558..ea9e57c4 100644 --- a/tests/Examples/Generated/EnabledInProduction.php.output.txt +++ b/tests/Examples/Generated/EnabledInProduction.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello world! diff --git a/tests/Examples/Generated/EnvEnvTest.php.output.txt b/tests/Examples/Generated/EnvEnvTest.php.output.txt index 463fa308..8bab8107 100644 --- a/tests/Examples/Generated/EnvEnvTest.php.output.txt +++ b/tests/Examples/Generated/EnvEnvTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". "toto" diff --git a/tests/Examples/Generated/EventListenerMyTaskTest.php.output.txt b/tests/Examples/Generated/EventListenerMyTaskTest.php.output.txt index 9ce661af..7979aea5 100644 --- a/tests/Examples/Generated/EventListenerMyTaskTest.php.output.txt +++ b/tests/Examples/Generated/EventListenerMyTaskTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello from listener! (higher priority) before task execution Hello from listener! (lower priority) Ola from listener! I am listening to multiple events but only showing only for BeforeExecuteTaskEvent diff --git a/tests/Examples/Generated/FailureAllowFailureTest.php.output.txt b/tests/Examples/Generated/FailureAllowFailureTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/FailureAllowFailureTest.php.output.txt +++ b/tests/Examples/Generated/FailureAllowFailureTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/FailureFailureTest.php.output.txt b/tests/Examples/Generated/FailureFailureTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/FailureFailureTest.php.output.txt +++ b/tests/Examples/Generated/FailureFailureTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/FilesystemFilesystemTest.php.output.txt b/tests/Examples/Generated/FilesystemFilesystemTest.php.output.txt index 752d5dd6..2fcd3d6c 100644 --- a/tests/Examples/Generated/FilesystemFilesystemTest.php.output.txt +++ b/tests/Examples/Generated/FilesystemFilesystemTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". /tmp/foo directory exist: no /tmp/foo is an absolute path: yes ../ is an absolute path: no diff --git a/tests/Examples/Generated/FilesystemFindTest.php.output.txt b/tests/Examples/Generated/FilesystemFindTest.php.output.txt index d20e33cf..757daadf 100644 --- a/tests/Examples/Generated/FilesystemFindTest.php.output.txt +++ b/tests/Examples/Generated/FilesystemFindTest.php.output.txt @@ -1 +1,4 @@ -Number of PHP files: 29 +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". +Number of PHP files: 30 diff --git a/tests/Examples/Generated/FooBarTest.php.output.txt b/tests/Examples/Generated/FooBarTest.php.output.txt index 2bda3b44..b38fdb8c 100644 --- a/tests/Examples/Generated/FooBarTest.php.output.txt +++ b/tests/Examples/Generated/FooBarTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Foo bar diff --git a/tests/Examples/Generated/FooFooTest.php.output.txt b/tests/Examples/Generated/FooFooTest.php.output.txt index 257cc564..cfe1a708 100644 --- a/tests/Examples/Generated/FooFooTest.php.output.txt +++ b/tests/Examples/Generated/FooFooTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". foo diff --git a/tests/Examples/Generated/HelloTest.php.output.txt b/tests/Examples/Generated/HelloTest.php.output.txt index 6769dd60..42ce5f09 100644 --- a/tests/Examples/Generated/HelloTest.php.output.txt +++ b/tests/Examples/Generated/HelloTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello world! \ No newline at end of file diff --git a/tests/Examples/Generated/HttpRequestTest.php.output.txt b/tests/Examples/Generated/HttpRequestTest.php.output.txt index 980a0d5f..b4252fb1 100644 --- a/tests/Examples/Generated/HttpRequestTest.php.output.txt +++ b/tests/Examples/Generated/HttpRequestTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello World! diff --git a/tests/Examples/Generated/ListTest.php.output.txt b/tests/Examples/Generated/ListTest.php.output.txt index 7e5315ea..bc4f79f2 100644 --- a/tests/Examples/Generated/ListTest.php.output.txt +++ b/tests/Examples/Generated/ListTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". completion Dump the shell completion script hello hello help Display help for a command @@ -51,6 +54,7 @@ output:output Plays with Sym parallel:exception Sleep and throw an exception parallel:sleep Sleeps for 5, 7, and 10 seconds in parallel quiet:quiet Executes something but does not output anything +remote-import:remote-tasks Use functions imported from remote packages run:ls Run a sub-process and display information about it run:test-file Run a sub-process and return its exit code, with get_exit_code() function run:variables Run a sub-process with environment variables and display information about it diff --git a/tests/Examples/Generated/NoNamespaceTest.php.output.txt b/tests/Examples/Generated/NoNamespaceTest.php.output.txt index b297ab5f..2b906dd6 100644 --- a/tests/Examples/Generated/NoNamespaceTest.php.output.txt +++ b/tests/Examples/Generated/NoNamespaceTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". renamed diff --git a/tests/Examples/Generated/NotRenameRenamedTest.php.output.txt b/tests/Examples/Generated/NotRenameRenamedTest.php.output.txt index b297ab5f..2b906dd6 100644 --- a/tests/Examples/Generated/NotRenameRenamedTest.php.output.txt +++ b/tests/Examples/Generated/NotRenameRenamedTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". renamed diff --git a/tests/Examples/Generated/NotifyNotifyOnFinishTest.php.output.txt b/tests/Examples/Generated/NotifyNotifyOnFinishTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/NotifyNotifyOnFinishTest.php.output.txt +++ b/tests/Examples/Generated/NotifyNotifyOnFinishTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/NotifySendNotifyTest.php.output.txt b/tests/Examples/Generated/NotifySendNotifyTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/NotifySendNotifyTest.php.output.txt +++ b/tests/Examples/Generated/NotifySendNotifyTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/OutputOutputTest.php.output.txt b/tests/Examples/Generated/OutputOutputTest.php.output.txt index 7c1df28b..9a430e8b 100644 --- a/tests/Examples/Generated/OutputOutputTest.php.output.txt +++ b/tests/Examples/Generated/OutputOutputTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". This is a title =============== diff --git a/tests/Examples/Generated/ParallelExceptionTest.php.output.txt b/tests/Examples/Generated/ParallelExceptionTest.php.output.txt index 20684626..891f35ce 100644 --- a/tests/Examples/Generated/ParallelExceptionTest.php.output.txt +++ b/tests/Examples/Generated/ParallelExceptionTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". I am executed diff --git a/tests/Examples/Generated/ParallelSleepTest.php.output.txt b/tests/Examples/Generated/ParallelSleepTest.php.output.txt index efd37a0e..ff56f732 100644 --- a/tests/Examples/Generated/ParallelSleepTest.php.output.txt +++ b/tests/Examples/Generated/ParallelSleepTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". sleep 0s has slept 0s sleep 0s diff --git a/tests/Examples/Generated/QuietQuietTest.php.output.txt b/tests/Examples/Generated/QuietQuietTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/QuietQuietTest.php.output.txt +++ b/tests/Examples/Generated/QuietQuietTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/RunTestFileTest.php.output.txt b/tests/Examples/Generated/RunTestFileTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/RunTestFileTest.php.output.txt +++ b/tests/Examples/Generated/RunTestFileTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/RunVariablesTest.php.output.txt b/tests/Examples/Generated/RunVariablesTest.php.output.txt index d1c38e0c..0ef5d1e6 100644 --- a/tests/Examples/Generated/RunVariablesTest.php.output.txt +++ b/tests/Examples/Generated/RunVariablesTest.php.output.txt @@ -1,3 +1,6 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Output: ba'"`r Error output: diff --git a/tests/Examples/Generated/RunWhoamiTest.php.output.txt b/tests/Examples/Generated/RunWhoamiTest.php.output.txt index b5cbfd18..cf25a0c1 100644 --- a/tests/Examples/Generated/RunWhoamiTest.php.output.txt +++ b/tests/Examples/Generated/RunWhoamiTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello: whoami diff --git a/tests/Examples/Generated/RunWithProcessHelperTest.php.output.txt b/tests/Examples/Generated/RunWithProcessHelperTest.php.output.txt index 911909bb..18ff812e 100644 --- a/tests/Examples/Generated/RunWithProcessHelperTest.php.output.txt +++ b/tests/Examples/Generated/RunWithProcessHelperTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Re-run with -vv, -vvv to see the output of the process. diff --git a/tests/Examples/Generated/ShellBashTest.php.output.txt b/tests/Examples/Generated/ShellBashTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/ShellBashTest.php.output.txt +++ b/tests/Examples/Generated/ShellBashTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/ShellShTest.php.output.txt b/tests/Examples/Generated/ShellShTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/ShellShTest.php.output.txt +++ b/tests/Examples/Generated/ShellShTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/SignalSigusr2Test.php.output.txt b/tests/Examples/Generated/SignalSigusr2Test.php.output.txt index 7784ce0f..b9613f9a 100644 --- a/tests/Examples/Generated/SignalSigusr2Test.php.output.txt +++ b/tests/Examples/Generated/SignalSigusr2Test.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". SIGUSR2 received diff --git a/tests/Examples/Generated/SymfonyGreetTest.php.output.txt b/tests/Examples/Generated/SymfonyGreetTest.php.output.txt index 33455117..2556a73a 100644 --- a/tests/Examples/Generated/SymfonyGreetTest.php.output.txt +++ b/tests/Examples/Generated/SymfonyGreetTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Salut FIXME(who)! FIXME diff --git a/tests/Examples/Generated/SymfonyHelloTest.php.output.txt b/tests/Examples/Generated/SymfonyHelloTest.php.output.txt index e965047a..da241eea 100644 --- a/tests/Examples/Generated/SymfonyHelloTest.php.output.txt +++ b/tests/Examples/Generated/SymfonyHelloTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Hello diff --git a/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.output.txt b/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.output.txt +++ b/tests/Examples/Generated/VersionGuardMinVersionCheckFailTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/VersionGuardMinVersionCheckTest.php.output.txt b/tests/Examples/Generated/VersionGuardMinVersionCheckTest.php.output.txt index e69de29b..dffd0ca8 100644 --- a/tests/Examples/Generated/VersionGuardMinVersionCheckTest.php.output.txt +++ b/tests/Examples/Generated/VersionGuardMinVersionCheckTest.php.output.txt @@ -0,0 +1,3 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". diff --git a/tests/Examples/Generated/WaitForCustomWaitForTaskTest.php.output.txt b/tests/Examples/Generated/WaitForCustomWaitForTaskTest.php.output.txt index 74b49fe4..373573df 100644 --- a/tests/Examples/Generated/WaitForCustomWaitForTaskTest.php.output.txt +++ b/tests/Examples/Generated/WaitForCustomWaitForTaskTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Waiting for my custom check... OK diff --git a/tests/Examples/Generated/WaitForWaitForDockerContainerTaskTest.php.output.txt b/tests/Examples/Generated/WaitForWaitForDockerContainerTaskTest.php.output.txt index de2a02e5..02a11e89 100644 --- a/tests/Examples/Generated/WaitForWaitForDockerContainerTaskTest.php.output.txt +++ b/tests/Examples/Generated/WaitForWaitForDockerContainerTaskTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Waiting for docker container "helloworld" to be available... OK diff --git a/tests/Examples/Generated/WaitForWaitForPortTaskTest.php.output.txt b/tests/Examples/Generated/WaitForWaitForPortTaskTest.php.output.txt index 7cb32e91..fcfd8d1c 100644 --- a/tests/Examples/Generated/WaitForWaitForPortTaskTest.php.output.txt +++ b/tests/Examples/Generated/WaitForWaitForPortTaskTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Checking if 127.0.0.1 is available... OK diff --git a/tests/Examples/Generated/WaitForWaitForUrlTaskTest.php.output.txt b/tests/Examples/Generated/WaitForWaitForUrlTaskTest.php.output.txt index 34c780ca..f753dceb 100644 --- a/tests/Examples/Generated/WaitForWaitForUrlTaskTest.php.output.txt +++ b/tests/Examples/Generated/WaitForWaitForUrlTaskTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Waiting for http://127.0.0.1:9955... OK diff --git a/tests/Examples/Generated/WaitForWaitForUrlWithSpecificResponseContentAndStatusTest.php.output.txt b/tests/Examples/Generated/WaitForWaitForUrlWithSpecificResponseContentAndStatusTest.php.output.txt index 3547ecd6..c225affb 100644 --- a/tests/Examples/Generated/WaitForWaitForUrlWithSpecificResponseContentAndStatusTest.php.output.txt +++ b/tests/Examples/Generated/WaitForWaitForUrlWithSpecificResponseContentAndStatusTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Waiting for URL "http://127.0.0.1:9955" to return HTTP response... OK diff --git a/tests/Examples/Generated/WaitForWaitForUrlWithStatusCodeOnlyTest.php.output.txt b/tests/Examples/Generated/WaitForWaitForUrlWithStatusCodeOnlyTest.php.output.txt index b0b9068c..48102fe7 100644 --- a/tests/Examples/Generated/WaitForWaitForUrlWithStatusCodeOnlyTest.php.output.txt +++ b/tests/Examples/Generated/WaitForWaitForUrlWithStatusCodeOnlyTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". Waiting for URL "http://127.0.0.1:9955" to return HTTP status "200"... OK diff --git a/tests/Examples/Generated/YamlDumpTest.php.output.txt b/tests/Examples/Generated/YamlDumpTest.php.output.txt index 8218b158..f2b16ea0 100644 --- a/tests/Examples/Generated/YamlDumpTest.php.output.txt +++ b/tests/Examples/Generated/YamlDumpTest.php.output.txt @@ -1,2 +1,5 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". foo: bar diff --git a/tests/Examples/Generated/YamlParseTest.php.output.txt b/tests/Examples/Generated/YamlParseTest.php.output.txt index 5716ca59..afc0b19f 100644 --- a/tests/Examples/Generated/YamlParseTest.php.output.txt +++ b/tests/Examples/Generated/YamlParseTest.php.output.txt @@ -1 +1,4 @@ +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/castor-example-package-not-published". +hh:ii:ss WARNING [castor] Remote imports are disabled, skipping import of "pyrech/foobar". bar diff --git a/tests/Examples/Remote/RemoteImportRemoteTasksTest.php b/tests/Examples/Remote/RemoteImportRemoteTasksTest.php new file mode 100644 index 00000000..f0f9f3fc --- /dev/null +++ b/tests/Examples/Remote/RemoteImportRemoteTasksTest.php @@ -0,0 +1,22 @@ +runTask(['remote-import:remote-tasks'], needRemote: true); + + $this->assertSame(0, $process->getExitCode()); + $this->assertStringEqualsFile(__FILE__ . '.output.txt', $process->getOutput()); + if (file_exists(__FILE__ . '.err.txt')) { + $this->assertStringEqualsFile(__FILE__ . '.err.txt', $process->getErrorOutput()); + } else { + $this->assertSame('', $process->getErrorOutput()); + } + } +} diff --git a/tests/Examples/Remote/RemoteImportRemoteTasksTest.php.output.txt b/tests/Examples/Remote/RemoteImportRemoteTasksTest.php.output.txt new file mode 100644 index 00000000..959db5dd --- /dev/null +++ b/tests/Examples/Remote/RemoteImportRemoteTasksTest.php.output.txt @@ -0,0 +1,16 @@ + Downloading remote package "pyrech/castor-example" + Imported package "pyrech/castor-example" + + Downloading remote package "pyrech/castor-example-package-not-published" + Imported package "pyrech/castor-example-package-not-published" + + Downloading remote package "pyrech/foobar" + Imported package "pyrech/foobar" + + +Hello from example! +=================== + +This is foobar! +=============== + diff --git a/tests/Helper/OutputCleaner.php b/tests/Helper/OutputCleaner.php index 8761816a..9dfa3d2c 100644 --- a/tests/Helper/OutputCleaner.php +++ b/tests/Helper/OutputCleaner.php @@ -15,6 +15,7 @@ public static function cleanOutput(string $string): string $string = preg_replace('{In ContextRegistry.php line \d+:}m', 'In ContextRegistry.php line XXXX:', $string); $string = preg_replace('{you are using v\d+.\d+.\d+.}m', 'you are using vX.Y.Z.', $string); $string = preg_replace('{you are using v\d+.\d+.\d+.}m', 'you are using vX.Y.Z.', $string); + $string = preg_replace('{\d{2}:\d{2}:\d{2} WARNING}m', 'hh:ii:ss WARNING', $string); return str_replace(\dirname(__DIR__, 2), '...', $string); } diff --git a/tests/TaskTestCase.php b/tests/TaskTestCase.php index a98c740d..80088376 100644 --- a/tests/TaskTestCase.php +++ b/tests/TaskTestCase.php @@ -14,7 +14,7 @@ public static function setUpBeforeClass(): void WebServerHelper::start(); } - public function runTask(array $args, ?string $cwd = null): Process + public function runTask(array $args, ?string $cwd = null, bool $needRemote = false): Process { $coverage = $this->getTestResultObject()?->getCodeCoverage(); @@ -24,6 +24,12 @@ public function runTask(array $args, ?string $cwd = null): Process 'ENDPOINT' => $_SERVER['ENDPOINT'], ]; + if (!$needRemote) { + $extraEnv['CASTOR_NO_REMOTE'] = 1; + } elseif (file_exists($castorRequirementsFile = __DIR__ . '/../.castor/vendor/castor-requirements.json')) { + unlink($castorRequirementsFile); + } + if ($coverage) { $castorBin = __DIR__ . '/bin/castor'; $testName = debug_backtrace()[1]['class'] . '::' . debug_backtrace()[1]['function'];