From d594a34e4a76136da88d3f3146e6bd859fa8ad8a Mon Sep 17 00:00:00 2001 From: Bec White Date: Thu, 6 Oct 2022 15:27:16 -0500 Subject: [PATCH 01/11] Try updating to Phing 3 again. I don't like this yet because: * There isn't yet a stable release of Phing 3, so I had to set a minimum-stability in composer.json * The alpha and RC versions of Phing 3 require dev releases of the phing packages, meaning they either need to be enumerated OR the-build's minumum stability needs to be dropped to dev (this is not desirable) * Need to test the Phing 3 support of symlinks, because that patch no longer applies --- composer.json | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index aafcec7c..16198f50 100644 --- a/composer.json +++ b/composer.json @@ -13,14 +13,39 @@ ], "require": { "composer-runtime-api": "^2.2.2", - "cweagans/composer-patches": "^1.7", "drupal/coder": "^8.3.6", "drush/drush": ">=9", "mglaman/drupal-check": "^1.2", - "palantirnet/phing-drush-task": "^1.1", + "palantirnet/phing-drush-task": ">=1.1", "pear/http_request2": "^2.3", "pear/versioncontrol_git": "@dev", - "phing/phing": "^2.14", + "phing/phing": "^3", + "phing/phing-composer-configurator": "dev-master", + "phing/task-analyzers": "dev-main", + "phing/task-apigen": "dev-main as dev-master", + "phing/task-archives": "dev-main", + "phing/task-aws": "dev-main", + "phing/task-coverage": "dev-main as dev-master", + "phing/task-dbdeploy": "dev-main", + "phing/task-ftpdeploy": "dev-main as dev-master", + "phing/task-git": "dev-main", + "phing/task-hg": "dev-main", + "phing/task-http": "dev-main", + "phing/task-inifile": "dev-main", + "phing/task-ioncube": "dev-main as dev-master", + "phing/task-jshint": "dev-main as dev-master", + "phing/task-jsmin": "dev-main as dev-master", + "phing/task-liquibase": "dev-main as dev-master", + "phing/task-phkpackage": "dev-main as dev-master", + "phing/task-phpdoc": "dev-main as dev-master", + "phing/task-phpunit": "dev-main as dev-master", + "phing/task-sass": "dev-main as dev-master", + "phing/task-smarty": "dev-main as dev-master", + "phing/task-ssh": "dev-main as dev-master", + "phing/task-svn": "dev-main as dev-master", + "phing/task-visualizer": "dev-main as dev-master", + "phing/task-zendcodeanalyser": "dev-main as dev-master", + "phing/task-zendserverdevelopmenttools": "dev-main as dev-master", "phpmd/phpmd": "^2.4", "phpspec/prophecy-phpunit": "^2" }, @@ -29,18 +54,13 @@ "TheBuild\\": "src/" } }, + "minimum-stability": "alpha", "config": { "sort-packages": true, "allow-plugins": { "cweagans/composer-patches": true, + "phing/phing-composer-configurator": true, "dealerdirect/phpcodesniffer-composer-installer": true } - }, - "extra": { - "patches": { - "phing/phing": { - "Support relative symliks in Phing": "https://raw.githubusercontent.com/palantirnet/the-build/7cdc28b6019fb88a0604261366f9ea35f1e21d96/patches/phing-relative-symlinks.patch" - } - } } } From d97ecd00fd5f268c04240b7a08d4664a9d87430a Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 25 Jan 2023 14:26:14 -0600 Subject: [PATCH 02/11] Update task files to use new class dependencies. --- src/TheBuild/Acquia/AcquiaTask.php | 38 +++++++++++---------- src/TheBuild/Acquia/GetLatestBackupTask.php | 35 ++++++++++--------- src/TheBuild/CopyPropertiesTask.php | 11 +++--- src/TheBuild/ForeachKeyTask.php | 11 +++--- src/TheBuild/IncludeResourceTask.php | 23 +++++++------ src/TheBuild/MenuInputRequest.php | 3 +- src/TheBuild/SelectOneTask.php | 9 ++--- src/TheBuild/SelectPropertyKeyTask.php | 11 +++--- 8 files changed, 75 insertions(+), 66 deletions(-) diff --git a/src/TheBuild/Acquia/AcquiaTask.php b/src/TheBuild/Acquia/AcquiaTask.php index 8ae3b18c..73ba924d 100644 --- a/src/TheBuild/Acquia/AcquiaTask.php +++ b/src/TheBuild/Acquia/AcquiaTask.php @@ -22,16 +22,18 @@ namespace TheBuild\Acquia; -use BuildException; +use Phing\Task; +use Phing\Exception\BuildException; +use Phing\Io\IOException; use HTTP_Request2; -use PhingFile; +use Phing\Io\File; -abstract class AcquiaTask extends \Task { +abstract class AcquiaTask extends Task { /** * Required. The Acquia Cloud credentials file containing a json array with * 'mail' and 'key' values. - * @var \PhingFile + * @var File */ protected $credentialsFile; @@ -56,16 +58,15 @@ abstract class AcquiaTask extends \Task { */ protected $endpoint = 'https://cloudapi.acquia.com/v1'; - /** - * Load the Acquia Cloud credentials from the cloudapi.conf JSON file. - * - * @throws \IOException - * @throws \NullPointerException - */ + /** + * Load the Acquia Cloud credentials from the cloudapi.conf JSON file. + * + * @throws IOException + */ protected function loadCredentials() { if (empty($this->mail) || empty($this->key)) { if (empty($this->credentialsFile)) { - $this->credentialsFile = new PhingFile($_SERVER['HOME'] . '/.acquia/cloudapi.conf'); + $this->credentialsFile = new File($_SERVER['HOME'] . '/.acquia/cloudapi.conf'); } if (!file_exists($this->credentialsFile) || !is_readable($this->credentialsFile)) { @@ -99,6 +100,8 @@ protected function createRequest($path) { $request->setConfig('follow_redirects', TRUE); $request->setAuth($this->mail, $this->key); + + return $request; } @@ -117,13 +120,12 @@ protected function getApiResponseBody($path) { return $response->getBody(); } - /** - * @param PhingFile $file - * @throws \IOException - * @throws \NullPointerException - */ - public function setCredentialsFile(PhingFile $file) { - $this->credentialsFile = new PhingFile($file); + /** + * @param File $file + * @throws IOException + */ + public function setCredentialsFile(File $file) { + $this->credentialsFile = new File($file); } } diff --git a/src/TheBuild/Acquia/GetLatestBackupTask.php b/src/TheBuild/Acquia/GetLatestBackupTask.php index 96f2a0b3..cda9baf7 100644 --- a/src/TheBuild/Acquia/GetLatestBackupTask.php +++ b/src/TheBuild/Acquia/GetLatestBackupTask.php @@ -16,8 +16,10 @@ namespace TheBuild\Acquia; -use BuildException; -use PhingFile; +use Phing\Exception\BuildException; +use Phing\Io\File; +use Phing\Io\IOException; +use Phing\Io\FileWriter; class GetLatestBackupTask extends AcquiaTask { @@ -26,7 +28,7 @@ class GetLatestBackupTask extends AcquiaTask { * Directory for storing downloaded database backups. * * Required parameter. - * @var PhingFile + * @var File */ protected $dir; @@ -90,14 +92,13 @@ class GetLatestBackupTask extends AcquiaTask { /** * Where to store the JSON list of database backups downloaded from the Acquia * Cloud API. This is set to 'backups.json' in the directory specified by $dir. - * @var PhingFile + * @var File */ protected $backupsFile; - /** - * @throws \IOException - * @throws \NullPointerException - */ + /** + * @throws IOException + */ public function main() { $this->validate(); @@ -108,7 +109,7 @@ public function main() { // Store the Acquia Cloud API JSON database backup records in our backups // directory. - $this->backupsFile = new PhingFile($this->dir, "backups-{$this->site}-{$this->database}-{$this->env}.json"); + $this->backupsFile = new File($this->dir, "backups-{$this->site}-{$this->database}-{$this->env}.json"); // Check the database backup records for entries within our time window. $backups = $this->getCurrentBackupRecords(); @@ -117,7 +118,7 @@ public function main() { $downloaded_backups = []; foreach ($backups as $backup) { $filename = basename($backup['path']); - $file = new PhingFile($this->dir, $filename); + $file = new File($this->dir, $filename); if ($file->exists()) { $downloaded_backups[] = $backup; @@ -154,7 +155,7 @@ public function main() { // Download the backup if it does not yet exist on the filesystem. $filename = basename($newest_backup['path']); - $file = new PhingFile($this->dir, $filename); + $file = new File($this->dir, $filename); if (!$file->exists()) { $this->log("Downloading the backup to " . $file->getAbsolutePath()); $this->downloadBackup($newest_backup, $file); @@ -174,11 +175,11 @@ public function main() { * Download a backup from Acquia Cloud. * * @param array $backup - * @param PhingFile $destination + * @param File $destination * @throws \HTTP_Request2_Exception * @throws \HTTP_Request2_LogicException */ - protected function downloadBackup(array $backup, PhingFile $destination) { + protected function downloadBackup(array $backup, File $destination) { $stream = fopen($destination->getAbsolutePath(), 'wb'); if (!$stream) { throw new BuildException('Can not write to ' . $destination->getAbsolutePath()); @@ -262,10 +263,10 @@ protected function getBackupRecords($file) { /** * Download the latest list of backup records from the Acquia Cloud API. */ - protected function downloadBackupRecords(PhingFile $backups_file) { + protected function downloadBackupRecords(File $backups_file) { $json = $this->getApiResponseBody("/sites/{$this->realm}:{$this->site}/envs/{$this->env}/dbs/{$this->database}/backups.json"); - $writer = new \FileWriter($backups_file); + $writer = new FileWriter($backups_file); $writer->write($json); } @@ -297,7 +298,7 @@ public function setDatabase($value) { $this->database = $value; } public function setDir($value) { - $this->dir = new PhingFile($value); + $this->dir = new File($value); } public function setMaxAge($value) { $this->maxAge = (int) $value; @@ -312,7 +313,7 @@ public function setPropertyName($value) { protected function validate() { foreach (['dir', 'realm', 'site', 'env'] as $attribute) { if (empty($this->$attribute)) { - throw new BuildException("$attribute attribute is required.", $this->location); + throw new BuildException("$attribute attribute is required.", $this->getLocation()); } } } diff --git a/src/TheBuild/CopyPropertiesTask.php b/src/TheBuild/CopyPropertiesTask.php index 5d8c2379..cdbb4043 100644 --- a/src/TheBuild/CopyPropertiesTask.php +++ b/src/TheBuild/CopyPropertiesTask.php @@ -13,11 +13,12 @@ namespace TheBuild; -use BuildException; -use StringHelper; +use Phing\Task; +use Phing\Exception\BuildException; +use Phing\Util\StringHelper; -class CopyPropertiesTask extends \Task { +class CopyPropertiesTask extends Task { /** * @var string @@ -68,11 +69,11 @@ public function main() { */ public function validate() { if (empty($this->fromPrefix)) { - throw new BuildException("fromPrefix attribute is required.", $this->location); + throw new BuildException("fromPrefix attribute is required.", $this->getLocation()); } if (empty($this->toPrefix)) { - throw new BuildException("toPrefix attribute is required.", $this->location); + throw new BuildException("toPrefix attribute is required.", $this->getLocation()); } } diff --git a/src/TheBuild/ForeachKeyTask.php b/src/TheBuild/ForeachKeyTask.php index 98a06351..6bea569a 100644 --- a/src/TheBuild/ForeachKeyTask.php +++ b/src/TheBuild/ForeachKeyTask.php @@ -13,11 +13,12 @@ namespace TheBuild; -use BuildException; -use StringHelper; +use Phing\Task; +use Phing\Exception\BuildException; +use Phing\Util\StringHelper; -class ForeachKeyTask extends \Task { +class ForeachKeyTask extends Task { /** * @var string @@ -49,7 +50,7 @@ class ForeachKeyTask extends \Task { protected $omitKeys = []; /** - * @var \PhingCallTask + * @var PhingCallTask */ protected $callee; @@ -113,7 +114,7 @@ public function main() { public function validate() { foreach (['prefix', 'target', 'keyParam', 'prefixParam'] as $attribute) { if (empty($this->$attribute)) { - throw new BuildException("$attribute attribute is required.", $this->location); + throw new BuildException("$attribute attribute is required.", $this->getLocation()); } } } diff --git a/src/TheBuild/IncludeResourceTask.php b/src/TheBuild/IncludeResourceTask.php index a3a75215..1272568a 100644 --- a/src/TheBuild/IncludeResourceTask.php +++ b/src/TheBuild/IncludeResourceTask.php @@ -7,12 +7,13 @@ namespace TheBuild; -use PhingFile; -use BuildException; -use FileSystem; +use Phing\Task; +use Phing\Exception\BuildException; +use Phing\Io\File; +use Phing\Io\FileSystem; -class IncludeResourceTask extends \Task { +class IncludeResourceTask extends Task { /** * @var string @@ -21,13 +22,13 @@ class IncludeResourceTask extends \Task { protected $mode = 'symlink'; /** - * @var PhingFile + * @var File * The source file or directory to include. */ protected $source; /** - * @var PhingFile + * @var File * The location to link the file to. */ protected $dest = NULL; @@ -94,7 +95,7 @@ public function main() { */ public function validate() { if (!in_array($this->mode, ['symlink', 'copy'])) { - throw new BuildException("mode attribute must be either 'symlink' or 'copy'", $this->location); + throw new BuildException("mode attribute must be either 'symlink' or 'copy'", $this->getLocation()); } if (empty($this->source) || empty($this->dest)) { @@ -117,9 +118,9 @@ public function setMode($mode) { /** * Set the source of the resource to include. * - * @param \PhingFile $source + * @param File $source */ - public function setSource(PhingFile $source) { + public function setSource(File $source) { if (!$source->exists()) { throw new BuildException("resource '$source' is not available'"); } @@ -130,9 +131,9 @@ public function setSource(PhingFile $source) { /** * Set the destination for the resource. - * @param PhingFile $dest + * @param File $dest */ - public function setDest(PhingFile $dest) { + public function setDest(File $dest) { $this->dest = $dest; } diff --git a/src/TheBuild/MenuInputRequest.php b/src/TheBuild/MenuInputRequest.php index 2bed0974..0f5c86b2 100644 --- a/src/TheBuild/MenuInputRequest.php +++ b/src/TheBuild/MenuInputRequest.php @@ -8,7 +8,8 @@ */ namespace TheBuild; -use InputRequest; + +use Phing\Input\InputRequest; class MenuInputRequest extends InputRequest { diff --git a/src/TheBuild/SelectOneTask.php b/src/TheBuild/SelectOneTask.php index 2b65d71a..a0765ebc 100644 --- a/src/TheBuild/SelectOneTask.php +++ b/src/TheBuild/SelectOneTask.php @@ -21,11 +21,12 @@ namespace TheBuild; -use BuildException; -use Project; +use Phing\Task; +use Phing\Exception\BuildException; +use Phing\Project; -class SelectOneTask extends \Task { +class SelectOneTask extends Task { /** * @var string @@ -93,7 +94,7 @@ public function main() { public function validate() { foreach (['list', 'propertyName'] as $attribute) { if (empty($this->$attribute)) { - throw new BuildException("$attribute attribute is required.", $this->location); + throw new BuildException("$attribute attribute is required.", $this->getLocation()); } } } diff --git a/src/TheBuild/SelectPropertyKeyTask.php b/src/TheBuild/SelectPropertyKeyTask.php index dc5a30f8..b4a2376b 100644 --- a/src/TheBuild/SelectPropertyKeyTask.php +++ b/src/TheBuild/SelectPropertyKeyTask.php @@ -20,12 +20,13 @@ namespace TheBuild; -use BuildException; -use StringHelper; -use Project; +use Phing\Task; +use Phing\Exception\BuildException; +use Phing\Util\StringHelper; +use Phing\Project; -class SelectPropertyKeyTask extends \Task { +class SelectPropertyKeyTask extends Task { /** * @var string @@ -105,7 +106,7 @@ public function main() { public function validate() { foreach (['prefix', 'propertyName'] as $attribute) { if (empty($this->$attribute)) { - throw new BuildException("$attribute attribute is required.", $this->location); + throw new BuildException("$attribute attribute is required.", $this->getLocation()); } } } From db1f5949bfcf93be5f3dab3d245deb459a429bcb Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Tue, 31 Jan 2023 16:27:05 -0600 Subject: [PATCH 03/11] Update composer phing version. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 16198f50..12e0e157 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "palantirnet/phing-drush-task": ">=1.1", "pear/http_request2": "^2.3", "pear/versioncontrol_git": "@dev", - "phing/phing": "^3", + "phing/phing": "^3.0", "phing/phing-composer-configurator": "dev-master", "phing/task-analyzers": "dev-main", "phing/task-apigen": "dev-main as dev-master", From 225732df4dff6913d4a7b95a411ba40e11a4d48b Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Tue, 7 Feb 2023 12:57:15 -0600 Subject: [PATCH 04/11] Update the exec commands to use the new syntax. --- defaults.yml | 3 +- defaults/install/build.xml | 22 +++++-- targets/artifact.xml | 118 ++++++++++++++++++++++++++++--------- targets/drupal.xml | 22 +++++-- targets/install.xml | 12 +++- targets/styleguide.xml | 14 +++-- targets/the-build.xml | 12 +++- 7 files changed, 152 insertions(+), 51 deletions(-) diff --git a/defaults.yml b/defaults.yml index 507c204c..7dfbc2b7 100644 --- a/defaults.yml +++ b/defaults.yml @@ -301,4 +301,5 @@ styleguide: # Location of the style guide, relative to the project root. root: 'styleguide' # Command to compile the style guide assets, for use during the build and artifact steps. - command: 'yarn default' + command: 'yarn' + command_args: 'default' diff --git a/defaults/install/build.xml b/defaults/install/build.xml index 494fda5a..81494fec 100644 --- a/defaults/install/build.xml +++ b/defaults/install/build.xml @@ -105,7 +105,9 @@ - + + + @@ -118,12 +120,14 @@ - + - + + + @@ -137,7 +141,9 @@ - + + + @@ -146,7 +152,9 @@ - + + + @@ -160,7 +168,9 @@ @@ -197,7 +235,9 @@ @@ -186,7 +194,9 @@ Or, you can specify the export file directly: - + + + @@ -437,7 +447,9 @@ $sites['${_multisite.sites_php_domain}'] = '${_multisite.dir}'; - + + + diff --git a/targets/install.xml b/targets/install.xml index c9491490..0ead31c8 100644 --- a/targets/install.xml +++ b/targets/install.xml @@ -144,8 +144,12 @@ - - + + + + + + @@ -159,7 +163,9 @@ - + + + diff --git a/targets/styleguide.xml b/targets/styleguide.xml index 8f278c9f..8b456637 100644 --- a/targets/styleguide.xml +++ b/targets/styleguide.xml @@ -80,8 +80,10 @@ Install and build the style guide. --> @@ -98,7 +100,9 @@ - + + + @@ -112,7 +116,9 @@ - + + + diff --git a/targets/the-build.xml b/targets/the-build.xml index 0740cbcd..b86aebe8 100644 --- a/targets/the-build.xml +++ b/targets/the-build.xml @@ -92,7 +92,9 @@ - + + + @@ -106,8 +108,12 @@ - - + + + + + + From fb055b1a89bbe8343b33f0b54136df81f0924831 Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 8 Feb 2023 09:58:52 -0600 Subject: [PATCH 05/11] update minimum stability. --- composer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 12e0e157..cfcdd0be 100644 --- a/composer.json +++ b/composer.json @@ -8,6 +8,8 @@ "email": "info@palantir.net" } ], + "minimum-stability": "dev", + "prefer-stable": true, "bin": [ "bin/the-build-installer" ], From 3a05e9f36260f1d47b8cf5b3c56a87ff2df00ae3 Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 8 Feb 2023 13:14:51 -0600 Subject: [PATCH 06/11] Fix code sniff syntax errors. --- src/TheBuild/Acquia/AcquiaTask.php | 49 ++++++++++----------- src/TheBuild/Acquia/GetLatestBackupTask.php | 48 +++++++++++--------- src/TheBuild/IncludeResourceTask.php | 8 ++-- 3 files changed, 54 insertions(+), 51 deletions(-) diff --git a/src/TheBuild/Acquia/AcquiaTask.php b/src/TheBuild/Acquia/AcquiaTask.php index d708879e..e539db6d 100644 --- a/src/TheBuild/Acquia/AcquiaTask.php +++ b/src/TheBuild/Acquia/AcquiaTask.php @@ -6,6 +6,7 @@ use Phing\Exception\BuildException; use Phing\Io\IOException; use HTTP_Request2; +use HTTP_Request2_Exception; use Phing\Io\File; /** @@ -19,7 +20,7 @@ abstract class AcquiaTask extends Task { * This file can be downloaded from your Acquia user account area and contains * a json array with 'mail' and 'key' values. * - * @var \PhingFile + * @var File */ protected $credentialsFile; @@ -51,19 +52,18 @@ abstract class AcquiaTask extends Task { /** * Load the Acquia Cloud credentials from the cloudapi.conf JSON file. * - * @throws \IOException - * @throws \NullPointerException + * @throws IOException * * @SuppressWarnings(PHPMD.Superglobals) */ protected function loadCredentials() { if (empty($this->mail) || empty($this->key)) { if (empty($this->credentialsFile)) { - $this->credentialsFile = new \PhingFile($_SERVER['HOME'] . '/.acquia/cloudapi.conf'); + $this->credentialsFile = new File($_SERVER['HOME'] . '/.acquia/cloudapi.conf'); } if (!file_exists($this->credentialsFile) || !is_readable($this->credentialsFile)) { - throw new \BuildException("Acquia Cloud credentials file '{$this->credentialsFile}' is not available."); + throw new BuildException("Acquia Cloud credentials file '{$this->credentialsFile}' is not available."); } $contents = file_get_contents($this->credentialsFile); @@ -74,7 +74,7 @@ protected function loadCredentials() { } if (empty($this->mail) || empty($this->key)) { - throw new \BuildException('Missing Acquia Cloud API credentials.'); + throw new BuildException('Missing Acquia Cloud API credentials.'); } } @@ -84,32 +84,32 @@ protected function loadCredentials() { * @param string $path * Acquia Cloud API path. * - * @return \HTTP_Request2 + * @return HTTP_Request2 * Request object. */ - protected function createRequest(string $path) : \HTTP_Request2 { + protected function createRequest(string $path) : HTTP_Request2 { $this->loadCredentials(); $uri = $this->endpoint . '/' . ltrim($path, '/'); - $request = new \HTTP_Request2($uri); + $request = new HTTP_Request2($uri); $request->setConfig('follow_redirects', TRUE); $request->setAuth($this->mail, $this->key); - - return $request; } - /** - * Example of how to query the Acquia Cloud API. - * - * @param string $path - * Acquia Cloud API path. - * - * @return string - * API response. - */ + /** + * Example of how to query the Acquia Cloud API. + * + * @param string $path + * Acquia Cloud API path. + * + * @return string + * API response. + * + * @throws HTTP_Request2_Exception + */ protected function getApiResponseBody(string $path) : string { $request = $this->createRequest($path); @@ -121,14 +121,13 @@ protected function getApiResponseBody(string $path) : string { /** * Set the Acquia credentials file. * - * @param \PhingFile $file + * @param File $file * Acquia credentials file. * - * @throws \IOException - * @throws \NullPointerException + * @throws IOException */ - public function setCredentialsFile(\PhingFile $file) { - $this->credentialsFile = new \PhingFile($file); + public function setCredentialsFile(File $file) { + $this->credentialsFile = new File($file); } } diff --git a/src/TheBuild/Acquia/GetLatestBackupTask.php b/src/TheBuild/Acquia/GetLatestBackupTask.php index ef0343ec..2dfd4f00 100644 --- a/src/TheBuild/Acquia/GetLatestBackupTask.php +++ b/src/TheBuild/Acquia/GetLatestBackupTask.php @@ -4,10 +4,8 @@ use Phing\Exception\BuildException; use Phing\Io\File; -use Phing\Io\IOException; use Phing\Io\FileWriter; - /** * Fetch a recent backup from Acquia. */ @@ -16,7 +14,7 @@ class GetLatestBackupTask extends AcquiaTask { /** * Required. Directory for storing downloaded database backups. * - * @var File + * @var Phing\Io\File */ protected $dir; @@ -84,14 +82,16 @@ class GetLatestBackupTask extends AcquiaTask { * This info is downloaded from the Acquia Cloud API. The file is set to * 'backups.json' in the directory specified by $dir. * - * @var File + * @var Phing\Io\File */ protected $backupsFile; /** * {@inheritdoc} * - * @throws IOException + * @throws \Phing\Io\IOException + * @throws Phing\Exception\BuildException + * @throws \HTTP_Request2_Exception */ public function main() { $this->validate(); @@ -139,7 +139,7 @@ public function main() { // This means that we didn't have a current record in our backups json, and // the Acquia Cloud API returned empty or malformed JSON. if (empty($newest_backup)) { - throw new \BuildException('Failed to find a backup record.'); + throw new BuildException('Failed to find a backup record.'); } // Download the backup if it does not yet exist on the filesystem. @@ -165,13 +165,15 @@ public function main() { * * @param array $backup * Acquia backup info array. - * @param File $destination + * @param Phing\Io\File $destination * Destination file for the downloaded backup. + * @throws Phing\Exception\BuildException + * @throws \HTTP_Request2_Exception */ - protected function downloadBackup(array $backup, File $destination) { + protected function downloadBackup(array $backup, Phing\Io\File $destination) { $stream = fopen($destination->getAbsolutePath(), 'wb'); if (!$stream) { - throw new \BuildException('Can not write to ' . $destination->getAbsolutePath()); + throw new BuildException('Can not write to ' . $destination->getAbsolutePath()); } // Use an HTTP_Request2 with the Observer pattern in order to download large @@ -200,7 +202,7 @@ protected function getCurrentBackupRecords() { try { $backups = $this->getBackupRecords($this->backupsFile); } - catch (\BuildException $e) { + catch (BuildException $e) { $backups = []; } @@ -224,17 +226,17 @@ protected function getCurrentBackupRecords() { * * Sorts records from oldest to newest. * - * @param \PhingFile $file + * @param Phing\Io\File $file * Temp file containing the Acquia Cloud API response. * * @return array * Acquia backup info array. * - * @throws \BuildException + * @throws Phing\Exception\BuildException * * @SuppressWarnings(PHPMD.ShortVariable) */ - protected function getBackupRecords(\PhingFile $file) { + protected function getBackupRecords(Phing\Io\File $file) { if ($file->exists()) { $backups = json_decode($file->contents(), TRUE); @@ -254,19 +256,21 @@ protected function getBackupRecords(\PhingFile $file) { } elseif (count($backups) === 0) { // The site might not have been backed up yet. - throw new \BuildException('No Acquia Cloud backups found: ' . $file->getCanonicalPath()); + throw new BuildException('No Acquia Cloud backups found: ' . $file->getCanonicalPath()); } } - throw new \BuildException('Acquia Cloud backup records could not be loaded from JSON: ' . $file->getCanonicalPath()); + throw new BuildException('Acquia Cloud backup records could not be loaded from JSON: ' . $file->getCanonicalPath()); } - /** - * Download the latest list of backup records from the Acquia Cloud API. - * - * @param \PhingFile $backups_file - * The file where the downloaded backup should be stored. - */ - protected function downloadBackupRecords(File $backups_file) { + /** + * Download the latest list of backup records from the Acquia Cloud API. + * + * @param Phing\Io\File $backups_file + * The file where the downloaded backup should be stored. + * + * @throws \HTTP_Request2_Exception + */ + protected function downloadBackupRecords(Phing\Io\File $backups_file) { $json = $this->getApiResponseBody("/sites/{$this->realm}:{$this->site}/envs/{$this->env}/dbs/{$this->database}/backups.json"); $writer = new FileWriter($backups_file); diff --git a/src/TheBuild/IncludeResourceTask.php b/src/TheBuild/IncludeResourceTask.php index c538df97..6daf35bb 100644 --- a/src/TheBuild/IncludeResourceTask.php +++ b/src/TheBuild/IncludeResourceTask.php @@ -22,14 +22,14 @@ class IncludeResourceTask extends Task { /** * The source file or directory to include. * - * @var File + * @var Phing\Io\File */ protected $source; /** * The location to link the file to. * - * @var File + * @var Phing\Io\File */ protected $dest = NULL; @@ -115,7 +115,7 @@ public function setMode(string $mode) { /** * Set the source of the resource to include. * - * @param File $source + * @param Phing\Io\File $source * Source file. */ public function setSource(File $source) { @@ -129,7 +129,7 @@ public function setSource(File $source) { /** * Set the destination for the resource. * - * @param File $dest + * @param Phing\Io\File $dest * File destination. */ public function setDest(File $dest) { From 2af91a51ff4c6c2f2f575a78ac92d9a919a60cfb Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 8 Feb 2023 13:26:40 -0600 Subject: [PATCH 07/11] Syntax errors. --- src/TheBuild/Acquia/AcquiaTask.php | 45 +++++++++++---------- src/TheBuild/Acquia/GetLatestBackupTask.php | 3 ++ 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/TheBuild/Acquia/AcquiaTask.php b/src/TheBuild/Acquia/AcquiaTask.php index e539db6d..8022cf00 100644 --- a/src/TheBuild/Acquia/AcquiaTask.php +++ b/src/TheBuild/Acquia/AcquiaTask.php @@ -4,9 +4,6 @@ use Phing\Task; use Phing\Exception\BuildException; -use Phing\Io\IOException; -use HTTP_Request2; -use HTTP_Request2_Exception; use Phing\Io\File; /** @@ -20,7 +17,7 @@ abstract class AcquiaTask extends Task { * This file can be downloaded from your Acquia user account area and contains * a json array with 'mail' and 'key' values. * - * @var File + * @var Phing\Io\File */ protected $credentialsFile; @@ -52,7 +49,7 @@ abstract class AcquiaTask extends Task { /** * Load the Acquia Cloud credentials from the cloudapi.conf JSON file. * - * @throws IOException + * @throws \Phing\Io\IOException; * * @SuppressWarnings(PHPMD.Superglobals) */ @@ -84,32 +81,36 @@ protected function loadCredentials() { * @param string $path * Acquia Cloud API path. * - * @return HTTP_Request2 + * @return \HTTP_Request2 * Request object. + * + * @throws \Phing\Io\IOException + * @throws \HTTP_Request2_LogicException */ - protected function createRequest(string $path) : HTTP_Request2 { + protected function createRequest(string $path) : \HTTP_Request2 { $this->loadCredentials(); $uri = $this->endpoint . '/' . ltrim($path, '/'); - $request = new HTTP_Request2($uri); + $request = new \HTTP_Request2($uri); $request->setConfig('follow_redirects', TRUE); $request->setAuth($this->mail, $this->key); return $request; } - /** - * Example of how to query the Acquia Cloud API. - * - * @param string $path - * Acquia Cloud API path. - * - * @return string - * API response. - * - * @throws HTTP_Request2_Exception - */ + /** + * Example of how to query the Acquia Cloud API. + * + * @param string $path + * Acquia Cloud API path. + * + * @return string + * API response. + * + * @throws \HTTP_Request2_Exception + * @throws \Phing\Io\IOException + */ protected function getApiResponseBody(string $path) : string { $request = $this->createRequest($path); @@ -121,12 +122,12 @@ protected function getApiResponseBody(string $path) : string { /** * Set the Acquia credentials file. * - * @param File $file + * @param Phing\Io\File $file * Acquia credentials file. * - * @throws IOException + * @throws \Phing\Io\IOException */ - public function setCredentialsFile(File $file) { + public function setCredentialsFile(Phing\Io\File $file) { $this->credentialsFile = new File($file); } diff --git a/src/TheBuild/Acquia/GetLatestBackupTask.php b/src/TheBuild/Acquia/GetLatestBackupTask.php index 2dfd4f00..5780b556 100644 --- a/src/TheBuild/Acquia/GetLatestBackupTask.php +++ b/src/TheBuild/Acquia/GetLatestBackupTask.php @@ -167,8 +167,10 @@ public function main() { * Acquia backup info array. * @param Phing\Io\File $destination * Destination file for the downloaded backup. + * * @throws Phing\Exception\BuildException * @throws \HTTP_Request2_Exception + * @throws \Phing\Io\IOException */ protected function downloadBackup(array $backup, Phing\Io\File $destination) { $stream = fopen($destination->getAbsolutePath(), 'wb'); @@ -269,6 +271,7 @@ protected function getBackupRecords(Phing\Io\File $file) { * The file where the downloaded backup should be stored. * * @throws \HTTP_Request2_Exception + * @throws \Phing\Io\IOException */ protected function downloadBackupRecords(Phing\Io\File $backups_file) { $json = $this->getApiResponseBody("/sites/{$this->realm}:{$this->site}/envs/{$this->env}/dbs/{$this->database}/backups.json"); From dab400777f723706547575c3c94d566ab4688ebc Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 8 Feb 2023 14:06:08 -0600 Subject: [PATCH 08/11] Syntax errors. --- src/TheBuild/Acquia/AcquiaTask.php | 4 ++-- src/TheBuild/Acquia/GetLatestBackupTask.php | 24 ++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/TheBuild/Acquia/AcquiaTask.php b/src/TheBuild/Acquia/AcquiaTask.php index 8022cf00..cf18012a 100644 --- a/src/TheBuild/Acquia/AcquiaTask.php +++ b/src/TheBuild/Acquia/AcquiaTask.php @@ -108,8 +108,8 @@ protected function createRequest(string $path) : \HTTP_Request2 { * @return string * API response. * - * @throws \HTTP_Request2_Exception * @throws \Phing\Io\IOException + * @throws \HTTP_Request2_Exception */ protected function getApiResponseBody(string $path) : string { $request = $this->createRequest($path); @@ -127,7 +127,7 @@ protected function getApiResponseBody(string $path) : string { * * @throws \Phing\Io\IOException */ - public function setCredentialsFile(Phing\Io\File $file) { + public function setCredentialsFile(File $file) { $this->credentialsFile = new File($file); } diff --git a/src/TheBuild/Acquia/GetLatestBackupTask.php b/src/TheBuild/Acquia/GetLatestBackupTask.php index 5780b556..0eca95b8 100644 --- a/src/TheBuild/Acquia/GetLatestBackupTask.php +++ b/src/TheBuild/Acquia/GetLatestBackupTask.php @@ -172,7 +172,7 @@ public function main() { * @throws \HTTP_Request2_Exception * @throws \Phing\Io\IOException */ - protected function downloadBackup(array $backup, Phing\Io\File $destination) { + protected function downloadBackup(array $backup, File $destination) { $stream = fopen($destination->getAbsolutePath(), 'wb'); if (!$stream) { throw new BuildException('Can not write to ' . $destination->getAbsolutePath()); @@ -238,7 +238,7 @@ protected function getCurrentBackupRecords() { * * @SuppressWarnings(PHPMD.ShortVariable) */ - protected function getBackupRecords(Phing\Io\File $file) { + protected function getBackupRecords(File $file) { if ($file->exists()) { $backups = json_decode($file->contents(), TRUE); @@ -264,16 +264,16 @@ protected function getBackupRecords(Phing\Io\File $file) { throw new BuildException('Acquia Cloud backup records could not be loaded from JSON: ' . $file->getCanonicalPath()); } - /** - * Download the latest list of backup records from the Acquia Cloud API. - * - * @param Phing\Io\File $backups_file - * The file where the downloaded backup should be stored. - * - * @throws \HTTP_Request2_Exception - * @throws \Phing\Io\IOException - */ - protected function downloadBackupRecords(Phing\Io\File $backups_file) { + /** + * Download the latest list of backup records from the Acquia Cloud API. + * + * @param Phing\Io\File $backups_file + * The file where the downloaded backup should be stored. + * + * @throws \Phing\Io\IOException + * @throws \HTTP_Request2_Exception + */ + protected function downloadBackupRecords(File $backups_file) { $json = $this->getApiResponseBody("/sites/{$this->realm}:{$this->site}/envs/{$this->env}/dbs/{$this->database}/backups.json"); $writer = new FileWriter($backups_file); From 78fea22cad4b64c1420c65b970362dd246248f11 Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 8 Feb 2023 14:36:26 -0600 Subject: [PATCH 09/11] Syntax errors. --- src/TheBuild/Acquia/AcquiaTask.php | 4 ++-- src/TheBuild/Acquia/GetLatestBackupTask.php | 14 +++++--------- src/TheBuild/CopyPropertiesTask.php | 4 ++-- src/TheBuild/ForeachKeyTask.php | 4 ++-- src/TheBuild/IncludeResourceTask.php | 17 ++++++++--------- src/TheBuild/MenuInputRequest.php | 2 +- src/TheBuild/SelectOneTask.php | 4 ++-- src/TheBuild/SelectPropertyKeyTask.php | 8 ++++---- 8 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/TheBuild/Acquia/AcquiaTask.php b/src/TheBuild/Acquia/AcquiaTask.php index cf18012a..2484d59e 100644 --- a/src/TheBuild/Acquia/AcquiaTask.php +++ b/src/TheBuild/Acquia/AcquiaTask.php @@ -17,7 +17,7 @@ abstract class AcquiaTask extends Task { * This file can be downloaded from your Acquia user account area and contains * a json array with 'mail' and 'key' values. * - * @var Phing\Io\File + * @var \Phing\Io\File */ protected $credentialsFile; @@ -122,7 +122,7 @@ protected function getApiResponseBody(string $path) : string { /** * Set the Acquia credentials file. * - * @param Phing\Io\File $file + * @param \Phing\Io\File $file * Acquia credentials file. * * @throws \Phing\Io\IOException diff --git a/src/TheBuild/Acquia/GetLatestBackupTask.php b/src/TheBuild/Acquia/GetLatestBackupTask.php index 0eca95b8..ae35d26f 100644 --- a/src/TheBuild/Acquia/GetLatestBackupTask.php +++ b/src/TheBuild/Acquia/GetLatestBackupTask.php @@ -14,7 +14,7 @@ class GetLatestBackupTask extends AcquiaTask { /** * Required. Directory for storing downloaded database backups. * - * @var Phing\Io\File + * @var \Phing\Io\File */ protected $dir; @@ -82,7 +82,7 @@ class GetLatestBackupTask extends AcquiaTask { * This info is downloaded from the Acquia Cloud API. The file is set to * 'backups.json' in the directory specified by $dir. * - * @var Phing\Io\File + * @var \Phing\Io\File */ protected $backupsFile; @@ -90,7 +90,6 @@ class GetLatestBackupTask extends AcquiaTask { * {@inheritdoc} * * @throws \Phing\Io\IOException - * @throws Phing\Exception\BuildException * @throws \HTTP_Request2_Exception */ public function main() { @@ -165,10 +164,9 @@ public function main() { * * @param array $backup * Acquia backup info array. - * @param Phing\Io\File $destination + * @param \Phing\Io\File $destination * Destination file for the downloaded backup. * - * @throws Phing\Exception\BuildException * @throws \HTTP_Request2_Exception * @throws \Phing\Io\IOException */ @@ -228,14 +226,12 @@ protected function getCurrentBackupRecords() { * * Sorts records from oldest to newest. * - * @param Phing\Io\File $file + * @param \Phing\Io\File $file * Temp file containing the Acquia Cloud API response. * * @return array * Acquia backup info array. * - * @throws Phing\Exception\BuildException - * * @SuppressWarnings(PHPMD.ShortVariable) */ protected function getBackupRecords(File $file) { @@ -267,7 +263,7 @@ protected function getBackupRecords(File $file) { /** * Download the latest list of backup records from the Acquia Cloud API. * - * @param Phing\Io\File $backups_file + * @param \Phing\Io\File $backups_file * The file where the downloaded backup should be stored. * * @throws \Phing\Io\IOException diff --git a/src/TheBuild/CopyPropertiesTask.php b/src/TheBuild/CopyPropertiesTask.php index b5cd8cf1..dce1278c 100644 --- a/src/TheBuild/CopyPropertiesTask.php +++ b/src/TheBuild/CopyPropertiesTask.php @@ -78,7 +78,7 @@ public function validate() { * Prefix to copy properties from. */ public function setFromPrefix($prefix) { - if (!\StringHelper::endsWith(".", $prefix)) { + if (!StringHelper::endsWith(".", $prefix)) { $prefix .= "."; } @@ -92,7 +92,7 @@ public function setFromPrefix($prefix) { * Prefix to copy properties into. */ public function setToPrefix($prefix) { - if (!\StringHelper::endsWith(".", $prefix)) { + if (!StringHelper::endsWith(".", $prefix)) { $prefix .= "."; } diff --git a/src/TheBuild/ForeachKeyTask.php b/src/TheBuild/ForeachKeyTask.php index 814692f6..859378c3 100644 --- a/src/TheBuild/ForeachKeyTask.php +++ b/src/TheBuild/ForeachKeyTask.php @@ -49,7 +49,7 @@ class ForeachKeyTask extends Task { /** * Instance of PhingCallTask to use/run. * - * @var PhingCallTask + * @var \Phing\Task\System\PhingCallTask */ protected $callee; @@ -125,7 +125,7 @@ public function validate() { * The key prefix. */ public function setPrefix($value) { - if (!\StringHelper::endsWith(".", $value)) { + if (!StringHelper::endsWith(".", $value)) { $value .= "."; } diff --git a/src/TheBuild/IncludeResourceTask.php b/src/TheBuild/IncludeResourceTask.php index 6daf35bb..8850aa01 100644 --- a/src/TheBuild/IncludeResourceTask.php +++ b/src/TheBuild/IncludeResourceTask.php @@ -5,7 +5,6 @@ use Phing\Task; use Phing\Exception\BuildException; use Phing\Io\File; -use Phing\Io\FileSystem; /** * Copy or symlink a file or directory, depending on a flag. @@ -22,14 +21,14 @@ class IncludeResourceTask extends Task { /** * The source file or directory to include. * - * @var Phing\Io\File + * @var \Phing\Io\File */ protected $source; /** * The location to link the file to. * - * @var Phing\Io\File + * @var \Phing\Io\File */ protected $dest = NULL; @@ -68,7 +67,7 @@ public function main() { $this->log("Replacing existing resource '" . $this->dest->getPath() . "'"); if ($this->dest->delete(TRUE) === FALSE) { - throw new \BuildException("Failed to delete existing destination '$this->dest'"); + throw new BuildException("Failed to delete existing destination '$this->dest'"); } } @@ -80,7 +79,7 @@ public function main() { } else { $this->log(sprintf("Linking '%s' to '%s'", $this->source->getPath(), $this->dest->getPath())); - /** @var \SymlinkTask $symlink_task */ + /** @var \Phing\Task\System\SymlinkTask $symlink_task */ $symlink_task = $this->project->createTask("symlink"); $symlink_task->setTarget($this->source->getPath()); $symlink_task->setLink($this->dest->getPath()); @@ -98,7 +97,7 @@ public function validate() { } if (empty($this->source) || empty($this->dest)) { - throw new \BuildException("Both the 'source' and 'dest' attributes are required."); + throw new BuildException("Both the 'source' and 'dest' attributes are required."); } } @@ -115,12 +114,12 @@ public function setMode(string $mode) { /** * Set the source of the resource to include. * - * @param Phing\Io\File $source + * @param \Phing\Io\File $source * Source file. */ public function setSource(File $source) { if (!$source->exists()) { - throw new \BuildException("resource '$source' is not available'"); + throw new BuildException("resource '$source' is not available'"); } $this->source = $source; @@ -129,7 +128,7 @@ public function setSource(File $source) { /** * Set the destination for the resource. * - * @param Phing\Io\File $dest + * @param \Phing\Io\File $dest * File destination. */ public function setDest(File $dest) { diff --git a/src/TheBuild/MenuInputRequest.php b/src/TheBuild/MenuInputRequest.php index bf09cc70..6bc4617c 100644 --- a/src/TheBuild/MenuInputRequest.php +++ b/src/TheBuild/MenuInputRequest.php @@ -7,7 +7,7 @@ /** * Input interface that prompts the user to select from a menu of options. */ -class MenuInputRequest extends \InputRequest { +class MenuInputRequest extends InputRequest { /** * Prompt to display with the menu. diff --git a/src/TheBuild/SelectOneTask.php b/src/TheBuild/SelectOneTask.php index 58616639..445e035d 100644 --- a/src/TheBuild/SelectOneTask.php +++ b/src/TheBuild/SelectOneTask.php @@ -48,7 +48,7 @@ public function main() { $project = $this->getProject(); if ($existing_value = $this->project->getProperty($this->propertyName)) { - $this->log("Using {$this->propertyName} = '{$existing_value}' (existing value)", \Project::MSG_INFO); + $this->log("Using {$this->propertyName} = '{$existing_value}' (existing value)", Project::MSG_INFO); return; } @@ -67,7 +67,7 @@ public function main() { } elseif (count($keys) == 1) { $value = current($keys); - $this->log("Using {$this->propertyName} = '{$value}' (one value found)", \Project::MSG_INFO); + $this->log("Using {$this->propertyName} = '{$value}' (one value found)", Project::MSG_INFO); } if ($value) { diff --git a/src/TheBuild/SelectPropertyKeyTask.php b/src/TheBuild/SelectPropertyKeyTask.php index 47a42131..ceeb290d 100644 --- a/src/TheBuild/SelectPropertyKeyTask.php +++ b/src/TheBuild/SelectPropertyKeyTask.php @@ -48,7 +48,7 @@ public function main() { $project = $this->getProject(); if ($existing_value = $this->project->getProperty($this->propertyName)) { - $this->log("Using {$this->propertyName} = '{$existing_value}' (existing value)", \Project::MSG_INFO); + $this->log("Using {$this->propertyName} = '{$existing_value}' (existing value)", Project::MSG_INFO); return; } @@ -79,10 +79,10 @@ public function main() { } elseif (count($keys) == 1) { $value = current($keys); - $this->log("Using {$this->propertyName} = '{$value}' (one value found)", \Project::MSG_INFO); + $this->log("Using {$this->propertyName} = '{$value}' (one value found)", Project::MSG_INFO); } else { - $this->log("No properties found with prefix '{$this->prefix}'", \Project::MSG_WARN); + $this->log("No properties found with prefix '{$this->prefix}'", Project::MSG_WARN); } if ($value) { @@ -108,7 +108,7 @@ public function validate() { * Keys with this prefix will be provided as options. */ public function setPrefix($value) { - if (!\StringHelper::endsWith(".", $value)) { + if (!StringHelper::endsWith(".", $value)) { $value .= "."; } From 7de7781f252dd2a572ca673b3641ca3bec90730e Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 8 Feb 2023 14:39:46 -0600 Subject: [PATCH 10/11] Syntax errors. --- src/TheBuild/Acquia/GetLatestBackupTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TheBuild/Acquia/GetLatestBackupTask.php b/src/TheBuild/Acquia/GetLatestBackupTask.php index ae35d26f..a4e6d39b 100644 --- a/src/TheBuild/Acquia/GetLatestBackupTask.php +++ b/src/TheBuild/Acquia/GetLatestBackupTask.php @@ -167,8 +167,8 @@ public function main() { * @param \Phing\Io\File $destination * Destination file for the downloaded backup. * - * @throws \HTTP_Request2_Exception * @throws \Phing\Io\IOException + * @throws \HTTP_Request2_Exception */ protected function downloadBackup(array $backup, File $destination) { $stream = fopen($destination->getAbsolutePath(), 'wb'); From 118007d16b1807ff494bdb3cc4da98803fa4ca67 Mon Sep 17 00:00:00 2001 From: Kelsey Bentham Date: Wed, 8 Feb 2023 14:46:16 -0600 Subject: [PATCH 11/11] Syntax errors. --- src/TheBuild/IncludeResourceTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TheBuild/IncludeResourceTask.php b/src/TheBuild/IncludeResourceTask.php index 8850aa01..70503159 100644 --- a/src/TheBuild/IncludeResourceTask.php +++ b/src/TheBuild/IncludeResourceTask.php @@ -71,7 +71,7 @@ public function main() { } } - // Link or copy the source artifact. @phpstan-ignore-next-line + // Link or copy the source artifact. $this->dest->getParentFile()->mkdirs(); if ($this->mode == 'copy') { $this->log(sprintf("Copying '%s' to '%s'", $this->source->getPath(), $this->dest->getPath()));