diff --git a/src/UnicaenSynchro/Controller/SynchronisationConsoleController.php b/UnicaenSynchro/Controller/SynchronisationConsoleController.php similarity index 92% rename from src/UnicaenSynchro/Controller/SynchronisationConsoleController.php rename to UnicaenSynchro/Controller/SynchronisationConsoleController.php index 584bbc985157c3b01e1716fc3f0a0bd22f2db092..ea4d1c009d81b92f69377c3720ec347bfd542718 100644 --- a/src/UnicaenSynchro/Controller/SynchronisationConsoleController.php +++ b/UnicaenSynchro/Controller/SynchronisationConsoleController.php @@ -17,6 +17,7 @@ class SynchronisationConsoleController extends AbstractConsoleController { public function synchroniserAllAction() : string { + // todo utiliser l'ordre pour executer les synchros dans le bon sens $jobs = $this->configs; // usort($works, function ($a,$b) { return $a['order'] > $b['order'];}); foreach ($jobs as $name => $job) { diff --git a/src/UnicaenSynchro/Controller/SynchronisationConsoleControllerFactory.php b/UnicaenSynchro/Controller/SynchronisationConsoleControllerFactory.php similarity index 100% rename from src/UnicaenSynchro/Controller/SynchronisationConsoleControllerFactory.php rename to UnicaenSynchro/Controller/SynchronisationConsoleControllerFactory.php diff --git a/src/UnicaenSynchro/Entity/Db/IsSynchronisableInterface.php b/UnicaenSynchro/Entity/Db/IsSynchronisableInterface.php similarity index 100% rename from src/UnicaenSynchro/Entity/Db/IsSynchronisableInterface.php rename to UnicaenSynchro/Entity/Db/IsSynchronisableInterface.php diff --git a/src/UnicaenSynchro/Entity/Db/IsSynchronisableTrait.php b/UnicaenSynchro/Entity/Db/IsSynchronisableTrait.php similarity index 100% rename from src/UnicaenSynchro/Entity/Db/IsSynchronisableTrait.php rename to UnicaenSynchro/Entity/Db/IsSynchronisableTrait.php diff --git a/src/UnicaenSynchro/Entity/Db/Mapping/placeholder.txt b/UnicaenSynchro/Entity/Db/Mapping/placeholder.txt similarity index 100% rename from src/UnicaenSynchro/Entity/Db/Mapping/placeholder.txt rename to UnicaenSynchro/Entity/Db/Mapping/placeholder.txt diff --git a/Module.php b/UnicaenSynchro/Module.php similarity index 77% rename from Module.php rename to UnicaenSynchro/Module.php index 81fb57b30d0d2189d558f348bd03a4dc4fe387c1..b062ac512b2beed9ee60f761faa7495855d86377 100644 --- a/Module.php +++ b/UnicaenSynchro/Module.php @@ -2,6 +2,7 @@ namespace UnicaenSynchro; +use Laminas\Config\Config; use Laminas\Mvc\ModuleRouteListener; use Laminas\Mvc\MvcEvent; use Laminas\Config\Factory as ConfigFactory; @@ -10,14 +11,16 @@ use Laminas\Stdlib\Glob; class Module { - public function onBootstrap(MvcEvent $e) + /** @noinspection PhpUnused */ + public function onBootstrap(MvcEvent $e): void { $eventManager = $e->getApplication()->getEventManager(); $moduleRouteListener = new ModuleRouteListener(); $moduleRouteListener->attach($eventManager); } - public function getConfig() + /** @noinspection PhpUnused */ + public function getConfig(): array|Config { $configInit = [ __DIR__ . '/config/module.config.php' @@ -30,7 +33,8 @@ class Module return ConfigFactory::fromFiles($configFiles); } - public function getAutoloaderConfig() + /** @noinspection PhpUnused */ + public function getAutoloaderConfig(): array { return array( 'Laminas\Loader\StandardAutoloader' => array( diff --git a/src/UnicaenSynchro/Service/SqlHelper/SqlHelperService.php b/UnicaenSynchro/Service/SqlHelper/SqlHelperService.php similarity index 100% rename from src/UnicaenSynchro/Service/SqlHelper/SqlHelperService.php rename to UnicaenSynchro/Service/SqlHelper/SqlHelperService.php diff --git a/src/UnicaenSynchro/Service/SqlHelper/SqlHelperServiceAwareTrait.php b/UnicaenSynchro/Service/SqlHelper/SqlHelperServiceAwareTrait.php similarity index 100% rename from src/UnicaenSynchro/Service/SqlHelper/SqlHelperServiceAwareTrait.php rename to UnicaenSynchro/Service/SqlHelper/SqlHelperServiceAwareTrait.php diff --git a/src/UnicaenSynchro/Service/SqlHelper/SqlHelperServiceFactory.php b/UnicaenSynchro/Service/SqlHelper/SqlHelperServiceFactory.php similarity index 100% rename from src/UnicaenSynchro/Service/SqlHelper/SqlHelperServiceFactory.php rename to UnicaenSynchro/Service/SqlHelper/SqlHelperServiceFactory.php diff --git a/src/UnicaenSynchro/Service/Synchronisation/SynchronisationService.php b/UnicaenSynchro/Service/Synchronisation/SynchronisationService.php similarity index 100% rename from src/UnicaenSynchro/Service/Synchronisation/SynchronisationService.php rename to UnicaenSynchro/Service/Synchronisation/SynchronisationService.php diff --git a/src/UnicaenSynchro/Service/Synchronisation/SynchronisationServiceAwareTrait.php b/UnicaenSynchro/Service/Synchronisation/SynchronisationServiceAwareTrait.php similarity index 100% rename from src/UnicaenSynchro/Service/Synchronisation/SynchronisationServiceAwareTrait.php rename to UnicaenSynchro/Service/Synchronisation/SynchronisationServiceAwareTrait.php diff --git a/src/UnicaenSynchro/Service/Synchronisation/SynchronisationServiceFactory.php b/UnicaenSynchro/Service/Synchronisation/SynchronisationServiceFactory.php similarity index 100% rename from src/UnicaenSynchro/Service/Synchronisation/SynchronisationServiceFactory.php rename to UnicaenSynchro/Service/Synchronisation/SynchronisationServiceFactory.php diff --git a/composer.json b/composer.json index ede4911168ebfc72e1957abb6e0c5c8756d56253..f601649962c93da098247f318613d4c3967f5c94 100755 --- a/composer.json +++ b/composer.json @@ -8,13 +8,13 @@ } ], "require": { - "unicaen/privilege": "^5|^6", + "unicaen/privilege": "^6", "unicaen/console": "^6" }, "autoload": { "psr-0": [], "classmap": [ - "./Module.php" + "./UnicaenSynchro/Module.php" ] } } diff --git a/config/merged/sql-helper.config.php b/config/merged/sql-helper.config.php index 3e9f4e548df77c9c019e31978eae64082d443140..34d38d597df520946bb1d70232cd25886015cf66 100644 --- a/config/merged/sql-helper.config.php +++ b/config/merged/sql-helper.config.php @@ -6,29 +6,9 @@ use UnicaenSynchro\Service\SqlHelper\SqlHelperService; use UnicaenSynchro\Service\SqlHelper\SqlHelperServiceFactory; return [ - 'bjyauthorize' => [ - 'guards' => [ - ], - ], - - 'router' => [ - 'routes' => [ - ], - ], - 'service_manager' => [ 'factories' => [ SqlHelperService::class => SqlHelperServiceFactory::class ], ], - 'controllers' => [ - 'factories' => [], - ], - 'form_elements' => [ - 'factories' => [], - ], - 'hydrators' => [ - 'factories' => [], - ] - ]; \ No newline at end of file diff --git a/config/module.config.php b/config/module.config.php index 9a24480ed5206ad948a985668449d9f8184a7446..8dab2f559f9b9abe0a51f6da4e12dfefe83f73b2 100755 --- a/config/module.config.php +++ b/config/module.config.php @@ -4,16 +4,9 @@ namespace UnicaenSynchro; use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; -use UnicaenPrivilege\Guard\PrivilegeController; return [ - 'bjyauthorize' => [ - 'guards' => [ - PrivilegeController::class => [ - ], - ], - ], - + /** Conserver la partie doctrine pour les "futurs" log de synchro */ 'doctrine' => [ 'driver' => [ 'orm_default' => [ diff --git a/readme.md b/readme.md index 9234975b87da157a897b7b985d1da1019d1e8c1e..e55ccc70218979cb40be11b1769230b3f470131c 100644 --- a/readme.md +++ b/readme.md @@ -10,9 +10,32 @@ Le module **unicaen/synchro** est en charge Description du fonctionnement ============================ -Tables pour les données du modules +Fichier de configuration +======================== + + + +Tables pour les données du module ================================== -Dépendances extérieurs +Aucune pour le moment, car aucun log n'est enregistré ! + +Dépendances extérieures ====================== +UnicaenPrivilege +Unicaen\Console + +Versions +======== + +**6.0.3** +- Correction de l'interface/trait `IsSynchronisableInterface` et `IsSynchronisableTrait` +- Début de documentation + +Futures améliorations +===================== + +- Log de synchronisation +- Utilisation de la clef ordre pour l'execution des synchronisations `synchroniser-all` +- Changement de la clef id pour clef primaire ou quelque chose du genre