Skip to content

Commit

Permalink
Implied the changes from Core side to the FrontOffice, added migratio…
Browse files Browse the repository at this point in the history
…ns, removed translations, and a lot more.
  • Loading branch information
ruslanbaidan committed Aug 22, 2023
1 parent 52641e9 commit cc534a1
Show file tree
Hide file tree
Showing 194 changed files with 6,196 additions and 4,625 deletions.
12 changes: 10 additions & 2 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
use Monarc\FrontOffice\Model\Entity\Anr;
use Monarc\FrontOffice\Model\Entity\CronTask;
use Monarc\FrontOffice\Model\Entity\Snapshot;
use Monarc\FrontOffice\Model\Table\AnrTable;
use Monarc\FrontOffice\Model\Table\InstanceTable;
use Monarc\FrontOffice\Model\Table\SnapshotTable;
use Monarc\FrontOffice\Table\AnrTable;
use Monarc\FrontOffice\Table\UserAnrTable;
use Laminas\Http\Request;
use Laminas\Mvc\ModuleRouteListener;
Expand Down Expand Up @@ -90,7 +90,15 @@ public function getJsonModelError($e)
if ($error === 'error-router-no-match') {
$errorJson['message'] = 'Resource not found.';
}
$model = new JsonModel(['errors' => [$errorJson]]);

if ($exception->getCode() === 400) {
$model = new JsonModel([
'errors' => [json_decode($exception->getMessage(), true, 512, JSON_THROW_ON_ERROR)],
]);
} else {
$model = new JsonModel(['errors' => [$errorJson]]);
}

$e->setResult($model);

return $model;
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
}
],
"require": {
"php": "^7.4",
"php": "^7.4 || ^8.0",
"ext-intl": "*",
"ext-imagick": "*",
"ext-json": "*",
"ext-bcmath": "*",
"ext-openssl": "*",
"ext-posix": "*",
"doctrine/doctrine-orm-module": "^5.1",
"monarc/core": "dev-feature/remove-db-abstract",
"robmorgan/phinx": "^0.11.1",
"monarc/core": "dev-feature/remove-db-abstract as v2.12.6",
"robmorgan/phinx": "^0.13.4",
"laminas/laminas-di": "^3.1",
"laminas/laminas-mvc": "^3.1",
"laminas/laminas-mvc-console": "^1.2",
Expand Down
521 changes: 366 additions & 155 deletions config/module.config.php

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit cc534a1

Please sign in to comment.