Skip to content

Commit cf375ec

Browse files
committed
Merge remote-tracking branch 'origin/AC-5972-v1' into Hammer_Community_Backlog_21092022
2 parents 652ad25 + b15b9d7 commit cf375ec

File tree

5 files changed

+31
-17
lines changed

5 files changed

+31
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"colinmollenhour/cache-backend-file": "~1.4.1",
3838
"colinmollenhour/cache-backend-redis": "1.14.2",
3939
"colinmollenhour/credis": "1.13.0",
40-
"colinmollenhour/php-redis-session-abstract": "~1.4.5",
40+
"colinmollenhour/php-redis-session-abstract": "v1.5.0",
4141
"composer/composer": "^1.9 || ^2.0, !=2.2.16",
4242
"elasticsearch/elasticsearch": "~7.17.0",
4343
"ezyang/htmlpurifier": "^4.14",

composer.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/internal/Magento/Framework/Composer/Test/Unit/ComposerInformationTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Composer\Package\CompletePackageInterface;
1212
use Composer\Package\Locker;
1313
use Composer\Package\RootPackageInterface;
14-
use Composer\Repository\RepositoryInterface;
14+
use Composer\Repository\LockArrayRepository;
1515
use Magento\Framework\Composer\ComposerInformation;
1616
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1717
use PHPUnit\Framework\MockObject\Builder\InvocationMocker;
@@ -36,7 +36,7 @@ class ComposerInformationTest extends TestCase
3636
private $lockerMock;
3737

3838
/**
39-
* @var RepositoryInterface|InvocationMocker
39+
* @var LockArrayRepository|InvocationMocker
4040
*/
4141
private $lockerRepositoryMock;
4242

@@ -53,7 +53,10 @@ protected function setUp(): void
5353
$this->lockerMock = $this->getMockBuilder(Locker::class)
5454
->disableOriginalConstructor()
5555
->getMock();
56-
$this->lockerRepositoryMock = $this->getMockForAbstractClass(RepositoryInterface::class);
56+
$this->lockerRepositoryMock = $this->getMockBuilder(LockArrayRepository::class)
57+
->setMethods(['getLockedRepository','getPackages'])
58+
->disableOriginalConstructor()
59+
->getMock();
5760
$this->packageMock = $this->getMockForAbstractClass(CompletePackageInterface::class);
5861
$this->lockerMock->method('getLockedRepository')->willReturn($this->lockerRepositoryMock);
5962
$this->packageMock->method('getType')->willReturn('metapackage');

lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ class DependencyCheckerTest extends TestCase
2020
*/
2121
public function testCheckDependencies(): void
2222
{
23-
$composerApp =
24-
$this->createPartialMock(Application::class, ['setAutoExit', 'resetComposer', 'run']);
23+
$composerApp = $this->getMockBuilder(Application::class)
24+
->setMethods(['setAutoExit', 'resetComposer', 'run','__destruct'])
25+
->disableOriginalConstructor()
26+
->getMock();
2527
$directoryList = $this->createMock(DirectoryList::class);
2628
$directoryList->expects($this->exactly(2))->method('getRoot');
2729
$composerApp->expects($this->once())->method('setAutoExit')->with(false);
30+
$composerApp->expects($this->any())->method('__destruct');
2831

2932
$composerApp
3033
->method('run')
@@ -35,6 +38,7 @@ function ($input, $buffer) {
3538
'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL .
3639
'magento/package-c requires magento/package-a (1.0)' . PHP_EOL;
3740
$buffer->writeln($output);
41+
return 1;
3842
}
3943
),
4044
$this->returnCallback(
@@ -43,6 +47,7 @@ function ($input, $buffer) {
4347
'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL .
4448
'magento/package-d requires magento/package-b (1.0)' . PHP_EOL;
4549
$buffer->writeln($output);
50+
return 1;
4651
}
4752
)
4853
);
@@ -64,11 +69,14 @@ function ($input, $buffer) {
6469
*/
6570
public function testCheckDependenciesExcludeSelf(): void
6671
{
67-
$composerApp =
68-
$this->createPartialMock(Application::class, ['setAutoExit', 'resetComposer', 'run']);
72+
$composerApp = $this->getMockBuilder(Application::class)
73+
->setMethods(['setAutoExit', 'resetComposer', 'run','__destruct'])
74+
->disableOriginalConstructor()
75+
->getMock();
6976
$directoryList = $this->createMock(DirectoryList::class);
7077
$directoryList->expects($this->exactly(3))->method('getRoot');
7178
$composerApp->expects($this->once())->method('setAutoExit')->with(false);
79+
$composerApp->expects($this->any())->method('__destruct');
7280

7381
$composerApp
7482
->method('run')
@@ -79,6 +87,7 @@ function ($input, $buffer) {
7987
'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL .
8088
'magento/package-c requires magento/package-a (1.0)' . PHP_EOL;
8189
$buffer->writeln($output);
90+
return 1;
8291
}
8392
),
8493
$this->returnCallback(
@@ -87,13 +96,15 @@ function ($input, $buffer) {
8796
'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL .
8897
'magento/package-d requires magento/package-b (1.0)' . PHP_EOL;
8998
$buffer->writeln($output);
99+
return 1;
90100
}
91101
),
92102
$this->returnCallback(
93103
function ($input, $buffer) {
94104
$output = 'magento/package-d requires magento/package-c (1.0)' . PHP_EOL .
95105
'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL;
96106
$buffer->writeln($output);
107+
return 1;
97108
}
98109
)
99110
);

lib/internal/Magento/Framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"ext-sodium": "*",
2424
"ext-xsl": "*",
2525
"lib-libxml": "*",
26-
"colinmollenhour/php-redis-session-abstract": "~1.4.5",
26+
"colinmollenhour/php-redis-session-abstract": "v1.5.0",
2727
"composer/composer": "^1.9 || ^2.0, !=2.2.16",
2828
"ezyang/htmlpurifier": "^4.14",
2929
"guzzlehttp/guzzle": "^7.4.2",

0 commit comments

Comments
 (0)