Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates-3449631
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
automatic_updates-3449631
Commits
26efea98
Commit
26efea98
authored
3 years ago
by
Ted Bowman
Committed by
Adam G-H
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3240753
by tedbow, phenaproxima: Prevent install if Composer dependencies are not present
parent
c2a35f7b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
automatic_updates.install
+12
-6
12 additions, 6 deletions
automatic_updates.install
package_manager/package_manager.install
+20
-0
20 additions, 0 deletions
package_manager/package_manager.install
with
32 additions
and
6 deletions
automatic_updates.install
+
12
−
6
View file @
26efea98
...
...
@@ -11,11 +11,17 @@ use Drupal\automatic_updates\Validation\ReadinessRequirements;
* Implements hook_requirements().
*/
function
automatic_updates_requirements
(
$phase
)
{
if
(
$phase
!==
'runtime'
)
{
return
[];
if
(
$phase
===
'runtime'
)
{
/** @var \Drupal\automatic_updates\Validation\ReadinessRequirements $readiness_requirement */
$readiness_requirement
=
\Drupal
::
classResolver
(
ReadinessRequirements
::
class
);
return
$readiness_requirement
->
getRequirements
();
}
if
(
$phase
===
'install'
&&
!
class_exists
(
'PhpTuf\ComposerStager\Domain\Beginner'
))
{
return
[
'automatic_updates'
=>
[
'description'
=>
t
(
'External dependencies for Automatic Updates are not available. Composer must be used to download the module with dependencies.'
),
'severity'
=>
REQUIREMENT_ERROR
,
],
];
}
/** @var \Drupal\automatic_updates\Validation\ReadinessRequirements $readiness_requirement */
$readiness_requirement
=
\Drupal
::
classResolver
(
ReadinessRequirements
::
class
);
return
$readiness_requirement
->
getRequirements
();
}
This diff is collapsed.
Click to expand it.
package_manager/package_manager.install
0 → 100644
+
20
−
0
View file @
26efea98
<?php
/**
* @file
* Contains install and update functions for Package Manager.
*/
/**
* Implements hook_requirements().
*/
function
package_manager_requirements
(
$phase
)
{
if
(
$phase
===
'install'
&&
!
class_exists
(
'PhpTuf\ComposerStager\Domain\Beginner'
))
{
return
[
'package_manager'
=>
[
'description'
=>
t
(
'External dependencies for Package Manager are not available. Composer must be used to download the module with dependencies.'
),
'severity'
=>
REQUIREMENT_ERROR
,
],
];
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment