File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -420,8 +420,8 @@ function ($value) {
420420 'n '
421421 );
422422 if ('n ' === $ answer ) {
423- // Remove the recipe from the lock to allow re-asking next time
424- $ this ->lock ->remove ($ recipe ->getName ());
423+ // Keep the package in lock but without recipe info, so the recipe can be applied later
424+ $ this ->lock ->set ($ recipe ->getName (), [ ' version ' => $ recipe -> getPackage ()-> getPrettyVersion ()] );
425425 continue ;
426426 }
427427 if ('a ' === $ answer ) {
Original file line number Diff line number Diff line change 4444
4545class FlexTest extends TestCase
4646{
47- public function tearDown (): void
47+ protected function tearDown (): void
4848 {
4949 @unlink (__DIR__ .'/Fixtures/symfony.lock ' );
5050 }
@@ -171,7 +171,7 @@ public function testContribRecipeNotApprovedIsRemovedFromLock()
171171
172172 $ flex ->record ($ this ->mockPackageEvent ($ package ));
173173 $ flex ->install ($ this ->mockFlexEvent ());
174- $ this ->assertFalse ( $ lock ->has ('contrib/package ' ), ' Recipe lock entry has been removed ' );
174+ $ this ->assertSame ([ ' version ' => ' 1.0.0 ' ], $ lock ->get ('contrib/package ' ));
175175
176176 // Verify the warning message was displayed
177177 $ output = $ io ->getOutput ();
You can’t perform that action at this time.
0 commit comments