Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b94c3a95be | ||
| 394c69e84a | |||
|
|
c2074df562 | ||
| 29bfeeb4ee | |||
|
|
5ac03e359f | ||
|
|
340aa2a3c0 |
@@ -64,6 +64,7 @@ Ajouter dans le fichier .env du frontend
|
||||
* [#FER-13] Faire des recherches sur le scanner des bêtes
|
||||
* [#FER-15] Les non-admin ne peuvent plus supprimer de réception/expédition en attente
|
||||
* [#FER-17] Ecran d'ajout de bovin
|
||||
* [#FER-18] Mise à jour du tableau d'arrivage
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
79
README.md
79
README.md
@@ -1,50 +1,63 @@
|
||||
# Projet Ferme
|
||||
# Projet Ferme t
|
||||
|
||||
## Installation du projet
|
||||
|
||||
### Windows
|
||||
|
||||
Pour windows, il faut installer le WSL2, Ubuntu, docker et nvm.
|
||||
Il suffit de suivre cette [doc](https://wiki.malio.fr/bookstack/books/environnement-de-dev/chapter/windows)
|
||||
Il suffit de suivre cette [doc](https://wiki.malio.fr/bookstack/books/environnement-de-dev/chapter/windows)
|
||||
|
||||
### Linux
|
||||
|
||||
Pour linux, il faut installer docker et nvm.
|
||||
Il suffit de suivre cette [doc](https://wiki.malio.fr/bookstack/books/environnement-de-dev/chapter/linux)
|
||||
|
||||
### Installation du projet
|
||||
|
||||
Une fois les prérequis installés, il suffit de cloner le projet et de lancer les commandes suivantes
|
||||
|
||||
```bash
|
||||
make start
|
||||
make install
|
||||
```
|
||||
|
||||
Dans le cas ou le `make start` plante à cause du port de la bdd, il faut modifier **POSTGRES_PORT** dans le fichier .env.docker.local, remplacer le par un port disponible.
|
||||
|
||||
### Configuration global
|
||||
|
||||
Pour les variables d'environnement, il faut demander un .env.local pour le backend et un .env pour le frontend à votre collègue.
|
||||
|
||||
Vérifier que dans le .env.local, vous avez :
|
||||
* APP_SECRET (à généré dans le conteneur avec la commande php -r "echo bin2hex(random_bytes(32));" et doit être différent de celui de votre collègue, puisque utilisé pour signer des tokens)
|
||||
* DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/${POSTGRES_DB}?serverVersion=16&charset=utf8"
|
||||
* PONT_BASCULE_BYPASS (doit être à true en dev)
|
||||
* PONT_BASCULE_URL
|
||||
* JWT_SECRET_KEY (à générer avec la commande php bin/console lexik:jwt:generate-keypair)
|
||||
* JWT_PUBLIC_KEY
|
||||
* JWT_PASSPHRASE (à généré dans le conteneur avec la commande php -r "echo bin2hex(random_bytes(32));")
|
||||
* COOKIE_SECURE=0 (en dev 0 et en prod 1. Si c'est du http, laisser en 0)
|
||||
|
||||
- APP_SECRET (à généré dans le conteneur avec la commande php -r "echo bin2hex(random_bytes(32));" et doit être différent de celui de votre collègue, puisque utilisé pour signer des tokens)
|
||||
- DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/${POSTGRES_DB}?serverVersion=16&charset=utf8"
|
||||
- PONT_BASCULE_BYPASS (doit être à true en dev)
|
||||
- PONT_BASCULE_URL
|
||||
- JWT_SECRET_KEY (à générer avec la commande php bin/console lexik:jwt:generate-keypair)
|
||||
- JWT_PUBLIC_KEY
|
||||
- JWT_PASSPHRASE (à généré dans le conteneur avec la commande php -r "echo bin2hex(random_bytes(32));")
|
||||
- COOKIE_SECURE=0 (en dev 0 et en prod 1. Si c'est du http, laisser en 0)
|
||||
|
||||
Vérifier que dans le .env du dossier frontend, vous avez :
|
||||
* NUXT_PUBLIC_API_BASE="http://localhost:8080/api"
|
||||
|
||||
- NUXT_PUBLIC_API_BASE="http://localhost:8080/api"
|
||||
|
||||
### Configuration xdebug
|
||||
|
||||
Pour configurer xdebug, il faut ajouter un serveur sur phpstorm. <br>
|
||||
Pour cela, il faut aller dans **Settings > PHP > Servers** <br>
|
||||
* Name : ferme-docker
|
||||
* Host : localhost
|
||||
* Port : 8080
|
||||
* Path : File/Directory -> l'endroit où est stocké votre projet et le path -> /var/www/html
|
||||
|
||||
- Name : ferme-docker
|
||||
- Host : localhost
|
||||
- Port : 8080
|
||||
- Path : File/Directory -> l'endroit où est stocké votre projet et le path -> /var/www/html
|
||||
|
||||
Pour que xdebug fonctionne sur windows, il faut modifier la variable **XDEBUG_CLIENT_HOST** par votre ip local
|
||||
|
||||
## Utilisation du projet
|
||||
|
||||
### Backend
|
||||
|
||||
L'api est disponible sur http://localhost:8080/api
|
||||
Pour la bdd toutes les infos sont dans le fichier **docker/.env.docker.local**
|
||||
Vous pouvez modifier le port si nécessaire.
|
||||
@@ -53,17 +66,22 @@ La bdd est déja pré-configuré dans PhpStorm, il suffit de rentrer les infos d
|
||||
C'est un bdd local dans le docker.
|
||||
|
||||
### Frontend
|
||||
|
||||
Pour le frontend, il suffit de taper la commande suivante qui va lancer le serveur de dev
|
||||
|
||||
```bash
|
||||
make dev-nuxt
|
||||
```
|
||||
|
||||
Le front sera accessible sur http://localhost:3000
|
||||
|
||||
### Authentification
|
||||
|
||||
Ce projet utilise l'authentification JWT avec un cookie httpOnly (LexikJWTAuthenticationBundle).
|
||||
Le frontend ne lit jamais directement le token, le navigateur envoie automatiquement le cookie.
|
||||
|
||||
### Login flow
|
||||
|
||||
- Frontend envoie les identifiants à:
|
||||
- `POST /api/login_check`
|
||||
- Backend returns:
|
||||
@@ -73,20 +91,26 @@ Le frontend ne lit jamais directement le token, le navigateur envoie automatique
|
||||
- La déconnexion utilise `POST /api/logout` et redirige vers `/login`.
|
||||
|
||||
### Fixtures
|
||||
|
||||
Pour lancer les fixtures (Attention sa purge la bdd complètement)
|
||||
|
||||
```bash
|
||||
php bin/console doctrine:fixtures:load
|
||||
```
|
||||
|
||||
Attention cette commande est dangereuse, à utiliser que pour les débuts de la prod ou en recette.
|
||||
Dans un premier temps pour remplir les listes, vous pouvez lancer la commande symfony
|
||||
|
||||
```bash
|
||||
php bin/console app:seed
|
||||
```
|
||||
|
||||
La commande va faire une update ou une création en fonction des data existante.
|
||||
|
||||
## Livraison en recette
|
||||
|
||||
### Préparatifs
|
||||
|
||||
Avant de déployer, il faut penser à ajouter les variables d'env s'il y a des changements/modifications.
|
||||
Le .env se trouve /var/www/ferme/.env
|
||||
|
||||
@@ -95,43 +119,62 @@ Sur la machine, il est disponible dans /usr/local/bin/deploy-ferme <br>
|
||||
Pour le modifier, il faut copier le contenu du deploy-release.sh dans le deploy-ferme
|
||||
|
||||
### Livraison
|
||||
|
||||
Sur le serveur de recette, il suffit d'utiliser cette commande pour livrer
|
||||
```bash
|
||||
|
||||
```bash
|
||||
/usr/local/bin/deploy-ferme vX.Y.Z
|
||||
```
|
||||
|
||||
## Commandes utiles
|
||||
|
||||
Pour restart le container
|
||||
|
||||
```bash
|
||||
make restart
|
||||
```
|
||||
|
||||
Pour lancer les TU
|
||||
|
||||
```bash
|
||||
make test
|
||||
```
|
||||
|
||||
Pour accéder au container et lance des commandes
|
||||
|
||||
```bash
|
||||
make shell
|
||||
```
|
||||
|
||||
Pour clear le cache Symfony
|
||||
|
||||
```bash
|
||||
make cache-clear
|
||||
```
|
||||
|
||||
Faire une migration
|
||||
|
||||
```bash
|
||||
make migration-migrate
|
||||
```
|
||||
|
||||
Pour générer un password pour un user
|
||||
|
||||
```bash
|
||||
make shell
|
||||
php bin/console security:hash-password
|
||||
```
|
||||
|
||||
Sélectionner entity User, taper sont mdp, le copier et l'ajouter dans l'insert de bdd suivant :
|
||||
|
||||
```sql
|
||||
INSERT INTO "user" (username, roles, password)
|
||||
VALUES ('Mon user', '["ROLE_USER"]', 'Mon mdp hashé');
|
||||
```
|
||||
|
||||
## Gestion des logs
|
||||
|
||||
Pour suivre les logs en temps réel :
|
||||
* tail -f var/log/dev.log
|
||||
* tail -f var/log/prod.log
|
||||
|
||||
- tail -f var/log/dev.log
|
||||
- tail -f var/log/prod.log
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"doctrine/orm": "^3.6",
|
||||
"dompdf/dompdf": "^3.1",
|
||||
"lexik/jwt-authentication-bundle": "*",
|
||||
"malio/ednotif-bundle": ">=0.0.4",
|
||||
"malio/ednotif-bundle": ">=0.0.6",
|
||||
"nelmio/cors-bundle": "^2.6",
|
||||
"phpdocumentor/reflection-docblock": "^5.6",
|
||||
"phpstan/phpdoc-parser": "^2.3",
|
||||
|
||||
176
composer.lock
generated
176
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "9c04091eea0e10c19713a1d882b04f91",
|
||||
"content-hash": "fd62fc3833815b11aa058fd2759c1c79",
|
||||
"packages": [
|
||||
{
|
||||
"name": "api-platform/doctrine-common",
|
||||
@@ -2706,11 +2706,11 @@
|
||||
},
|
||||
{
|
||||
"name": "malio/ednotif-bundle",
|
||||
"version": "v0.0.4",
|
||||
"version": "v0.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://gitea.malio.fr/MALIO-DEV/ednotif-bundle",
|
||||
"reference": "92c058213b34ba61f4aa6c03e11ce1ea8cc71421"
|
||||
"reference": "f757822f366bd5f55588aa89e0ec5a5d0e811f1f"
|
||||
},
|
||||
"require": {
|
||||
"ext-soap": "*",
|
||||
@@ -2744,7 +2744,7 @@
|
||||
"MIT"
|
||||
],
|
||||
"description": "Client EDNOTIF (Guichet + wsIpBNotif) pour Symfony",
|
||||
"time": "2026-01-26T13:24:38+00:00"
|
||||
"time": "2026-04-21T08:14:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
@@ -3655,16 +3655,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/cache",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/cache.git",
|
||||
"reference": "5d3fcada5e1b80157cfdfd1f9dbbd63f95ef6f13"
|
||||
"reference": "8abf3ccbeae9d3071b81a3ae7ee11b209f9e1e78"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/cache/zipball/5d3fcada5e1b80157cfdfd1f9dbbd63f95ef6f13",
|
||||
"reference": "5d3fcada5e1b80157cfdfd1f9dbbd63f95ef6f13",
|
||||
"url": "https://api.github.com/repos/symfony/cache/zipball/8abf3ccbeae9d3071b81a3ae7ee11b209f9e1e78",
|
||||
"reference": "8abf3ccbeae9d3071b81a3ae7ee11b209f9e1e78",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3731,7 +3731,7 @@
|
||||
"psr6"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/cache/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/cache/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3751,7 +3751,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-23T12:59:31+00:00"
|
||||
"time": "2026-03-30T15:18:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/cache-contracts",
|
||||
@@ -3908,16 +3908,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/config.git",
|
||||
"reference": "8f45af92f08f82902827a8b6f403aaf49d893539"
|
||||
"reference": "c7369cc1da250fcbfe0c5a9d109e419661549c39"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/8f45af92f08f82902827a8b6f403aaf49d893539",
|
||||
"reference": "8f45af92f08f82902827a8b6f403aaf49d893539",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/c7369cc1da250fcbfe0c5a9d109e419661549c39",
|
||||
"reference": "c7369cc1da250fcbfe0c5a9d109e419661549c39",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3962,7 +3962,7 @@
|
||||
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/config/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/config/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3982,7 +3982,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-13T13:06:50+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
@@ -4076,16 +4076,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dependency-injection.git",
|
||||
"reference": "59c3cf87a7ed9beb561cf7433a6635b000a0ff4d"
|
||||
"reference": "3ce58b0fa844dc647ca1d66ea34748af985728c5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/59c3cf87a7ed9beb561cf7433a6635b000a0ff4d",
|
||||
"reference": "59c3cf87a7ed9beb561cf7433a6635b000a0ff4d",
|
||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/3ce58b0fa844dc647ca1d66ea34748af985728c5",
|
||||
"reference": "3ce58b0fa844dc647ca1d66ea34748af985728c5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4133,7 +4133,7 @@
|
||||
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/dependency-injection/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/dependency-injection/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4153,7 +4153,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-23T12:59:31+00:00"
|
||||
"time": "2026-03-31T07:15:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
@@ -4400,16 +4400,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/error-handler",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/error-handler.git",
|
||||
"reference": "7620b97ec0ab1d2d6c7fb737aa55da411bea776a"
|
||||
"reference": "c1119fe8dcfc3825ec74ec061b96ef0c8f281517"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/7620b97ec0ab1d2d6c7fb737aa55da411bea776a",
|
||||
"reference": "7620b97ec0ab1d2d6c7fb737aa55da411bea776a",
|
||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/c1119fe8dcfc3825ec74ec061b96ef0c8f281517",
|
||||
"reference": "c1119fe8dcfc3825ec74ec061b96ef0c8f281517",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4457,7 +4457,7 @@
|
||||
"description": "Provides tools to manage errors and ease debugging PHP code",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/error-handler/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/error-handler/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4477,20 +4477,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-23T11:07:10+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "99301401da182b6cfaa4700dbe9987bb75474b47"
|
||||
"reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/99301401da182b6cfaa4700dbe9987bb75474b47",
|
||||
"reference": "99301401da182b6cfaa4700dbe9987bb75474b47",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f662acc6ab22a3d6d716dcb44c381c6002940df6",
|
||||
"reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4542,7 +4542,7 @@
|
||||
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/event-dispatcher/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/event-dispatcher/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4562,7 +4562,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-05T11:45:55+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher-contracts",
|
||||
@@ -4709,16 +4709,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v8.0.1",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "d937d400b980523dc9ee946bb69972b5e619058d"
|
||||
"reference": "66b769ae743ce2d13e435528fbef4af03d623e5a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d",
|
||||
"reference": "d937d400b980523dc9ee946bb69972b5e619058d",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/66b769ae743ce2d13e435528fbef4af03d623e5a",
|
||||
"reference": "66b769ae743ce2d13e435528fbef4af03d623e5a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4755,7 +4755,7 @@
|
||||
"description": "Provides basic utilities for the filesystem",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/filesystem/tree/v8.0.1"
|
||||
"source": "https://github.com/symfony/filesystem/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4775,7 +4775,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-01T09:13:36+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
@@ -5234,16 +5234,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "e33ba71e674a1bb16eb251688bd27c2ff67e0dc1"
|
||||
"reference": "02656f7ebeae5c155d659e946f6b3a33df24051b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/e33ba71e674a1bb16eb251688bd27c2ff67e0dc1",
|
||||
"reference": "e33ba71e674a1bb16eb251688bd27c2ff67e0dc1",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/02656f7ebeae5c155d659e946f6b3a33df24051b",
|
||||
"reference": "02656f7ebeae5c155d659e946f6b3a33df24051b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5290,7 +5290,7 @@
|
||||
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5310,20 +5310,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-09T12:15:10+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "3e61425b663a995957217d03c444b9d27ca7d928"
|
||||
"reference": "1770f6818d83b2fddc12185025b93f39a90cb628"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/3e61425b663a995957217d03c444b9d27ca7d928",
|
||||
"reference": "3e61425b663a995957217d03c444b9d27ca7d928",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/1770f6818d83b2fddc12185025b93f39a90cb628",
|
||||
"reference": "1770f6818d83b2fddc12185025b93f39a90cb628",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5394,7 +5394,7 @@
|
||||
"description": "Provides a structured process for converting a Request into a Response",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5414,7 +5414,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-25T08:21:00+00:00"
|
||||
"time": "2026-03-31T21:14:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/monolog-bridge",
|
||||
@@ -5574,16 +5574,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
"version": "v8.0.0",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/options-resolver.git",
|
||||
"reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7"
|
||||
"reference": "b48bce0a70b914f6953dafbd10474df232ed4de8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
|
||||
"reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7",
|
||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/b48bce0a70b914f6953dafbd10474df232ed4de8",
|
||||
"reference": "b48bce0a70b914f6953dafbd10474df232ed4de8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5621,7 +5621,7 @@
|
||||
"options"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/options-resolver/tree/v8.0.0"
|
||||
"source": "https://github.com/symfony/options-resolver/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5641,7 +5641,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-12T15:55:31+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/password-hasher",
|
||||
@@ -5885,16 +5885,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.33.0",
|
||||
"version": "v1.36.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
|
||||
"reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
|
||||
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315",
|
||||
"reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5946,7 +5946,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.36.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5966,20 +5966,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-12-23T08:48:59+00:00"
|
||||
"time": "2026-04-10T17:25:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php85",
|
||||
"version": "v1.33.0",
|
||||
"version": "v1.36.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php85.git",
|
||||
"reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91"
|
||||
"reference": "2c408a6bb0313e6001a83628dc5506100474254e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91",
|
||||
"reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/2c408a6bb0313e6001a83628dc5506100474254e",
|
||||
"reference": "2c408a6bb0313e6001a83628dc5506100474254e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6026,7 +6026,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php85/tree/v1.33.0"
|
||||
"source": "https://github.com/symfony/polyfill-php85/tree/v1.36.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6046,7 +6046,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-23T16:12:55+00:00"
|
||||
"time": "2026-04-10T16:50:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-uuid",
|
||||
@@ -7667,16 +7667,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "326e0406fc315eca57ef5740fa4a280b7a068c82"
|
||||
"reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/326e0406fc315eca57ef5740fa4a280b7a068c82",
|
||||
"reference": "326e0406fc315eca57ef5740fa4a280b7a068c82",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/cfb7badd53bf4177f6e9416cfbbccc13c0e773a1",
|
||||
"reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7730,7 +7730,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7750,20 +7750,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-01T23:07:29+00:00"
|
||||
"time": "2026-03-31T07:15:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-exporter",
|
||||
"version": "v8.0.0",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-exporter.git",
|
||||
"reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04"
|
||||
"reference": "15776bb07a91b089037da89f8832fa41d5fa6ec6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04",
|
||||
"reference": "7345f46c251f2eb27c7b3ebdb5bb076b3ffcae04",
|
||||
"url": "https://api.github.com/repos/symfony/var-exporter/zipball/15776bb07a91b089037da89f8832fa41d5fa6ec6",
|
||||
"reference": "15776bb07a91b089037da89f8832fa41d5fa6ec6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7810,7 +7810,7 @@
|
||||
"serialize"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-exporter/tree/v8.0.0"
|
||||
"source": "https://github.com/symfony/var-exporter/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7830,7 +7830,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-05T18:53:00+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/web-link",
|
||||
@@ -11457,16 +11457,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v8.0.4",
|
||||
"version": "v8.0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "10df72602d88c0a3fa685b822976a052611dd607"
|
||||
"reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/10df72602d88c0a3fa685b822976a052611dd607",
|
||||
"reference": "10df72602d88c0a3fa685b822976a052611dd607",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc",
|
||||
"reference": "cb8939aff03470d1a9d1d1b66d08c6fa71b3bbdc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -11498,7 +11498,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/process/tree/v8.0.4"
|
||||
"source": "https://github.com/symfony/process/tree/v8.0.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -11518,7 +11518,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-01-23T11:07:10+00:00"
|
||||
"time": "2026-03-30T15:14:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/web-profiler-bundle",
|
||||
|
||||
@@ -210,18 +210,18 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* initial_marking?: list<scalar|Param|null>,
|
||||
* events_to_dispatch?: list<string|Param>|null,
|
||||
* places?: list<array{ // Default: []
|
||||
* name: scalar|Param|null,
|
||||
* name?: scalar|Param|null,
|
||||
* metadata?: list<mixed>,
|
||||
* }>,
|
||||
* transitions: list<array{ // Default: []
|
||||
* name: string|Param,
|
||||
* transitions?: list<array{ // Default: []
|
||||
* name?: string|Param,
|
||||
* guard?: string|Param, // An expression to block the transition.
|
||||
* from?: list<array{ // Default: []
|
||||
* place: string|Param,
|
||||
* place?: string|Param,
|
||||
* weight?: int|Param, // Default: 1
|
||||
* }>,
|
||||
* to?: list<array{ // Default: []
|
||||
* place: string|Param,
|
||||
* place?: string|Param,
|
||||
* weight?: int|Param, // Default: 1
|
||||
* }>,
|
||||
* weight?: int|Param, // Default: 1
|
||||
@@ -232,7 +232,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* },
|
||||
* router?: bool|array{ // Router configuration
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* resource: scalar|Param|null,
|
||||
* resource?: scalar|Param|null,
|
||||
* type?: scalar|Param|null,
|
||||
* default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null
|
||||
* http_port?: scalar|Param|null, // Default: 80
|
||||
@@ -457,7 +457,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* allow_no_senders?: bool|Param, // Default: true
|
||||
* },
|
||||
* middleware?: list<string|array{ // Default: []
|
||||
* id: scalar|Param|null,
|
||||
* id?: scalar|Param|null,
|
||||
* arguments?: list<mixed>,
|
||||
* }>,
|
||||
* }>,
|
||||
@@ -629,7 +629,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* lock_factory?: scalar|Param|null, // The service ID of the lock factory used by this limiter (or null to disable locking). // Default: "auto"
|
||||
* cache_pool?: scalar|Param|null, // The cache pool to use for storing the current limiter state. // Default: "cache.rate_limiter"
|
||||
* storage_service?: scalar|Param|null, // The service ID of a custom storage implementation, this precedes any configured "cache_pool". // Default: null
|
||||
* policy: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
|
||||
* policy?: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
|
||||
* limiters?: list<scalar|Param|null>,
|
||||
* limit?: int|Param, // The maximum allowed hits in a fixed interval or burst.
|
||||
* interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
|
||||
@@ -674,7 +674,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus"
|
||||
* routing?: array<string, array{ // Default: []
|
||||
* service: scalar|Param|null,
|
||||
* service?: scalar|Param|null,
|
||||
* secret?: scalar|Param|null, // Default: ""
|
||||
* }>,
|
||||
* },
|
||||
@@ -754,8 +754,8 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* }>,
|
||||
* },
|
||||
* ldap?: array{
|
||||
* service: scalar|Param|null,
|
||||
* base_dn: scalar|Param|null,
|
||||
* service?: scalar|Param|null,
|
||||
* base_dn?: scalar|Param|null,
|
||||
* search_dn?: scalar|Param|null, // Default: null
|
||||
* search_password?: scalar|Param|null, // Default: null
|
||||
* extra_fields?: list<scalar|Param|null>,
|
||||
@@ -766,7 +766,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* password_attribute?: scalar|Param|null, // Default: null
|
||||
* },
|
||||
* entity?: array{
|
||||
* class: scalar|Param|null, // The full entity class name of your user class.
|
||||
* class?: scalar|Param|null, // The full entity class name of your user class.
|
||||
* property?: scalar|Param|null, // Default: null
|
||||
* manager_name?: scalar|Param|null, // Default: null
|
||||
* },
|
||||
@@ -774,7 +774,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* class?: scalar|Param|null, // Default: "Lexik\\Bundle\\JWTAuthenticationBundle\\Security\\User\\JWTUser"
|
||||
* },
|
||||
* }>,
|
||||
* firewalls: array<string, array{ // Default: []
|
||||
* firewalls?: array<string, array{ // Default: []
|
||||
* pattern?: scalar|Param|null,
|
||||
* host?: scalar|Param|null,
|
||||
* methods?: list<scalar|Param|null>,
|
||||
@@ -836,9 +836,9 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* authenticator?: scalar|Param|null, // Default: "lexik_jwt_authentication.security.jwt_authenticator"
|
||||
* },
|
||||
* login_link?: array{
|
||||
* check_route: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify".
|
||||
* check_route?: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify".
|
||||
* check_post_only?: scalar|Param|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false
|
||||
* signature_properties: list<scalar|Param|null>,
|
||||
* signature_properties?: list<scalar|Param|null>,
|
||||
* lifetime?: int|Param, // The lifetime of the login link in seconds. // Default: 600
|
||||
* max_uses?: int|Param, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null
|
||||
* used_link_cache?: scalar|Param|null, // Cache service id used to expired links of max_uses is set.
|
||||
@@ -940,13 +940,13 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* failure_handler?: scalar|Param|null,
|
||||
* realm?: scalar|Param|null, // Default: null
|
||||
* token_extractors?: list<scalar|Param|null>,
|
||||
* token_handler: string|array{
|
||||
* token_handler?: string|array{
|
||||
* id?: scalar|Param|null,
|
||||
* oidc_user_info?: string|array{
|
||||
* base_uri: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured).
|
||||
* base_uri?: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured).
|
||||
* discovery?: array{ // Enable the OIDC discovery.
|
||||
* cache?: array{
|
||||
* id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
|
||||
* id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
|
||||
* },
|
||||
* },
|
||||
* claim?: scalar|Param|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub"
|
||||
@@ -954,25 +954,25 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* },
|
||||
* oidc?: array{
|
||||
* discovery?: array{ // Enable the OIDC discovery.
|
||||
* base_uri: list<scalar|Param|null>,
|
||||
* base_uri?: list<scalar|Param|null>,
|
||||
* cache?: array{
|
||||
* id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
|
||||
* id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
|
||||
* },
|
||||
* },
|
||||
* claim?: scalar|Param|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub"
|
||||
* audience: scalar|Param|null, // Audience set in the token, for validation purpose.
|
||||
* issuers: list<scalar|Param|null>,
|
||||
* algorithms: list<scalar|Param|null>,
|
||||
* audience?: scalar|Param|null, // Audience set in the token, for validation purpose.
|
||||
* issuers?: list<scalar|Param|null>,
|
||||
* algorithms?: list<scalar|Param|null>,
|
||||
* keyset?: scalar|Param|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys).
|
||||
* encryption?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* enforce?: bool|Param, // When enabled, the token shall be encrypted. // Default: false
|
||||
* algorithms: list<scalar|Param|null>,
|
||||
* keyset: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys).
|
||||
* algorithms?: list<scalar|Param|null>,
|
||||
* keyset?: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys).
|
||||
* },
|
||||
* },
|
||||
* cas?: array{
|
||||
* validation_url: scalar|Param|null, // CAS server validation URL
|
||||
* validation_url?: scalar|Param|null, // CAS server validation URL
|
||||
* prefix?: scalar|Param|null, // CAS prefix // Default: "cas"
|
||||
* http_client?: scalar|Param|null, // HTTP Client service // Default: null
|
||||
* },
|
||||
@@ -1036,7 +1036,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* dbal?: array{
|
||||
* default_connection?: scalar|Param|null,
|
||||
* types?: array<string, string|array{ // Default: []
|
||||
* class: scalar|Param|null,
|
||||
* class?: scalar|Param|null,
|
||||
* }>,
|
||||
* driver_schemes?: array<string, scalar|Param|null>,
|
||||
* connections?: array<string, array{ // Default: []
|
||||
@@ -1207,7 +1207,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* datetime_functions?: array<string, scalar|Param|null>,
|
||||
* },
|
||||
* filters?: array<string, string|array{ // Default: []
|
||||
* class: scalar|Param|null,
|
||||
* class?: scalar|Param|null,
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* parameters?: array<string, mixed>,
|
||||
* }>,
|
||||
@@ -1320,14 +1320,14 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* access_token_issuance?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* signature?: array{
|
||||
* algorithm: scalar|Param|null, // The algorithm use to sign the access tokens.
|
||||
* key: scalar|Param|null, // The signature key. It shall be JWK encoded.
|
||||
* algorithm?: scalar|Param|null, // The algorithm use to sign the access tokens.
|
||||
* key?: scalar|Param|null, // The signature key. It shall be JWK encoded.
|
||||
* },
|
||||
* encryption?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
* key_encryption_algorithm: scalar|Param|null, // The key encryption algorithm is used to encrypt the token.
|
||||
* content_encryption_algorithm: scalar|Param|null, // The key encryption algorithm is used to encrypt the token.
|
||||
* key: scalar|Param|null, // The encryption key. It shall be JWK encoded.
|
||||
* key_encryption_algorithm?: scalar|Param|null, // The key encryption algorithm is used to encrypt the token.
|
||||
* content_encryption_algorithm?: scalar|Param|null, // The key encryption algorithm is used to encrypt the token.
|
||||
* key?: scalar|Param|null, // The encryption key. It shall be JWK encoded.
|
||||
* },
|
||||
* },
|
||||
* access_token_verification?: bool|array{
|
||||
@@ -1337,7 +1337,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* claim_checkers?: list<scalar|Param|null>,
|
||||
* mandatory_claims?: list<scalar|Param|null>,
|
||||
* allowed_algorithms?: list<scalar|Param|null>,
|
||||
* keyset: scalar|Param|null, // The signature keyset. It shall be JWKSet encoded.
|
||||
* keyset?: scalar|Param|null, // The signature keyset. It shall be JWKSet encoded.
|
||||
* },
|
||||
* encryption?: bool|array{
|
||||
* enabled?: bool|Param, // Default: false
|
||||
@@ -1345,7 +1345,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* header_checkers?: list<scalar|Param|null>,
|
||||
* allowed_key_encryption_algorithms?: list<scalar|Param|null>,
|
||||
* allowed_content_encryption_algorithms?: list<scalar|Param|null>,
|
||||
* keyset: scalar|Param|null, // The encryption keyset. It shall be JWKSet encoded.
|
||||
* keyset?: scalar|Param|null, // The encryption keyset. It shall be JWKSet encoded.
|
||||
* },
|
||||
* },
|
||||
* blocklist_token?: bool|array{
|
||||
@@ -1489,7 +1489,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* },
|
||||
* termsOfService?: scalar|Param|null, // A URL to the Terms of Service for the API. MUST be in the format of a URL. // Default: null
|
||||
* tags?: list<array{ // Default: []
|
||||
* name: scalar|Param|null,
|
||||
* name?: scalar|Param|null,
|
||||
* description?: scalar|Param|null, // Default: null
|
||||
* }>,
|
||||
* license?: array{
|
||||
@@ -1605,14 +1605,14 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* name?: mixed,
|
||||
* allow_create?: mixed,
|
||||
* item_uri_template?: mixed,
|
||||
* ...<mixed>
|
||||
* ...<string, mixed>
|
||||
* },
|
||||
* }
|
||||
* @psalm-type MonologConfig = array{
|
||||
* use_microseconds?: scalar|Param|null, // Default: true
|
||||
* channels?: list<scalar|Param|null>,
|
||||
* handlers?: array<string, array{ // Default: []
|
||||
* type: scalar|Param|null,
|
||||
* type?: scalar|Param|null,
|
||||
* id?: scalar|Param|null,
|
||||
* enabled?: bool|Param, // Default: true
|
||||
* priority?: scalar|Param|null, // Default: 0
|
||||
@@ -1735,7 +1735,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* headers?: list<scalar|Param|null>,
|
||||
* mailer?: scalar|Param|null, // Default: null
|
||||
* email_prototype?: string|array{
|
||||
* id: scalar|Param|null,
|
||||
* id?: scalar|Param|null,
|
||||
* method?: scalar|Param|null, // Default: null
|
||||
* },
|
||||
* verbosity_levels?: array{
|
||||
@@ -1752,14 +1752,14 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
||||
* }>,
|
||||
* }
|
||||
* @psalm-type EdnotifConfig = array{
|
||||
* guichet_wsdl: scalar|Param|null,
|
||||
* metier_wsdl: scalar|Param|null,
|
||||
* exploitation_code: scalar|Param|null,
|
||||
* guichet_wsdl?: scalar|Param|null, // Default: "/var/www/html/vendor/malio/ednotif-bundle/resources/ednotif-ws/WsGuichet.wsdl"
|
||||
* metier_wsdl?: scalar|Param|null, // Default: "/var/www/html/vendor/malio/ednotif-bundle/resources/ednotif-ws/wsIpBNotif.wsdl"
|
||||
* exploitation_code?: scalar|Param|null,
|
||||
* zone?: scalar|Param|null, // Default: null
|
||||
* application?: scalar|Param|null, // Default: null
|
||||
* login: scalar|Param|null,
|
||||
* password: scalar|Param|null,
|
||||
* exploitation_number: scalar|Param|null,
|
||||
* login?: scalar|Param|null,
|
||||
* password?: scalar|Param|null,
|
||||
* exploitation_number?: scalar|Param|null,
|
||||
* exploitation_country_code?: scalar|Param|null, // Default: "FR"
|
||||
* token_ttl_seconds?: int|Param, // Default: 900
|
||||
* soap_options?: array{
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
parameters:
|
||||
app.version: '0.0.81'
|
||||
app.version: '0.0.85'
|
||||
|
||||
31
src/ApiResource/AnimalSummary.php
Normal file
31
src/ApiResource/AnimalSummary.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\ApiResource;
|
||||
|
||||
final class AnimalSummary
|
||||
{
|
||||
public ?string $countryCode = null;
|
||||
public ?string $nationalNumber = null;
|
||||
|
||||
public ?string $sex = null;
|
||||
public ?string $breedType = null;
|
||||
public ?string $workNumber = null;
|
||||
|
||||
public ?string $birthDate = null;
|
||||
public ?string $birthDateCompletenessFlag = null;
|
||||
|
||||
public ?bool $isFilie = null;
|
||||
|
||||
public ?string $motherNationalNumber = null;
|
||||
public ?string $motherBreedType = null;
|
||||
|
||||
public ?string $fatherNationalNumber = null;
|
||||
public ?string $fatherBreedType = null;
|
||||
|
||||
public ?string $birthExploitationNumber = null;
|
||||
|
||||
/** @var list<PresencePeriod> */
|
||||
public array $presencePeriods = [];
|
||||
}
|
||||
@@ -6,7 +6,7 @@ namespace App\ApiResource;
|
||||
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use App\State\AppVersionProvider;
|
||||
use App\State\System\AppVersionProvider;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
#[ApiResource(
|
||||
|
||||
@@ -7,12 +7,14 @@ namespace App\ApiResource;
|
||||
use ApiPlatform\Metadata\ApiProperty;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use App\State\BovinIdentificationProvider;
|
||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||
use App\State\Bovin\BovinIdentificationProvider;
|
||||
|
||||
#[ApiResource(
|
||||
operations: [
|
||||
new Get(
|
||||
uriTemplate: '/bovins/{numeroNational}/identification',
|
||||
openapi: new OpenApiOperation(tags: ['Bovins']),
|
||||
provider: BovinIdentificationProvider::class
|
||||
),
|
||||
]
|
||||
|
||||
34
src/ApiResource/BovinInventory.php
Normal file
34
src/ApiResource/BovinInventory.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\ApiResource;
|
||||
|
||||
use ApiPlatform\Metadata\ApiProperty;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||
use App\State\Bovin\BovinInventoryProvider;
|
||||
|
||||
#[ApiResource(
|
||||
operations: [
|
||||
new Get(
|
||||
uriTemplate: '/bovins/inventory/{startDate}',
|
||||
openapi: new OpenApiOperation(tags: ['Bovins']),
|
||||
provider: BovinInventoryProvider::class
|
||||
),
|
||||
]
|
||||
)]
|
||||
final class BovinInventory
|
||||
{
|
||||
#[ApiProperty(identifier: true)]
|
||||
public string $startDate;
|
||||
|
||||
public ?string $endDate = null;
|
||||
public ?bool $includesEarTagStock = null;
|
||||
public int $nbBovins = 0;
|
||||
public int $earTagSeriesCount = 0;
|
||||
|
||||
/** @var list<AnimalSummary> */
|
||||
public array $animals = [];
|
||||
}
|
||||
12
src/ApiResource/BovinPresumedExit.php
Normal file
12
src/ApiResource/BovinPresumedExit.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\ApiResource;
|
||||
|
||||
final class BovinPresumedExit
|
||||
{
|
||||
public ?string $countryCode = null;
|
||||
public ?string $nationalNumber = null;
|
||||
public ?string $exitDate = null;
|
||||
}
|
||||
31
src/ApiResource/BovinPresumedExits.php
Normal file
31
src/ApiResource/BovinPresumedExits.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\ApiResource;
|
||||
|
||||
use ApiPlatform\Metadata\ApiProperty;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||
use App\State\Bovin\BovinPresumedExitsProvider;
|
||||
|
||||
#[ApiResource(
|
||||
operations: [
|
||||
new Get(
|
||||
uriTemplate: '/bovins/presumed-exits',
|
||||
openapi: new OpenApiOperation(tags: ['Bovins']),
|
||||
provider: BovinPresumedExitsProvider::class
|
||||
),
|
||||
]
|
||||
)]
|
||||
final class BovinPresumedExits
|
||||
{
|
||||
#[ApiProperty(identifier: true)]
|
||||
public string $id = 'current';
|
||||
|
||||
public int $nbBovins = 0;
|
||||
|
||||
/** @var list<BovinPresumedExit> */
|
||||
public array $presumedExits = [];
|
||||
}
|
||||
31
src/ApiResource/BovinReturnedDossiers.php
Normal file
31
src/ApiResource/BovinReturnedDossiers.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\ApiResource;
|
||||
|
||||
use ApiPlatform\Metadata\ApiProperty;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||
use App\State\Bovin\BovinReturnedDossiersProvider;
|
||||
|
||||
#[ApiResource(
|
||||
operations: [
|
||||
new Get(
|
||||
uriTemplate: '/bovins/returned-dossiers/{startDate}',
|
||||
openapi: new OpenApiOperation(tags: ['Bovins']),
|
||||
provider: BovinReturnedDossiersProvider::class
|
||||
),
|
||||
]
|
||||
)]
|
||||
final class BovinReturnedDossiers
|
||||
{
|
||||
#[ApiProperty(identifier: true)]
|
||||
public string $startDate;
|
||||
|
||||
public int $nbBovins = 0;
|
||||
|
||||
/** @var list<AnimalSummary> */
|
||||
public array $animals = [];
|
||||
}
|
||||
@@ -9,7 +9,7 @@ use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\Metadata\GetCollection;
|
||||
use ApiPlatform\Metadata\Patch;
|
||||
use ApiPlatform\Metadata\Post;
|
||||
use App\State\BovineProcessor;
|
||||
use App\State\Bovin\BovineProcessor;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Attribute\Context;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace App\Entity;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||
use App\State\BuildingCaseWeightsReportProvider;
|
||||
use App\State\Building\BuildingCaseWeightsReportProvider;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
@@ -15,8 +15,8 @@ use ApiPlatform\Metadata\Patch;
|
||||
use ApiPlatform\Metadata\Post;
|
||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||
use App\Dto\PontBasculeReading;
|
||||
use App\State\ReceptionReceiptProvider;
|
||||
use App\State\ReceptionWeighingProvider;
|
||||
use App\State\Reception\ReceptionReceiptProvider;
|
||||
use App\State\Reception\ReceptionWeighingProvider;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
@@ -15,8 +15,8 @@ use ApiPlatform\Metadata\Patch;
|
||||
use ApiPlatform\Metadata\Post;
|
||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||
use App\Dto\PontBasculeReading;
|
||||
use App\State\ShipmentReceiptProvider;
|
||||
use App\State\ShipmentWeighingProvider;
|
||||
use App\State\Shipment\ShipmentReceiptProvider;
|
||||
use App\State\Shipment\ShipmentWeighingProvider;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
@@ -9,9 +9,9 @@ use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\Metadata\GetCollection;
|
||||
use ApiPlatform\Metadata\Patch;
|
||||
use ApiPlatform\Metadata\Post;
|
||||
use App\State\ActiveUsersProvider;
|
||||
use App\State\MeProvider;
|
||||
use App\State\UserPasswordProcessor;
|
||||
use App\State\User\ActiveUsersProvider;
|
||||
use App\State\User\MeProvider;
|
||||
use App\State\User\UserPasswordProcessor;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
53
src/Service/AnimalSummaryMapper.php
Normal file
53
src/Service/AnimalSummaryMapper.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use App\ApiResource\AnimalSummary;
|
||||
use App\ApiResource\PresencePeriod;
|
||||
use Malio\EdnotifBundle\Bovin\Dto\AnimalSummaryDto;
|
||||
|
||||
final class AnimalSummaryMapper
|
||||
{
|
||||
public function map(AnimalSummaryDto $dto): AnimalSummary
|
||||
{
|
||||
$summary = new AnimalSummary();
|
||||
|
||||
$identification = $dto->identification;
|
||||
|
||||
$summary->countryCode = $identification?->bovin?->countryCode;
|
||||
$summary->nationalNumber = $identification?->bovin?->nationalNumber;
|
||||
|
||||
$summary->sex = $identification?->sex;
|
||||
$summary->breedType = $identification?->breedType;
|
||||
$summary->workNumber = $identification?->workNumber;
|
||||
|
||||
$summary->birthDate = $identification?->birthDate?->date?->format('Y-m-d');
|
||||
$summary->birthDateCompletenessFlag = $identification?->birthDate?->completenessFlag;
|
||||
|
||||
$summary->isFilie = $identification?->isFilie;
|
||||
|
||||
$summary->motherNationalNumber = $identification?->motherCarrier?->bovin?->nationalNumber;
|
||||
$summary->motherBreedType = $identification?->motherCarrier?->breedType;
|
||||
|
||||
$summary->fatherNationalNumber = $identification?->fatherIpg?->bovin?->nationalNumber;
|
||||
$summary->fatherBreedType = $identification?->fatherIpg?->breedType;
|
||||
|
||||
$summary->birthExploitationNumber = $identification?->birthExploitation?->exploitationNumber;
|
||||
|
||||
foreach ($dto->presencePeriods as $presencePeriodDto) {
|
||||
$presencePeriod = new PresencePeriod();
|
||||
|
||||
$presencePeriod->entryDate = $presencePeriodDto->entry?->date?->format('Y-m-d');
|
||||
$presencePeriod->entryCause = $presencePeriodDto->entry?->cause;
|
||||
|
||||
$presencePeriod->exitDate = $presencePeriodDto->exit?->date?->format('Y-m-d');
|
||||
$presencePeriod->exitCause = $presencePeriodDto->exit?->cause;
|
||||
|
||||
$summary->presencePeriods[] = $presencePeriod;
|
||||
}
|
||||
|
||||
return $summary;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\Bovin;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
76
src/State/Bovin/BovinInventoryProvider.php
Normal file
76
src/State/Bovin/BovinInventoryProvider.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State\Bovin;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
use App\ApiResource\BovinInventory;
|
||||
use App\Service\AnimalSummaryMapper;
|
||||
use DateTimeImmutable;
|
||||
use Exception;
|
||||
use Malio\EdnotifBundle\Bovin\Api\BovinApiInterface;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
|
||||
use function count;
|
||||
use function is_string;
|
||||
|
||||
/**
|
||||
* @implements ProviderInterface<null|BovinInventory>
|
||||
*/
|
||||
final class BovinInventoryProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private BovinApiInterface $bovinApi,
|
||||
private RequestStack $requestStack,
|
||||
private AnimalSummaryMapper $animalSummaryMapper,
|
||||
) {}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): ?BovinInventory
|
||||
{
|
||||
$startDateRaw = (string) ($uriVariables['startDate'] ?? '');
|
||||
if ('' === $startDateRaw) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$startDate = new DateTimeImmutable($startDateRaw);
|
||||
} catch (Exception) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$request = $this->requestStack->getCurrentRequest();
|
||||
|
||||
$endDate = null;
|
||||
$endDateRaw = $request?->query->get('endDate');
|
||||
if (is_string($endDateRaw) && '' !== $endDateRaw) {
|
||||
try {
|
||||
$endDate = new DateTimeImmutable($endDateRaw);
|
||||
} catch (Exception) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
$includeEarTagStock = (bool) $request?->query->getBoolean('includeEarTagStock', false);
|
||||
|
||||
$inventoryDto = $this->bovinApi->getInventory(
|
||||
startDate: $startDate,
|
||||
endDate: $endDate,
|
||||
includeEarTagStock: $includeEarTagStock,
|
||||
);
|
||||
|
||||
$resource = new BovinInventory();
|
||||
$resource->startDate = $inventoryDto->startDate?->format('Y-m-d') ?? $startDate->format('Y-m-d');
|
||||
$resource->endDate = $inventoryDto->endDate?->format('Y-m-d');
|
||||
$resource->includesEarTagStock = $inventoryDto->includesEarTagStock;
|
||||
$resource->nbBovins = $inventoryDto->nbBovins;
|
||||
$resource->earTagSeriesCount = count($inventoryDto->earTagSeries);
|
||||
|
||||
foreach ($inventoryDto->animals as $animalDto) {
|
||||
$resource->animals[] = $this->animalSummaryMapper->map($animalDto);
|
||||
}
|
||||
|
||||
return $resource;
|
||||
}
|
||||
}
|
||||
40
src/State/Bovin/BovinPresumedExitsProvider.php
Normal file
40
src/State/Bovin/BovinPresumedExitsProvider.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State\Bovin;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
use App\ApiResource\BovinPresumedExit;
|
||||
use App\ApiResource\BovinPresumedExits;
|
||||
use Malio\EdnotifBundle\Bovin\Api\BovinApiInterface;
|
||||
|
||||
/**
|
||||
* @implements ProviderInterface<BovinPresumedExits>
|
||||
*/
|
||||
final class BovinPresumedExitsProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private BovinApiInterface $bovinApi,
|
||||
) {}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): BovinPresumedExits
|
||||
{
|
||||
$dto = $this->bovinApi->getPresumedExits();
|
||||
|
||||
$resource = new BovinPresumedExits();
|
||||
$resource->nbBovins = $dto->nbBovins;
|
||||
|
||||
foreach ($dto->presumedExits as $exitDto) {
|
||||
$exit = new BovinPresumedExit();
|
||||
$exit->countryCode = $exitDto->bovin?->countryCode;
|
||||
$exit->nationalNumber = $exitDto->bovin?->nationalNumber;
|
||||
$exit->exitDate = $exitDto->exitDate?->format('Y-m-d');
|
||||
|
||||
$resource->presumedExits[] = $exit;
|
||||
}
|
||||
|
||||
return $resource;
|
||||
}
|
||||
}
|
||||
50
src/State/Bovin/BovinReturnedDossiersProvider.php
Normal file
50
src/State/Bovin/BovinReturnedDossiersProvider.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State\Bovin;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
use App\ApiResource\BovinReturnedDossiers;
|
||||
use App\Service\AnimalSummaryMapper;
|
||||
use DateTimeImmutable;
|
||||
use Exception;
|
||||
use Malio\EdnotifBundle\Bovin\Api\BovinApiInterface;
|
||||
|
||||
/**
|
||||
* @implements ProviderInterface<null|BovinReturnedDossiers>
|
||||
*/
|
||||
final class BovinReturnedDossiersProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private BovinApiInterface $bovinApi,
|
||||
private AnimalSummaryMapper $animalSummaryMapper,
|
||||
) {}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): ?BovinReturnedDossiers
|
||||
{
|
||||
$startDateRaw = (string) ($uriVariables['startDate'] ?? '');
|
||||
if ('' === $startDateRaw) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$startDate = new DateTimeImmutable($startDateRaw);
|
||||
} catch (Exception) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$dto = $this->bovinApi->getReturnedDossiers($startDate);
|
||||
|
||||
$resource = new BovinReturnedDossiers();
|
||||
$resource->startDate = $dto->startDate?->format('Y-m-d') ?? $startDate->format('Y-m-d');
|
||||
$resource->nbBovins = $dto->nbBovins;
|
||||
|
||||
foreach ($dto->animals as $animalDto) {
|
||||
$resource->animals[] = $this->animalSummaryMapper->map($animalDto);
|
||||
}
|
||||
|
||||
return $resource;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\Bovin;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProcessorInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\Building;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\Reception;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\Reception;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\Shipment;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\Shipment;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\System;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\User;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\User;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProviderInterface;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\State;
|
||||
namespace App\State\User;
|
||||
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProcessorInterface;
|
||||
@@ -284,7 +284,9 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="{{ monthHeaders|length }}" class="sub-title">POIDS PAR MOIS</th>
|
||||
<th class="days">Foin</th>
|
||||
<th class="days">Foin</th>
|
||||
<th colspan="{{ monthHeaders|length -2 }}" class="sub-title">POIDS PAR MOIS</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Tests\State;
|
||||
namespace App\Tests\State\Reception;
|
||||
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use App\Dto\PontBasculeReading;
|
||||
use App\Service\PontBasculePayloadDecoder;
|
||||
use App\Service\PontBasculeService;
|
||||
use App\State\ReceptionWeighingProvider;
|
||||
use App\State\Reception\ReceptionWeighingProvider;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||
Reference in New Issue
Block a user