mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02: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:
@@ -476,6 +476,8 @@ class installer
|
||||
*/
|
||||
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];
|
||||
|
||||
/** @var PackageInterface $version */
|
||||
@@ -505,7 +507,6 @@ class installer
|
||||
// Check for compatibility with phpBB if 'phpbb/phpbb' exists in 'soft-require'
|
||||
if (isset($extra['soft-require']['phpbb/phpbb']))
|
||||
{
|
||||
$version_parser = new VersionParser();
|
||||
$package_constraint = $version_parser->parseConstraints($extra['soft-require']['phpbb/phpbb']);
|
||||
if (!$package_constraint->matches($core_constraint))
|
||||
{
|
||||
|
Reference in New Issue
Block a user