Skip to content

Commit

Permalink
Update dependency on PHP 7.4, update deployment log directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbaldessin committed Jul 30, 2020
1 parent 415e5f1 commit 64625ef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
13 changes: 5 additions & 8 deletions app/Http/OaiPmh/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -116,7 +114,7 @@ public function getRecord($metadataFormat, $identifier)
if (!$product) {
throw new IdDoesNotExistException('No matching identifier ' . $identifier);
}

return $this->buildRecord($metadataFormat, $product);
}

Expand Down Expand Up @@ -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);
}
Expand All @@ -227,7 +225,6 @@ public function fetchProducts($metadataFormat, DateTime $from = null, DateTime $
return $query->paginate($this->limit, ['*'], 'page', $page);
}


/**
* @param string $token
* @return RecordList
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions documentation/deployment_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
Deployer les modifs sur les fichiers .env (pour datasource_username, etc) :
`$ ansible-playbook --vault-password-file=vault_password -i inventory/<production> site.yml --limit=production --tags="dotenv"`

Deployer l'upgrade vers PHP 7.4 (nouveau stable) :
`$ ansible-playbook --vault-password-file=vault_password -i inventory/<production> webservers.yml --limit=production`

Rapatrier les informations de modification :

```
Expand All @@ -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) :
Expand Down

0 comments on commit 64625ef

Please sign in to comment.