diff --git a/composer.json b/composer.json index a0bc885e..dee32d01 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,9 @@ "phpmailer/phpmailer": "^6.8.0", "webit/eval-math": "1.0.1", "ovh/ovh": "v2.0.1", - "box/spout": "2.7.3", - "setasign/fpdi-fpdf": "v2.3.0", + "openspout/openspout": "^4.24.5", + "setasign/fpdf": "^1.8.6", + "setasign/fpdi": "^2.6", "spomky-labs/otphp": "^10.0", "picqer/php-barcode-generator": "v2.2.4", "php": ">=8.1.0", diff --git a/controlers/configuration/configCredits.php b/controlers/configuration/configCredits.php index 9e0fd0ca..e55ec5c0 100644 --- a/controlers/configuration/configCredits.php +++ b/controlers/configuration/configCredits.php @@ -25,6 +25,7 @@ * * @author Bertrand Boutillier * @contrib fr33z00 + * @contrib Michaël Val */ $template = 'configCredits'; @@ -117,9 +118,9 @@ 'description' => 'This is a stupid jQuery table sorting plugin', 'url' => 'https://github.com/joequery/Stupid-Table-Plugin' ); -$p['page']['thanks']['Spout'] = array( - 'description' => 'Spout is a PHP library to read and write spreadsheet files', - 'url' => 'https://github.com/box/spout' +$p['page']['thanks']['OpenSpout'] = array( + 'description' => 'OpenSpout is a PHP library to read and write spreadsheet files', + 'url' => 'https://github.com/openspout/openspout' ); $p['page']['thanks']['EvalMath'] = array( 'description' => 'Safely evaluate math expressions', diff --git a/controlers/outils/actions/inc-action-exportDataDownload.php b/controlers/outils/actions/inc-action-exportDataDownload.php index 750667fa..28e04494 100644 --- a/controlers/outils/actions/inc-action-exportDataDownload.php +++ b/controlers/outils/actions/inc-action-exportDataDownload.php @@ -24,10 +24,10 @@ * Outils : export data -> retourner le csv * * @author Bertrand Boutillier + * contrib Michaël Val */ -use Box\Spout\Writer\WriterFactory; -use Box\Spout\Common\Type; +use OpenSpout\Writer\Common\Creator\WriterEntityFactory; // namespace is no longer "OpenSpout\Writer" //admin uniquement if ($p['config']['droitExportPeutExporterPropresData'] != 'true') { @@ -121,10 +121,10 @@ $corres = $formExport->getTabCorrespondances(); if ($_POST['option_file_format'] == 'xlsx') { - $writer = WriterFactory::create(Type::XLSX); + $writer = WriterEntityFactory::createXLSXWriter(); // replaces WriterFactory::create(Type::XLSX) $writer->openToBrowser('export.xlsx'); } else { - $writer = WriterFactory::create(Type::ODS); + $writer = WriterEntityFactory::createODSWriter(); // replaces WriterFactory::create(Type::ODS) $writer->openToBrowser('export.ods'); } $datasheet = $writer->getCurrentSheet(); diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 938caf84..6ab94efa 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -41,7 +41,7 @@ RUN set -ex; \ --with-freetype \ --with-jpeg \ ; \ - docker-php-ext-install \ + docker-php-ext-install -j$(nproc) \ bcmath \ gd \ imap \ @@ -83,7 +83,7 @@ RUN set -ex; \ COPY config/30-custom-php.ini "$PHP_INI_DIR/conf.d" COPY --from=docker.io/composer:2.5 /usr/bin/composer /usr/local/bin/composer COPY config/vhost-docker /etc/apache2/sites-available/000-default.conf -ENV VRELEASE=v8.1.3 +ENV VRELEASE=master RUN curl -fsSL -o /tmp/msehr.tar.gz https://github.com/MedShake/MedShakeEHR-base/archive/"$VRELEASE".tar.gz && \ mkdir /usr/src/medshakeehr && \ tar -xf /tmp/msehr.tar.gz -C /usr/src/medshakeehr --strip-components=1 && \ diff --git a/tools/docker/docker_bake.hcl b/tools/docker/docker_bake.hcl new file mode 100644 index 00000000..71797d00 --- /dev/null +++ b/tools/docker/docker_bake.hcl @@ -0,0 +1,30 @@ +group "default" { + targets = ["production", "development"] +} + +target "production" { + context = "./" + dockerfile = "Dockerfile" + platforms = ["linux/amd64", "linux/arm64"] + args = { + PHPSTAGE = "production" + VRELEASE = "master" + } + tags = [ + "marsante/msehr:master", + "marsante/msehr:latest" + ] +} + +target "development" { + context = "./" + dockerfile = "Dockerfile" + platforms = ["linux/amd64", "linux/arm64"] + args = { + PHPSTAGE = "development" + VRELEASE = "master" + } + tags = [ + "marsante/msehr:dev" + ] +} \ No newline at end of file diff --git a/upgrade/base/sqlInstall.sql b/upgrade/base/sqlInstall.sql index 7dd77e04..f58b305b 100644 --- a/upgrade/base/sqlInstall.sql +++ b/upgrade/base/sqlInstall.sql @@ -1270,7 +1270,7 @@ INSERT IGNORE INTO `prescriptions` (`cat`, `label`, `description`, `fromID`, `to -- system INSERT IGNORE INTO `system` (`name`, `groupe`, `value`) VALUES -('base', 'module', 'v8.1.2'), +('base', 'module', 'v8.1.3'), ('state', 'system', 'normal'); -- univtags_type diff --git a/upgrade/base/sqlUpgrade_v8.1.2_v8.1.3.sql b/upgrade/base/sqlUpgrade_v8.1.2_v8.1.3.sql new file mode 100644 index 00000000..3ed96bab --- /dev/null +++ b/upgrade/base/sqlUpgrade_v8.1.2_v8.1.3.sql @@ -0,0 +1,2 @@ +-- Mise à jour n° de version +UPDATE `system` SET `value`='v8.1.3' WHERE `name`='base' and `groupe`='module'; \ No newline at end of file diff --git a/upgrade/base/sqlUpgrade_v8.1.2_v8.1.3_post.php b/upgrade/base/sqlUpgrade_v8.1.2_v8.1.3_post.php new file mode 100644 index 00000000..1e60ee04 --- /dev/null +++ b/upgrade/base/sqlUpgrade_v8.1.2_v8.1.3_post.php @@ -0,0 +1,12 @@ +&1', $output); +chdir($p['homepath']); +exec('COMPOSER_HOME="/tmp/" '.$pathToComposer.' update 2>&1', $output); +chdir($initialDir); diff --git a/versionMedShakeEHR-base.txt b/versionMedShakeEHR-base.txt index 46514f42..52a0df08 100644 --- a/versionMedShakeEHR-base.txt +++ b/versionMedShakeEHR-base.txt @@ -1 +1 @@ -v8.1.2 +v8.1.3