Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
field_encrypt
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
field_encrypt
Merge requests
!88
11.2 no longer supports 8000 db updates
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
11.2 no longer supports 8000 db updates
issue/field_encrypt-3524349:11.2_update_test
into
4.x
Overview
0
Commits
9
Pipelines
6
Changes
3
Merged
Patrick Kenny
requested to merge
issue/field_encrypt-3524349:11.2_update_test
into
4.x
4 weeks ago
Overview
0
Commits
9
Pipelines
6
Changes
3
Expand
0
0
Merge request reports
Compare
4.x
version 5
ce2e2121
4 weeks ago
version 4
41e8f059
4 weeks ago
version 3
cc155ab0
4 weeks ago
version 2
b2c29e87
4 weeks ago
version 1
7d4eca93
4 weeks ago
4.x (base)
and
latest version
latest version
ce2e2121
9 commits,
4 weeks ago
version 5
ce2e2121
9 commits,
4 weeks ago
version 4
41e8f059
6 commits,
4 weeks ago
version 3
cc155ab0
4 commits,
4 weeks ago
version 2
b2c29e87
3 commits,
4 weeks ago
version 1
7d4eca93
1 commit,
4 weeks ago
3 files
+
71
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
src/Hook/FieldEncryptRequirementsHook.php
0 → 100644
+
52
−
0
Options
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\field_encrypt\Hook
;
use
Drupal\Core\Hook\Attribute\Hook
;
use
Drupal\Core\Update\UpdateHookRegistry
;
/**
* Update requirements for field_encrypt.
*/
class
FieldEncryptRequirementsHook
{
public
function
__construct
(
protected
UpdateHookRegistry
$updateHookRegistry
)
{
}
/**
* Checks whether the site meets the module requirements.
*/
private
function
requirementsCheck
():
array
{
$requirements
=
[];
$schema
=
$this
->
updateHookRegistry
->
getInstalledVersion
(
'field_encrypt'
);
if
((
int
)
$schema
<
8300
)
{
$requirements
[
'field_encrypt_update_to_v4'
]
=
[
'title'
=>
t
(
'Field Encrypt'
),
'severity'
=>
REQUIREMENT_ERROR
,
'value'
=>
t
(
'Updating to field_encrypt version 4 is not supported.'
),
'description'
=>
t
(
'In order to upgrade you need to decrypt all your data on the previous version and uninstall the module.'
),
];
}
return
$requirements
;
}
/**
* Implements hook_update_requirements().
*/
#[Hook('update_requirements')]
public
function
update
():
array
{
return
$this
->
requirementsCheck
();
}
/**
* Implements hook_runtime_requirements().
*/
#[Hook('runtime_requirements')]
public
function
runtime
():
array
{
return
$this
->
requirementsCheck
();
}
}
Loading