Commit abec3605 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

COrrection contrat api

parent 77bbfd0c
Loading
Loading
Loading
Loading
+42 −46
Original line number Diff line number Diff line
@@ -124,16 +124,16 @@
        },
        {
            "name": "aws/aws-sdk-php",
            "version": "3.272.0",
            "version": "3.273.2",
            "source": {
                "type": "git",
                "url": "https://github.com/aws/aws-sdk-php.git",
                "reference": "2448f5c4ffd0125fa86df6aa12d0a41aa2de68da"
                "reference": "10631467bdf9869a45197a25b490948af2ef7acd"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2448f5c4ffd0125fa86df6aa12d0a41aa2de68da",
                "reference": "2448f5c4ffd0125fa86df6aa12d0a41aa2de68da",
                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/10631467bdf9869a45197a25b490948af2ef7acd",
                "reference": "10631467bdf9869a45197a25b490948af2ef7acd",
                "shasum": ""
            },
            "require": {
@@ -213,9 +213,9 @@
            "support": {
                "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
                "issues": "https://github.com/aws/aws-sdk-php/issues",
                "source": "https://github.com/aws/aws-sdk-php/tree/3.272.0"
                "source": "https://github.com/aws/aws-sdk-php/tree/3.273.2"
            },
            "time": "2023-06-08T18:21:03+00:00"
            "time": "2023-06-16T18:53:48+00:00"
        },
        {
            "name": "beberlei/assert",
@@ -335,16 +335,16 @@
        },
        {
            "name": "bshaffer/oauth2-server-php",
            "version": "v1.13.0",
            "version": "v1.14.0",
            "source": {
                "type": "git",
                "url": "https://github.com/bshaffer/oauth2-server-php.git",
                "reference": "cd11527b29ceb340f24015b6df868c22908bcf12"
                "reference": "894f6720c7605bc83ee7ac5634d74ea185f3099d"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/cd11527b29ceb340f24015b6df868c22908bcf12",
                "reference": "cd11527b29ceb340f24015b6df868c22908bcf12",
                "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/894f6720c7605bc83ee7ac5634d74ea185f3099d",
                "reference": "894f6720c7605bc83ee7ac5634d74ea185f3099d",
                "shasum": ""
            },
            "require": {
@@ -392,9 +392,9 @@
            ],
            "support": {
                "issues": "https://github.com/bshaffer/oauth2-server-php/issues",
                "source": "https://github.com/bshaffer/oauth2-server-php/tree/v1.13.0"
                "source": "https://github.com/bshaffer/oauth2-server-php/tree/v1.14.0"
            },
            "time": "2022-10-12T17:33:08+00:00"
            "time": "2023-06-12T18:36:55+00:00"
        },
        {
            "name": "cboden/ratchet",
@@ -1447,28 +1447,28 @@
        },
        {
            "name": "doctrine/inflector",
            "version": "2.0.6",
            "version": "2.0.8",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/inflector.git",
                "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024"
                "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024",
                "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024",
                "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
                "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
                "shasum": ""
            },
            "require": {
                "php": "^7.2 || ^8.0"
            },
            "require-dev": {
                "doctrine/coding-standard": "^10",
                "doctrine/coding-standard": "^11.0",
                "phpstan/phpstan": "^1.8",
                "phpstan/phpstan-phpunit": "^1.1",
                "phpstan/phpstan-strict-rules": "^1.3",
                "phpunit/phpunit": "^8.5 || ^9.5",
                "vimeo/psalm": "^4.25"
                "vimeo/psalm": "^4.25 || ^5.4"
            },
            "type": "library",
            "autoload": {
@@ -1518,7 +1518,7 @@
            ],
            "support": {
                "issues": "https://github.com/doctrine/inflector/issues",
                "source": "https://github.com/doctrine/inflector/tree/2.0.6"
                "source": "https://github.com/doctrine/inflector/tree/2.0.8"
            },
            "funding": [
                {
@@ -1534,7 +1534,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-10-20T09:10:12+00:00"
            "time": "2023-06-16T13:40:37+00:00"
        },
        {
            "name": "doctrine/instantiator",
@@ -1932,16 +1932,16 @@
        },
        {
            "name": "fakerphp/faker",
            "version": "v1.22.0",
            "version": "v1.23.0",
            "source": {
                "type": "git",
                "url": "https://github.com/FakerPHP/Faker.git",
                "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2"
                "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/f85772abd508bd04e20bb4b1bbe260a68d0066d2",
                "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2",
                "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01",
                "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01",
                "shasum": ""
            },
            "require": {
@@ -1994,9 +1994,9 @@
            ],
            "support": {
                "issues": "https://github.com/FakerPHP/Faker/issues",
                "source": "https://github.com/FakerPHP/Faker/tree/v1.22.0"
                "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0"
            },
            "time": "2023-05-14T12:31:37+00:00"
            "time": "2023-06-12T08:44:38+00:00"
        },
        {
            "name": "guzzlehttp/guzzle",
@@ -9388,16 +9388,16 @@
        },
        {
            "name": "react/stream",
            "version": "v1.2.0",
            "version": "v1.3.0",
            "source": {
                "type": "git",
                "url": "https://github.com/reactphp/stream.git",
                "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9"
                "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9",
                "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9",
                "url": "https://api.github.com/repos/reactphp/stream/zipball/6fbc9672905c7d5a885f2da2fc696f65840f4a66",
                "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66",
                "shasum": ""
            },
            "require": {
@@ -9407,12 +9407,12 @@
            },
            "require-dev": {
                "clue/stream-filter": "~1.2",
                "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
                "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
            },
            "type": "library",
            "autoload": {
                "psr-4": {
                    "React\\Stream\\": "src"
                    "React\\Stream\\": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
@@ -9454,19 +9454,15 @@
            ],
            "support": {
                "issues": "https://github.com/reactphp/stream/issues",
                "source": "https://github.com/reactphp/stream/tree/v1.2.0"
                "source": "https://github.com/reactphp/stream/tree/v1.3.0"
            },
            "funding": [
                {
                    "url": "https://github.com/WyriHaximus",
                    "type": "github"
                },
                {
                    "url": "https://github.com/clue",
                    "type": "github"
                    "url": "https://opencollective.com/reactphp",
                    "type": "open_collective"
                }
            ],
            "time": "2021-07-11T12:37:55+00:00"
            "time": "2023-06-16T10:52:11+00:00"
        },
        {
            "name": "respect/stringifier",
@@ -11189,11 +11185,11 @@
        },
        {
            "name": "unicaen/auth-token",
            "version": "6.0.0",
            "version": "6.0.1",
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/auth-token.git",
                "reference": "b7fb21e2b1d0f461e71536c25502951bf725e9b0"
                "reference": "86348a3a37907fe013fd7a0bc36850ceb80d9deb"
            },
            "require": {
                "laminas/laminas-dependency-plugin": "^2.1",
@@ -11213,7 +11209,7 @@
                ]
            },
            "description": "Authentification à l'aide d'un token",
            "time": "2023-02-28T13:40:12+00:00"
            "time": "2023-02-28T13:41:02+00:00"
        },
        {
            "name": "unicaen/bjy-authorize",
@@ -11363,7 +11359,7 @@
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/db-import.git",
                "reference": "feca088fc7fccb2d9649ff35abcb509586a79da6"
                "reference": "3d88fec764c1df68eb084a14ab1e46cdb2cbd700"
            },
            "require": {
                "beberlei/assert": "^3.3",
@@ -11396,7 +11392,7 @@
                }
            },
            "description": "Module d'import entre bases de données",
            "time": "2023-06-09T09:50:43+00:00"
            "time": "2023-06-19T12:53:32+00:00"
        },
        {
            "name": "unicaen/faq",
@@ -11677,7 +11673,7 @@
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/open-source/sygal-api.git",
                "reference": "41619981cfdc3e31ea8271e8d9cf63db8704c2b3"
                "reference": "f5db09a318f093b5667e743bca932507280f77e8"
            },
            "require": {
                "guzzlehttp/guzzle": "^7.0",
+22 −16
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ FROM tmp_doctorant tmp
         JOIN individu i ON i.source_code::text = tmp.individu_id::text;


--drop view src_inscription_administrative cascade;
--drop table if exists tmp_inscription_administrative;
create table tmp_inscription_administrative
(
@@ -39,22 +40,21 @@ create table tmp_inscription_administrative
    source_code varchar(128) not null, -- Id Pegase inscription (merge request en cours)

    doctorant_id varchar(64) not null,
    ecole_doct_id varchar(32),
    ecole_doct_id varchar(32) not null,

    no_candidat varchar(32),
    date_inscription date,
    date_inscription date not null,
    date_annulation date,
    cesure varchar(32),
    chemin varchar(128),
    --code_structure_etablissement_du_chemin varchar(32),
    principale bool not null,
    statut_inscription varchar(32) not null,
    chemin varchar(128) not null,
    code_structure_etablissement_du_chemin varchar(64) not null,
    formation varchar(64),
    cesure varchar(32),
    mobilite varchar(32),
    origine varchar(32),
    --periode varchar(32), => cf. table dédiée
    principale bool,
    --regime_inscription_code varchar(32), -- utile ?
    regime_inscription_libelle varchar(64),
    statut_inscription varchar(32),
    no_candidat varchar(32),

    periode_code varchar(32) not null,
    periode_libelle varchar(32) not null,
@@ -86,24 +86,30 @@ create table inscription_administrative
    id bigserial constraint inscription_administrative_pkey primary key,
    source_id bigint not null constraint inscription_administrative_source_fk references source,
    source_code varchar(128) not null,

    doctorant_id bigint not null constraint inscription_administrative_doctorant_fk references doctorant,
    ecole_doct_id bigint constraint inscription_administrative_ecole_doct_fk references ecole_doct,
    no_candidat varchar(32),
    date_inscription date,
    ecole_doct_id bigint not null constraint inscription_administrative_ecole_doct_fk references ecole_doct,

    date_inscription date not null,
    date_annulation date,
    cesure varchar(32),
    chemin varchar(128),
    principale boolean not null,
    statut_inscription varchar(32) not null,
    chemin varchar(128) not null,
    code_structure_etablissement_du_chemin varchar(64) not null,
    formation varchar(64),
    cesure varchar(32),
    mobilite varchar(32),
    origine varchar(32),
    principale boolean,
    --regime_inscription_code varchar(32), -- utile ?
    regime_inscription_libelle varchar(64),
    statut_inscription varchar(32),
    no_candidat varchar(32),

    periode_code varchar(32) not null,
    periode_libelle varchar(32) not null,
    periode_date_debut date not null,
    periode_date_fin date,
    periode_annee_universitaire smallint,

    histo_creation timestamp(0) default ('now'::text)::timestamp(0) without time zone not null,
    histo_createur_id bigint not null,
    histo_modification timestamp(0) without time zone,
+2 −2
Original line number Diff line number Diff line
@@ -56,9 +56,9 @@
  "inscription": {
    "ecoleDoctorale": "{{ inscription_ecoleDoctorale }}",
    "noCandidat": "1234",
    "origine": "ecandidat",
    "origine": "ECANDIDAT",
    "formation": "ut Excepteur",
    "statutInscription": "valide",
    "statutInscription": "VALIDE",
    "regimeInscription": {
      "code": "1234",
      "libelle": "sdfsfjmsdqfjmjklh"
+21 −21
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ return [
        'synchros' => [
            [
                'name' => 'inscription-administrative',
                'order' => -10,
                'order' => 150,
                'source' => [
                    'name' => 'sygal',
                    'code' => 'app',
@@ -73,26 +73,26 @@ return [
             *          join source src on src.id = tmp.source_id
             *       ;
             */
            [
                'name' => 'doctorant_source_code',
                'order' => 0,
                'source' => [
                    'name' => 'application',
                    'code' => 'app',
                    'table' => 'src_doctorant_source_code',
                    'connection' => 'default',
                    'source_code_column' => 'id',
                ],
                'destination' => [
                    'name' => 'application',
                    'table' => 'doctorant',
                    'connection' => 'default',
                    'source_code_column' => 'id',
                ],
                'operations' => [
                    Operation::OPERATION_UPDATE, // seule opération
                ],
            ],
//            [
//                'name' => 'doctorant_source_code',
//                'order' => 0,
//                'source' => [
//                    'name' => 'application',
//                    'code' => 'app',
//                    'table' => 'src_doctorant_source_code',
//                    'connection' => 'default',
//                    'source_code_column' => 'id',
//                ],
//                'destination' => [
//                    'name' => 'application',
//                    'table' => 'doctorant',
//                    'connection' => 'default',
//                    'source_code_column' => 'id',
//                ],
//                'operations' => [
//                    Operation::OPERATION_UPDATE, // seule opération
//                ],
//            ],
        ],
    ],
    'service_manager' => [
+2 −1
Original line number Diff line number Diff line
@@ -67,7 +67,8 @@ abstract class AbstractImportFacade
    protected function beginTransaction(): void
    {
        try {
            $this->destinationConnection->setNestTransactionsWithSavepoints(true); // transactions imbriquées
            // Cf. https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/transactions.html
            $this->destinationConnection->setNestTransactionsWithSavepoints(true);
            $this->destinationConnection->beginTransaction();
        } catch (\Doctrine\DBAL\Exception $e) {
            throw new RuntimeException("Echec de l'ouverture d'une transaction en bdd", null, $e);
Loading