From 64625efe4f806144ac87a60a97518f15b0d52412 Mon Sep 17 00:00:00 2001 From: Ned Baldessin Date: Thu, 30 Jul 2020 15:55:26 +0200 Subject: [PATCH] Update dependency on PHP 7.4, update deployment log directives. --- app/Http/OaiPmh/Repository.php | 13 +++++-------- composer.json | 2 +- documentation/deployment_log.md | 10 ++++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/app/Http/OaiPmh/Repository.php b/app/Http/OaiPmh/Repository.php index c2cba8d..ace60a1 100644 --- a/app/Http/OaiPmh/Repository.php +++ b/app/Http/OaiPmh/Repository.php @@ -7,8 +7,8 @@ use Picturae\OaiPmh\Exception\IdDoesNotExistException; use Picturae\OaiPmh\Implementation\MetadataFormatType as ImplementationMetadataFormatType; use Picturae\OaiPmh\Implementation\Record as OaiRecord; -use Picturae\OaiPmh\Implementation\Record\Header as OaiRecordHeader; use Picturae\OaiPmh\Implementation\RecordList as OaiRecordList; +use Picturae\OaiPmh\Implementation\Record\Header as OaiRecordHeader; use Picturae\OaiPmh\Implementation\Repository\Identity as ImplementationIdentity; use Picturae\OaiPmh\Implementation\Set; use Picturae\OaiPmh\Implementation\SetList; @@ -18,19 +18,17 @@ use Picturae\OaiPmh\Interfaces\Repository as OaiRepository; use Picturae\OaiPmh\Interfaces\Repository\Identity; use Picturae\OaiPmh\Interfaces\SetList as InterfaceSetList; - use \App\Models\Product as ProductModel; class Repository implements OaiRepository { - /** * Pagination: number of records per page. * * @var integer */ - private $limit = 100; + private $limit = 25; /** * @return string the base URL of the repository @@ -116,7 +114,7 @@ public function getRecord($metadataFormat, $identifier) if (!$product) { throw new IdDoesNotExistException('No matching identifier ' . $identifier); } - + return $this->buildRecord($metadataFormat, $product); } @@ -213,8 +211,8 @@ private function buildRecordsList($metadataFormat = null, DateTime $from = null, public function fetchProducts($metadataFormat, DateTime $from = null, DateTime $until = null, $page = 0) { $query = ProductModel::where('is_published', true) - ->orderBy('legacy_updated_on', 'ASC') - ->orderBy('inventory_id', 'ASC'); + ->orderBy('legacy_updated_on', 'ASC') + ->orderBy('inventory_id', 'ASC'); if ($from) { $query->where('legacy_updated_on', '>=', $from); } @@ -227,7 +225,6 @@ public function fetchProducts($metadataFormat, DateTime $from = null, DateTime $ return $query->paginate($this->limit, ['*'], 'page', $page); } - /** * @param string $token * @return RecordList diff --git a/composer.json b/composer.json index 1dd5508..2b649a9 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "license": "MIT", "type": "project", "require": { - "php": "^7.2.5", + "php": "^7.4.8", "artesaos/seotools": "^0.18.0", "basemkhirat/elasticsearch": "dev-dev-scout-engine", "caouecs/laravel-lang": "^7.0.1", diff --git a/documentation/deployment_log.md b/documentation/deployment_log.md index df1aaab..5128045 100644 --- a/documentation/deployment_log.md +++ b/documentation/deployment_log.md @@ -5,6 +5,9 @@ Deployer les modifs sur les fichiers .env (pour datasource_username, etc) : `$ ansible-playbook --vault-password-file=vault_password -i inventory/ site.yml --limit=production --tags="dotenv"` +Deployer l'upgrade vers PHP 7.4 (nouveau stable) : +`$ ansible-playbook --vault-password-file=vault_password -i inventory/ webservers.yml --limit=production` + Rapatrier les informations de modification : ``` @@ -13,6 +16,13 @@ $ php artisan migrate $ php artisan gobelins:importupdatedon ``` +Appliquer le correctif 'Vente' : + +``` +$ cd /var/www/gobelins/current +$ php artisan gobelins:hotfixvente +``` + ## Finalisé le 11/04/2020 Deployer les modifs sur les fichiers .env (pour datasource_username, etc) :