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
6 changes: 3 additions & 3 deletions examples/DebugMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
}],
'9' => ['label' => 'Exception (tp($throwable))', 'run' => function () {
try {
throw new \RuntimeException('Something went wrong while processing the request');
} catch (\Throwable $e) {
throw new RuntimeException('Something went wrong while processing the request');
} catch (Throwable $e) {
tp($e);
}
}],
Expand Down Expand Up @@ -76,7 +76,7 @@
try {
$scenarios[$choice]['run']();
echo "Sent.\n";
} catch (\Throwable $e) {
} catch (Throwable $e) {
echo 'Error: '.$e->getMessage()."\n";
echo "Is `php bin/tapper` running?\n";
}
Expand Down
3 changes: 2 additions & 1 deletion src/Console/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

declare(strict_types=1);

use DI\ContainerBuilder;
use PhpTui\Term\Terminal;
use PhpTui\Tui\Bridge\PhpTerm\PhpTermBackend;
use PhpTui\Tui\Display\Display;
Expand All @@ -10,7 +11,7 @@
use React\EventLoop\LoopInterface;
use Tapper\Console\Application;

$builder = new \DI\ContainerBuilder;
$builder = new ContainerBuilder;
$builder->useAutowiring(true);
$builder->useAttributes(true);
$builder->addDefinitions([
Expand Down
3 changes: 2 additions & 1 deletion src/Runtime/Tapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Tapper\Runtime;

use Composer\Autoload\ClassLoader;
use Tapper\Rpc\JsonRpcClient;
use Tapper\Rpc\JsonRpcRequest;

Expand Down Expand Up @@ -104,7 +105,7 @@ private function collectDebugInfo(): void

private function findProjectRoot(): ?string
{
$composerClassLoader = \Composer\Autoload\ClassLoader::class;
$composerClassLoader = ClassLoader::class;

if (! class_exists($composerClassLoader)) {
return null;
Expand Down
3 changes: 2 additions & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Clue\React\NDJson\Decoder;
use Clue\React\NDJson\Encoder;
use PhpTui\Term\KeyCode;
use React\Socket\ConnectionInterface;
use React\Socket\SocketServer;
use Tapper\Console\EventBus;
use Tapper\Console\State\AppState;
Expand All @@ -32,7 +33,7 @@ public function run(): void
@unlink($socketPath);
$server = new SocketServer('unix://'.$socketPath);

$server->on('connection', function (\React\Socket\ConnectionInterface $conn) {
$server->on('connection', function (ConnectionInterface $conn) {
$decoder = new Decoder($conn, true);
$encoder = new Encoder($conn, true);

Expand Down
Loading