Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Bug fixes:
- [code-builder] Class import doesn't work with single element namespace
#760
- [code-builder] Variant is not passed to class generator (#766)
- [phpactor CLI] response shows source code instead of path (#792)
- [phpactor|cli] response shows source code instead of path (#792)
- [class-mover|rpc] Fix order of open/close operations, prevent VIM crashing

BC Break:

Expand Down
4 changes: 2 additions & 2 deletions lib/Extension/ClassMover/Rpc/ClassMoveHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public function handle(array $arguments)
);

return CollectionResponse::fromActions([
CloseFileResponse::fromPath($arguments[self::PARAM_SOURCE_PATH]),
OpenFileResponse::fromPath($arguments[self::PARAM_DEST_PATH])
OpenFileResponse::fromPath($arguments[self::PARAM_DEST_PATH]),
CloseFileResponse::fromPath($arguments[self::PARAM_SOURCE_PATH])
]);
}
}
7 changes: 7 additions & 0 deletions lib/TestOne.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Phpactor;

class Test
{
}
13 changes: 7 additions & 6 deletions tests/Unit/Extension/ClassMover/Rpc/ClassMoveHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ public function testItShouldAskForConfirmation()
$this->assertInstanceOf(CollectionResponse::class, $action);
$actions = $action->actions();

$firstAction = array_shift($actions);
$this->assertInstanceOf(CloseFileResponse::class, $firstAction);
$this->assertEquals(self::SOURCE_PATH, $firstAction->path());
$action = array_shift($actions);
$this->assertInstanceOf(OpenFileResponse::class, $action);
$this->assertEquals(self::DEST_PATH, $action->path());

$action = array_shift($actions);
$this->assertInstanceOf(CloseFileResponse::class, $action);
$this->assertEquals(self::SOURCE_PATH, $action->path());

$secondAction = array_shift($actions);
$this->assertInstanceOf(OpenFileResponse::class, $secondAction);
$this->assertEquals(self::DEST_PATH, $secondAction->path());
}

public function testItAskIfRelatedFilesShouldBeMoved()
Expand Down