Skip to content

Commit

Permalink
build(deps): maj deps js et php (geostyler, symfony etc) (#647)
Browse files Browse the repository at this point in the history
* build(deps): maj deps js et php

* fix: erreurs avec la nouvelle version de phpstan

* fix(twig): suppr "apply spaceless" parce que deprecated
  • Loading branch information
ocruze authored Feb 10, 2025
1 parent c1d5349 commit 6dc2c36
Show file tree
Hide file tree
Showing 14 changed files with 737 additions and 761 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"knpuniversity/oauth2-client-bundle": "^2.14",
"pentatrion/vite-bundle": "^7.0",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.28",
"phpstan/phpdoc-parser": "^2.0",
"stevenmaguire/oauth2-keycloak": "^5.0",
"symfony/asset": "6.4.*",
"symfony/console": "6.4.*",
Expand Down Expand Up @@ -48,7 +48,7 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.18",
"phpmd/phpmd": "^2.13",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.0",
"symfony/browser-kit": "6.4.*",
"symfony/css-selector": "6.4.*",
"symfony/debug-bundle": "6.4.*",
Expand Down
351 changes: 175 additions & 176 deletions composer.lock

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@
"date-fns": "^4.0.0",
"date-fns-tz": "^3.1.3",
"dotenv": "^16.3.1",
"events": "^3.3.0",
"geopf-extensions-openlayers": "^1.0.0-beta.0",
"geostyler-mapbox-parser": "^5.0.1",
"geostyler-openlayers-parser": "^4.3.0",
"geostyler-qgis-parser": "^2.0.0",
"geostyler-sld-parser": "^5.4.0",
"geostyler-style": "^8.0.0",
"geostyler-mapbox-parser": "^6.0.0",
"geostyler-openlayers-parser": "^5.0.0",
"geostyler-qgis-parser": "^4.0.0",
"geostyler-sld-parser": "^7.0.0",
"geostyler-style": "^10.0.0",
"i18nifty": "^3.0.0",
"intl-messageformat": "^10.5.14",
"markdown-it": "^14.1.0",
"ol": "8.2.0",
"ol": "^10.0.0",
"postcss": "^8.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dsfr-tiptap": "^1.0.3",
"react-error-boundary": "^4.0.10",
"react-error-boundary": "^5.0.0",
"react-hook-form": "^7.45.1",
"simple-zustand-devtools": "^1.1.0",
"tiptap-markdown": "^0.8.10",
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ parameters:
paths:
- src
ignoreErrors:
- '#return type has no value type specified in iterable type array#'
- "#return type has no value type specified in iterable type array#"
# excludes_analyse:
# - tests/bootstrap.php
# bootstrapFiles:
# - bin/.phpunit/phpunit/vendor/autoload.php
treatPhpDocTypesAsCertain: false
3 changes: 1 addition & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"matchUpdateTypes": ["major"],
"dependencyDashboardApproval": true
}
],
"ignoreDeps": ["ol", "ol-mapbox-style", "php"]
]
}
2 changes: 2 additions & 0 deletions src/Controller/Entrepot/DatasheetDocumentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ public function add(string $datastoreId, string $datasheetName, Request $request
$tempFilePath = join(DIRECTORY_SEPARATOR, [$tempFileDir, $file->getClientOriginalName()]);

$file->move($tempFileDir, $file->getClientOriginalName());
} else {
throw new CartesApiException('Fichier non fourni', Response::HTTP_BAD_REQUEST);
}

$annexePath = join('/', ['documents', $datasheetName, $uuid, $file->getClientOriginalName()]);
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Entrepot/UploadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ public function runIntegrationStep(string $datastoreId, array $upload, array $pr
case UploadTags::INT_STEP_PROCESSING:
switch ($currentStepStatus) {
case JobStatuses::WAITING:
/** @var array<string> */
$processing = $this->datastoreService->getProcIntegrateVectorFilesInBase($datastoreId);

$procExecBody = [
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Entrepot/WfsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(
CartesServiceApiService $cartesServiceApiService,
private CapabilitiesService $capabilitiesService,
private CartesMetadataApiService $cartesMetadataApiService,
SandboxService $sandboxService
SandboxService $sandboxService,
) {
parent::__construct($datastoreApiService, $configurationApiService, $cartesServiceApiService, $capabilitiesService, $cartesMetadataApiService, $sandboxService);
}
Expand Down
14 changes: 6 additions & 8 deletions src/Listener/CartesApiExceptionSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class CartesApiExceptionSubscriber implements EventSubscriberInterface
{
public function __construct(
private LoggerInterface $logger
private LoggerInterface $logger,
) {
}

Expand Down Expand Up @@ -51,14 +51,12 @@ private function getErrorResponse(CartesApiException $throwable): JsonResponse
'details' => [],
];

if ($throwable instanceof CartesApiException) {
$code = $throwable->getCode();
$responseData['code'] = $code;
$code = $throwable->getCode();
$responseData['code'] = $code;

$responseData['status'] = Response::$statusTexts[$code];
$responseData['message'] = $throwable->getMessage();
$responseData['details'] = $throwable->getDetails();
}
$responseData['status'] = Response::$statusTexts[$code];
$responseData['message'] = $throwable->getMessage();
$responseData['details'] = $throwable->getDetails();

$this->logger->debug('Exception[{throwable}]: {message}', [
'throwable' => get_class($throwable),
Expand Down
2 changes: 2 additions & 0 deletions src/Security/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public function __construct(array $keycloakUserInfo = [], array $apiUserInfo = [
$this->firstName = $keycloakUserInfo['given_name'] ?? null;
$this->lastName = $keycloakUserInfo['family_name'] ?? null;
$this->userName = $keycloakUserInfo['preferred_username'];
$this->accountCreationDate = null;
$this->lastLoginDate = null;

if (array_key_exists('creation', $apiUserInfo)) {
$this->accountCreationDate = new \DateTime($apiUserInfo['creation']);
Expand Down
2 changes: 1 addition & 1 deletion src/Services/EntrepotApi/UserDocumentsApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function add(string $filePath, string $name, ?string $description = null,
* @param array<mixed> $extra
* @param array<string> $labels
*/
public function modify(string $documentId, string $name, ?string $description = null, ?array $extra = null, ?array $labels = null, ?bool $publicUrl = null): array
public function modify(string $documentId, ?string $name = null, ?string $description = null, ?array $extra = null, ?array $labels = null, ?bool $publicUrl = null): array
{
$body = [];

Expand Down
21 changes: 12 additions & 9 deletions templates/Mailer/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{% trans_default_domain 'cartesgouvfr' %}

{% block body_html %}
{% apply spaceless %}
<h2>{% block subject %}{% endblock %}</h2>
<h2>
{% block subject %}

<p>
{{ 'mailer.hello'|trans }},
</p>
{% endblock %}
</h2>

{% block body %}{% endblock %}
<p>{{ 'mailer.hello'|trans }},</p>

<p>{{ 'mailer.signature'|trans({'%href%': url('cartesgouvfr_app')})|raw }}</p>
{% block body %}

{% endblock %}

{% endapply %}
<p>{{ 'mailer.signature'|trans({'%href%': url('cartesgouvfr_app')})|raw }}</p>
{% endblock %}

{% block contact %}{% endblock %}
{% block contact %}

{% endblock %}
12 changes: 4 additions & 8 deletions templates/metadata/metadata_dataset_iso.xml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,11 @@
{% if inspire_keywords|length %}
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
{% apply spaceless %}
{% for item in inspire_keywords %}
{%- for item in inspire_keywords -%}
<gmd:keyword>
<gco:CharacterString>{{ item }}</gco:CharacterString>
</gmd:keyword>
{% endfor %}
{% endapply %}
{%- endfor -%}
<gmd:thesaurusName>
<gmd:CI_Citation>
<gmd:title>
Expand All @@ -118,13 +116,11 @@
{% if free_keywords|length %}
<gmd:descriptiveKeywords>
<gmd:MD_Keywords>
{% apply spaceless %}
{% for item in free_keywords %}
{%- for item in free_keywords -%}
<gmd:keyword>
<gco:CharacterString>{{ item }}</gco:CharacterString>
</gmd:keyword>
{% endfor %}
{% endapply %}
{%- endfor -%}
<gmd:type>
<gmd:MD_KeywordTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_KeywordTypeCode" codeListValue="theme">theme</gmd:MD_KeywordTypeCode>
</gmd:type>
Expand Down
Loading

0 comments on commit 6dc2c36

Please sign in to comment.