diff --git a/.github/workflows/build-private.yml b/.github/workflows/build-private.yml
index b4fc20e7..ca4a8dd0 100644
--- a/.github/workflows/build-private.yml
+++ b/.github/workflows/build-private.yml
@@ -5,7 +5,7 @@ on:
- develop
pull_request:
paths:
- - 'workflows/build-private.yml'
+ - '.github/workflows/build-private.yml'
- 'docker/prod/**'
workflow_dispatch:
@@ -37,6 +37,21 @@ jobs:
only_args: --no-dev --no-ansi --no-interaction --prefer-dist --ignore-platform-reqs --classmap-authoritative
php_version: 8.3
+ - name: "Checkout services extension"
+ uses: actions/checkout@v4
+ with:
+ repository: solidtime-io/extension-services
+ path: extensions/Services
+ ssh-key: ${{ secrets.SSH_PRIVATE_KEY_SERVICES_EXTENSION }}
+
+ - name: "Install dependencies in services extension"
+ uses: php-actions/composer@v6
+ with:
+ working_dir: "extensions/Services"
+ command: install
+ only_args: --no-dev --no-ansi --no-interaction --prefer-dist --ignore-platform-reqs --classmap-authoritative
+ php_version: 8.3
+
- name: "Setup PHP with PECL extension"
uses: shivammathur/setup-php@v2
with:
@@ -65,6 +80,9 @@ jobs:
- name: "Activate billing extension"
run: php artisan module:enable Billing
+ - name: "Activate services extension"
+ run: php artisan module:enable Services
+
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
diff --git a/.github/workflows/build-public.yml b/.github/workflows/build-public.yml
index b618e8c8..2bdf2346 100644
--- a/.github/workflows/build-public.yml
+++ b/.github/workflows/build-public.yml
@@ -5,7 +5,7 @@ on:
- develop
pull_request:
paths:
- - 'workflows/build-public.yml'
+ - '.github/workflows/build-public.yml'
- 'docker/prod/**'
workflow_dispatch:
diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml
index 4848e9af..730d8558 100644
--- a/.github/workflows/phpunit.yml
+++ b/.github/workflows/phpunit.yml
@@ -50,8 +50,8 @@ jobs:
php artisan key:generate
php artisan passport:keys
- - name: "Run PHPUnit in parallel"
- run: php artisan test --parallel --stop-on-failure --coverage-text --coverage-clover=coverage.xml
+ - name: "Run PHPUnit"
+ run: php artisan test --stop-on-failure --coverage-text --coverage-clover=coverage.xml
- name: "Upload coverage reports to Codecov"
uses: codecov/codecov-action@v4.3.0
diff --git a/app/Service/Import/Importers/TogglDataImporter.php b/app/Service/Import/Importers/TogglDataImporter.php
index eacb14a0..07a4bb04 100644
--- a/app/Service/Import/Importers/TogglDataImporter.php
+++ b/app/Service/Import/Importers/TogglDataImporter.php
@@ -6,6 +6,7 @@ namespace App\Service\Import\Importers;
use Exception;
use Spatie\TemporaryDirectory\TemporaryDirectory;
+use ValueError;
use ZipArchive;
class TogglDataImporter extends DefaultImporter
@@ -20,7 +21,10 @@ class TogglDataImporter extends DefaultImporter
$zip = new ZipArchive();
$temporaryDirectory = TemporaryDirectory::make();
file_put_contents($temporaryDirectory->path('import.zip'), $data);
- $zip->open($temporaryDirectory->path('import.zip'), ZipArchive::RDONLY);
+ $res = $zip->open($temporaryDirectory->path('import.zip'), ZipArchive::RDONLY);
+ if ($res !== true) {
+ throw new ImportException('Invalid ZIP, error code: '.$res);
+ }
$temporaryDirectory = TemporaryDirectory::make();
$zip->extractTo($temporaryDirectory->path());
$zip->close();
@@ -107,6 +111,8 @@ class TogglDataImporter extends DefaultImporter
], [], (string) $task->id);
}
}
+ } catch (ValueError $exception) {
+
} catch (ImportException $exception) {
throw $exception;
} catch (Exception $exception) {
diff --git a/config/logging.php b/config/logging.php
index 7599b746..2a28ad4e 100644
--- a/config/logging.php
+++ b/config/logging.php
@@ -69,7 +69,7 @@ return [
'stack_production' => [
'driver' => 'stack',
- 'channels' => ['single', 'sentry'],
+ 'channels' => ['stderr', 'sentry'],
],
'daily' => [
diff --git a/resources/js/Components/Dashboard/DashboardCard.vue b/resources/js/Components/Dashboard/DashboardCard.vue
index 688cb384..e492657f 100644
--- a/resources/js/Components/Dashboard/DashboardCard.vue
+++ b/resources/js/Components/Dashboard/DashboardCard.vue
@@ -3,8 +3,7 @@