CLI-1103: Fix #1558: Notification arg formats #1801
Annotations
9 warnings
src/Command/CommandBase.php#L1072
Escaped Mutant for Mutator "Catch_":
--- Original
+++ New
@@ @@
// Last chance, maybe a URL?
try {
return self::getNotificationUuidFromUrl($notification);
- } catch (ValidatorException|AcquiaCliException) {
+ } catch (AcquiaCliException) {
}
// Womp womp.
throw new AcquiaCliException('Notification format is not one of UUID, JSON response, or URL');
|
src/Command/CommandBase.php#L1524
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
} else {
throw new AcquiaCliException('JSON object must contain the _links.notification.href property');
}
- if (property_exists($links, 'notification') && property_exists($links->notification, 'href')) {
+ if (property_exists($links, 'notification') || property_exists($links->notification, 'href')) {
return self::getNotificationUuidFromUrl($links->notification->href);
}
throw new AcquiaCliException('JSON object must contain the _links.notification.href property');
|
src/Command/CommandBase.php#L1530
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
}
throw new AcquiaCliException('JSON object must contain the _links.notification.href property');
}
- public static function getNotificationUuidFromUrl(string $notificationUrl) : string
+ protected static function getNotificationUuidFromUrl(string $notificationUrl) : string
{
$notificationUrlPattern = '/^https:\\/\\/cloud.acquia.com\\/api\\/notifications\\/([\\w-]*)$/';
if (preg_match($notificationUrlPattern, $notificationUrl, $matches)) {
|
src/Command/CommandBase.php#L1533
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
$notificationUrlPattern = '/^https:\\/\\/cloud.acquia.com\\/api\\/notifications\\/([\\w-]*)$/';
if (preg_match($notificationUrlPattern, $notificationUrl, $matches)) {
- self::validateUuid($matches[1]);
+
return $matches[1];
}
throw new AcquiaCliException('Notification UUID not found in URL: {url}', ['url' => $notificationUrl]);
|
src/Command/CommandBase.php#L1536
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
self::validateUuid($matches[1]);
return $matches[1];
}
- throw new AcquiaCliException('Notification UUID not found in URL: {url}', ['url' => $notificationUrl]);
+ throw new AcquiaCliException('Notification UUID not found in URL: {url}', []);
}
protected function validateRequiredCloudPermissions(Client $acquiaCloudClient, ?string $cloudApplicationUuid, AccountResponse $account, array $requiredPermissions) : void
{
|
src/Command/Env/EnvMirrorCommand.php#L83
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$configCopyResponse = $this->mirrorConfig($sourceEnvironment, $destinationEnvironment, $environmentsResource, $destinationEnvironmentUuid, $outputCallback);
}
if (isset($codeCopyResponse)) {
- $this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($codeCopyResponse), 'Waiting for code copy to complete');
+
}
if (isset($dbCopyResponse)) {
$this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($dbCopyResponse), 'Waiting for database copy to complete');
|
src/Command/Env/EnvMirrorCommand.php#L86
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($codeCopyResponse), 'Waiting for code copy to complete');
}
if (isset($dbCopyResponse)) {
- $this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($dbCopyResponse), 'Waiting for database copy to complete');
+
}
if (isset($filesCopyResponse)) {
$this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($filesCopyResponse), 'Waiting for files copy to complete');
|
src/Command/Env/EnvMirrorCommand.php#L89
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($dbCopyResponse), 'Waiting for database copy to complete');
}
if (isset($filesCopyResponse)) {
- $this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($filesCopyResponse), 'Waiting for files copy to complete');
+
}
if (isset($configCopyResponse)) {
$this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($configCopyResponse), 'Waiting for config copy to complete');
|
src/Command/Env/EnvMirrorCommand.php#L92
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($filesCopyResponse), 'Waiting for files copy to complete');
}
if (isset($configCopyResponse)) {
- $this->waitForNotificationToComplete($acquiaCloudClient, CommandBase::getNotificationUuidFromResponse($configCopyResponse), 'Waiting for config copy to complete');
+
}
$this->io->success(["Done! {$destinationEnvironment->label} now matches {$sourceEnvironment->label}", "You can visit it here:", "https://" . $destinationEnvironment->domains[0]]);
return Command::SUCCESS;
|
The logs for this run have expired and are no longer available.
Loading