mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17336] Move object instantiation outside of the loop
PHPBB-17336 Signed-off-by: Matt Friedman <maf675@gmail.com>
This commit is contained in:
parent
b08023f231
commit
9a53df6f73
1 changed files with 2 additions and 1 deletions
|
@ -476,6 +476,8 @@ class installer
|
||||||
*/
|
*/
|
||||||
private function get_compatible_versions(array $compatible_packages, ConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
|
private function get_compatible_versions(array $compatible_packages, ConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
|
||||||
{
|
{
|
||||||
|
$version_parser = new VersionParser();
|
||||||
|
|
||||||
$core_stability_value = BasePackage::$stabilities[$core_stability];
|
$core_stability_value = BasePackage::$stabilities[$core_stability];
|
||||||
|
|
||||||
/** @var PackageInterface $version */
|
/** @var PackageInterface $version */
|
||||||
|
@ -505,7 +507,6 @@ class installer
|
||||||
// Check for compatibility with phpBB if 'phpbb/phpbb' exists in 'soft-require'
|
// Check for compatibility with phpBB if 'phpbb/phpbb' exists in 'soft-require'
|
||||||
if (isset($extra['soft-require']['phpbb/phpbb']))
|
if (isset($extra['soft-require']['phpbb/phpbb']))
|
||||||
{
|
{
|
||||||
$version_parser = new VersionParser();
|
|
||||||
$package_constraint = $version_parser->parseConstraints($extra['soft-require']['phpbb/phpbb']);
|
$package_constraint = $version_parser->parseConstraints($extra['soft-require']['phpbb/phpbb']);
|
||||||
if (!$package_constraint->matches($core_constraint))
|
if (!$package_constraint->matches($core_constraint))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue