Commit 8fc45fe3 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

1.0.0

parents 9582ec33 70effaba
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -10,8 +10,9 @@
  ],
  "require": {
    "php": ">=5.6",
    "doctrine/doctrine-orm-module": "~0.10",
    "beberlei/assert": "^2.7"
    "doctrine/doctrine-orm-module": ">=0.7",
    "beberlei/assert": "^2.7",
    "ramsey/uuid": "^3.6"
  },
  "require-dev": {
    "phpunit/phpunit": "~5.4",
+132 −2
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
        "This file is @generated automatically"
    ],
    "hash": "5dbf21d8dab5f6d0c1595a5e0e33a98c",
    "content-hash": "fc3ed67708ab760dfcc421f73664fb60",
    "hash": "4799b3519b0d742b2bafbb23b86b81e2",
    "content-hash": "d147ddf80b44c108ce9103c3b9dca523",
    "packages": [
        {
            "name": "beberlei/assert",
@@ -818,6 +818,54 @@
            ],
            "time": "2016-12-18 15:42:34"
        },
        {
            "name": "paragonie/random_compat",
            "version": "v2.0.10",
            "source": {
                "type": "git",
                "url": "https://github.com/paragonie/random_compat.git",
                "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d",
                "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d",
                "shasum": ""
            },
            "require": {
                "php": ">=5.2.0"
            },
            "require-dev": {
                "phpunit/phpunit": "4.*|5.*"
            },
            "suggest": {
                "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
            },
            "type": "library",
            "autoload": {
                "files": [
                    "lib/random.php"
                ]
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Paragon Initiative Enterprises",
                    "email": "security@paragonie.com",
                    "homepage": "https://paragonie.com"
                }
            ],
            "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
            "keywords": [
                "csprng",
                "pseudorandom",
                "random"
            ],
            "time": "2017-03-13 16:27:32"
        },
        {
            "name": "psr/log",
            "version": "1.0.2",
@@ -865,6 +913,88 @@
            ],
            "time": "2016-10-10 12:19:37"
        },
        {
            "name": "ramsey/uuid",
            "version": "3.6.1",
            "source": {
                "type": "git",
                "url": "https://github.com/ramsey/uuid.git",
                "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/ramsey/uuid/zipball/4ae32dd9ab8860a4bbd750ad269cba7f06f7934e",
                "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e",
                "shasum": ""
            },
            "require": {
                "paragonie/random_compat": "^1.0|^2.0",
                "php": "^5.4 || ^7.0"
            },
            "replace": {
                "rhumsaa/uuid": "self.version"
            },
            "require-dev": {
                "apigen/apigen": "^4.1",
                "codeception/aspect-mock": "^1.0 | ^2.0",
                "doctrine/annotations": "~1.2.0",
                "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1",
                "ircmaxell/random-lib": "^1.1",
                "jakub-onderka/php-parallel-lint": "^0.9.0",
                "mockery/mockery": "^0.9.4",
                "moontoast/math": "^1.1",
                "php-mock/php-mock-phpunit": "^0.3|^1.1",
                "phpunit/phpunit": "^4.7|>=5.0 <5.4",
                "satooshi/php-coveralls": "^0.6.1",
                "squizlabs/php_codesniffer": "^2.3"
            },
            "suggest": {
                "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator",
                "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator",
                "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
                "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).",
                "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid",
                "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "3.x-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "Ramsey\\Uuid\\": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Marijn Huizendveld",
                    "email": "marijn.huizendveld@gmail.com"
                },
                {
                    "name": "Thibaud Fabre",
                    "email": "thibaud@aztech.io"
                },
                {
                    "name": "Ben Ramsey",
                    "email": "ben@benramsey.com",
                    "homepage": "https://benramsey.com"
                }
            ],
            "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).",
            "homepage": "https://github.com/ramsey/uuid",
            "keywords": [
                "guid",
                "identifier",
                "uuid"
            ],
            "time": "2017-03-26 20:37:53"
        },
        {
            "name": "symfony/console",
            "version": "v3.3.5",
+0 −5
Original line number Diff line number Diff line
@@ -2,13 +2,10 @@

namespace UnicaenDbImport;

use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
use UnicaenDbImport\Config\ImportConfig;
use UnicaenDbImport\Config\ImportConfigFactory;
use UnicaenDbImport\Controller\ConsoleControllerFactory;
use UnicaenDbImport\Importer\MySQL\MySQLImporter;
use UnicaenDbImport\Importer\MySQL\MySQLImporterFactory;
use UnicaenDbImport\Importer\PostgreSQL\PostgreSQLImporter;
use UnicaenDbImport\Importer\PostgreSQL\PostgreSQLImporterFactory;
use UnicaenDbImport\Service\ImportService;
@@ -19,7 +16,6 @@ return [
        'importers' => [
            // database platform class => importer class
            PostgreSqlPlatform::class => PostgreSQLImporter::class,
            MySqlPlatform::class      => MySQLImporter::class,
        ],
        'imports' => [],
    ],
@@ -52,7 +48,6 @@ return [
            ImportConfig::class => ImportConfigFactory::class,
            ImportService::class => ImportServiceFactory::class,

            MySQLImporter::class => MySQLImporterFactory::class,
            PostgreSQLImporter::class => PostgreSQLImporterFactory::class,
        ],
    ],
+21 −8
Original line number Diff line number Diff line
<?php

namespace UnicaenDbImport;
namespace Application;

return [
    /**
     * Configuration globale du module UnicaenDbImport.
     */
    'import' => [
        /**
         * Liste des imports.
         */
        'imports' => [
            [
                /**
                 * Petit nom (unique) de l'import.
                 */
                'name' => 'Import des programmes de financement SIFAC',
                'name' => 'Exemple: Import des programmes de financement SIFAC',

                /**
                 * Configuration de la source de données à importer :
@@ -17,12 +23,12 @@ return [
                 * - 'table'              : nom de la table source contenant les données à importer
                 * - 'select'             : select SQL de mise en forme des données source à importer (NB: antinomique avec 'table')
                 * - 'connection'         : identifiant de la connexion Doctrine à la base de données source
                 * - 'source_code_column' : nom de la colonne dans la table/vue source contenant les identifiants uniques
                 * - 'source_code_column' : nom de la colonne dans la table/vue source contenant l'identifiant unique
                 * - 'columns'            : liste ordonnée des noms des colonnes à prendre en compte dans la table/vue source
                 */
                'source' => [
                    'name'               => 'PFI SIFAC',
                    'table'              => 'TABLE',
                    'select'              => 'SELECT... FROM...',
                    'connection'         => 'doctrine.connection.orm_sifac',
                    'source_code_column' => 'CODE',
                    'columns'            => ['LIBELLE', 'FLECHE', 'DEBUT_VALIDITE', 'FIN_VALIDITE'],
@@ -30,9 +36,10 @@ return [

                /**
                 * Forçage éventuel du nom de la table intermédiaire utilisée lorsque source et destination
                 * ne partagent pas la même connexion.
                 * NB: cette table intermédiaire est remplacée/peuplée dans la base de données destination
                 * à chaque import.
                 * ne partagent pas la même connexion. NB: cette table intermédiaire est créée/peuplée/supprimée
                 * dans la base de données destination à chaque import.
                 * En l'absence de ce forçage, le nom de la table intermédiaire sera celui de la table destination
                 * préfixé par "src_".
                 */
                'intermediate_table' => 'src_progfin',

@@ -41,8 +48,9 @@ return [
                 * - 'name'               : petit nom (unique) de la destination
                 * - 'table'              : nom de la table destination vers laquelle les données sont importées
                 * - 'connection'         : identifiant de la connexion Doctrine à la base de données destination
                 * - 'source_code_column' : nom de la colonne dans la table destination contenant les identifiants uniques
                 * - 'source_code_column' : nom de la colonne dans la table destination contenant l'identifiant unique
                 * - 'columns'            : liste ordonnée des noms des colonnes importées dans la table destination
                 * - 'columns_to_char'    : format sprintf nécessaire pour mettre des colonnes au format requis (string)
                 */
                'destination' => [
                    'name'               => 'PFI Zébu',
@@ -50,8 +58,13 @@ return [
                    'connection'         => 'doctrine.connection.orm_default',
                    'source_code_column' => 'code',
                    'columns'            => ['libelle', 'fleche', 'debut_validite', 'fin_validite'],
                    'columns_to_char' => [
                        'debut_validite' => "TO_CHAR(%s,'YYYY-MM-DD')", // car colonne destination de type TIMESTAMP
                        'fin_validite'   => "TO_CHAR(%s,'YYYY-MM-DD')", // idem
                    ],
                ],
            ],
        ],
    ],

];
+38 −0
Original line number Diff line number Diff line
<?php

namespace Application;

return [
    /**
     * Configuration Doctrine minimum requise.

     * NB: vous voudrez sans doute placer cette configuration autre part dans votre projet.
     */
    'doctrine' => [
        'connection' => [
            'orm_default' => [
                'driverClass' => 'Doctrine\\DBAL\\Driver\\PDOPgSql\\Driver',
                'params' => [
                    'host'     => 'host.domain.fr',
                    'port'     => '5432',
                    'charset'  => 'utf8',
                    'user'     => '???',
                    'dbname'   => '???',
                    'password' => '???',
                ],
            ],
            'orm_sifac' => [
                'driverClass' => 'Doctrine\\DBAL\\Driver\\OCI8\\Driver',
                'params'      => [
                    'host'     => 'host.domain.fr',
                    'port'     => '1527',
                    'user'     => '???',
                    'password' => '???',
                    'dbname'   => '???',
                    'charset'  => 'AL32UTF8',
                ]
            ],
        ],
    ],

];
Loading