Skip to content

Commit

Permalink
PHRAS-3660 Migration patch for 4.1.6-rc2 (#4005)
Browse files Browse the repository at this point in the history
* patch 4.1.6-rc2

* changelog change

* change
  • Loading branch information
aynsix authored Apr 7, 2022
1 parent 37bdeb9 commit e763201
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Update instructions

- docker docker-compose : add profile "gateway-classic" to your ```COMPOSE_PROFILES```
- Migration patch: no patch to play, just run upgrade for bump version
- Migration instructions: just run upgrade for bump version
- Elasticsearch index action : Requires a drop, create, populate

### Version summary :
Expand All @@ -15,6 +15,7 @@
see section searchengine setting/ aggregate in Admin to activate it.
the features require an Elasticsearch index drop, create, populate
- Adding a separate docker-compose profile to nginx container for a better stack compositing
- Admin Gui users, more search options for users, improved user export, and more information in user details.

### New Features

Expand All @@ -28,12 +29,14 @@ PHRAS-3215 Prod - facets - use image orientation from subdefinition and make a
PHRAS-3643 Bin/console records:build-subdef add option --publish to emit build message to Rabbitmq
PHRAS-3653 Worker queue message : publish messages as persistent into rabbitmq queues
PHRAS-3560 Admin - Users list and search improvement and export users as .csv, add "last connection"
PHRAS-3223 Admin - user details - Display AuthFailure and UsrAuthProvider info
```

### Bug fix

```
PHRAS-3651 prod-facets : tech facets "no value" wrongly translated, some always return 0 answers
PHRAS-3655 Integrity constraint violation when deleting a user with an entry inside table ApiOauthCodes
```

## 4.1.6-rc1
Expand Down
2 changes: 1 addition & 1 deletion lib/Alchemy/Phrasea/Core/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Version
/**
* @var string
*/
private $number = '4.1.6-rc1';
private $number = '4.1.6-rc2';

/**
* @var string
Expand Down
78 changes: 78 additions & 0 deletions lib/classes/patch/416RC2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php

use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration\PropertyAccess;

class patch_416RC2 implements patchInterface
{
/** @var string */
private $release = '4.1.6-rc2';

/** @var array */
private $concern = [base::APPLICATION_BOX];

/**
* {@inheritdoc}
*/
public function get_release()
{
return $this->release;
}

/**
* {@inheritdoc}
*/
public function getDoctrineMigrations()
{
return [];
}

/**
* {@inheritdoc}
*/
public function require_all_upgrades()
{
return false;
}

/**
* {@inheritdoc}
*/
public function concern()
{
return $this->concern;
}

/**
* {@inheritdoc}
*/
public function apply(base $base, Application $app)
{
if ($base->get_base_type() === base::DATA_BOX) {
$this->patch_databox($base, $app);
}
elseif ($base->get_base_type() === base::APPLICATION_BOX) {
$this->patch_appbox($base, $app);
}

return true;
}

private function patch_databox(databox $databox, Application $app)
{
}

private function patch_appbox(base $databox, Application $app)
{
/** @var PropertyAccess $conf */
$conf = $app['conf'];

if (!$conf->has(['main', 'search-engine', 'options', 'populate_permalinks'])) {
$conf->set(['main', 'search-engine', 'options', 'populate_permalinks'], false);
}

if (!$conf->has(['registry', 'api-clients', 'api-subdef_service'])) {
$conf->set(['registry', 'api-clients', 'api-subdef_service'], false);
}
}
}
4 changes: 4 additions & 0 deletions lib/conf.d/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ border-manager:
enabled: false
options:
mediatypes: [Audio, Document, Image, Video]

registry:
api-clients:
api-subdef_service: false
user_account:
deleting_policies:
email_confirmation: true
Expand Down

0 comments on commit e763201

Please sign in to comment.