Skip to content

Commit

Permalink
Resolve #152: Fix deprecated string interpolation for PHP8.2 (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoshtika authored Oct 12, 2023
1 parent 436d85d commit 16f702a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/example_response_server.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
$logger = new EchoLogger();

$loop = React\EventLoop\Loop::get();
$socket = new SocketServer("${address}:{$port}", [], $loop);
$socket = new SocketServer("{$address}:{$port}", [], $loop);

$socket->on('connection', function (React\Socket\ConnectionInterface $conn) use ($logger) {
$logger->debug($conn->getRemoteAddress() . ": connected: ");
Expand Down
2 changes: 1 addition & 1 deletion examples/rtu_usb_to_serial.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'-ixon', // disable XON/XOFF flow control
'-crtscts', // disable RTS/CTS handshaking
]);
$sttyResult = exec("stty -F ${device} ${sttyModes}");
$sttyResult = exec("stty -F {$device} {$sttyModes}");
if ($sttyResult === false) {
echo 'stty command failed' . PHP_EOL;
exit(1);
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/AddressSplitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected function shouldSplit(Address $currentAddress, int $currentQuantity, Ad
if ($range->overlaps($from, $to)) {
// when currentAddress directly overlaps unaddressable range we have to error out as there is no way to request from that range
$size = $currentAddress->getSize();
throw new InvalidArgumentException("address at ${from} with size ${size} overlaps unaddressable range");
throw new InvalidArgumentException("address at {$from} with size {$size} overlaps unaddressable range");
}
if ($previousEnd != -1 && $range->overlaps($previousEnd, $from - 1)) {
return true;
Expand Down

0 comments on commit 16f702a

Please sign in to comment.