From 7593537f3d55d7b3fe9909e8c5d48b475a94eaa8 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 7 Aug 2024 16:02:24 +0300 Subject: [PATCH] Add error hook --- composer.lock | 26 ++++++++++---------- src/Appwrite/Platform/Workers/Migrations.php | 4 ++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/composer.lock b/composer.lock index 6949a53726..a7b43d2011 100644 --- a/composer.lock +++ b/composer.lock @@ -2176,12 +2176,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "ae6151e7a65fc5bf253461cd8db909001d7549e9" + "reference": "274115b3246e40b9235f259288a9bbc3f403227c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/ae6151e7a65fc5bf253461cd8db909001d7549e9", - "reference": "ae6151e7a65fc5bf253461cd8db909001d7549e9", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/274115b3246e40b9235f259288a9bbc3f403227c", + "reference": "274115b3246e40b9235f259288a9bbc3f403227c", "shasum": "" }, "require": { @@ -2224,7 +2224,7 @@ "issues": "https://github.com/utopia-php/migration/issues", "source": "https://github.com/utopia-php/migration/tree/backups" }, - "time": "2024-08-06T09:32:45+00:00" + "time": "2024-08-07T12:56:55+00:00" }, { "name": "utopia-php/mongo", @@ -3167,16 +3167,16 @@ }, { "name": "laravel/pint", - "version": "v1.17.1", + "version": "v1.17.2", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "b5b6f716db298671c1dfea5b1082ec2c0ae7064f" + "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/b5b6f716db298671c1dfea5b1082ec2c0ae7064f", - "reference": "b5b6f716db298671c1dfea5b1082ec2c0ae7064f", + "url": "https://api.github.com/repos/laravel/pint/zipball/e8a88130a25e3f9d4d5785e6a1afca98268ab110", + "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110", "shasum": "" }, "require": { @@ -3187,13 +3187,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.59.3", - "illuminate/view": "^10.48.12", - "larastan/larastan": "^2.9.7", + "friendsofphp/php-cs-fixer": "^3.61.1", + "illuminate/view": "^10.48.18", + "larastan/larastan": "^2.9.8", "laravel-zero/framework": "^10.4.0", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.34.8" + "pestphp/pest": "^2.35.0" }, "bin": [ "builds/pint" @@ -3229,7 +3229,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-08-01T09:06:33+00:00" + "time": "2024-08-06T15:11:54+00:00" }, { "name": "matthiasmullie/minify", diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index d80df6b1a0..42e2035964 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -37,7 +37,6 @@ class Migrations extends Action protected Database $dbForConsole; protected Document $project; - //protected Document $migration; public static function getName(): string { @@ -375,6 +374,9 @@ class Migrations extends Action $log->addTag('migrationErrors', json_encode($errorMessages)); } } finally { + $destination->error($migration); + $source->error($migration); + if (! $tempAPIKey->isEmpty()) { $this->removeAPIKey($tempAPIKey); }