Closed arisawali2014 closed 2 years ago
after composer require rocketslab/wa-laravel i got this error
composer require rocketslab/wa-laravel
Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi ParseError syntax error, unexpected '|', expecting ';' or '{' at C:\xampp\htdocs\walara\vendor\rocketslab\wa-laravel\src\WebSocket\WebSocketHandler.php:38 34▕ 35▕ // \Log::info("MSG: " . $message->getPayload() . " - FROM: ". $connection->app->id); 36▕ } 37▕ ➜ 38▕ protected function establishConnection(ConnectionInterface $connection): WebSocketHandler|static 39▕ { 40▕ $connection->send(json_encode([ 41▕ 'event' => 'wa:connection_established', 42▕ 'data' => [ 1 C:\xampp\htdocs\walara\vendor\composer\ClassLoader.php:322 Composer\Autoload\includeFile("C:\xampp\htdocs\walara\vendor\composer/../rocketslab/wa-laravel/src/WebSocket/WebSocketHandler.php") 2 [internal]:0 Composer\Autoload\ClassLoader::loadClass("RocketsLab\WALaravel\WebSocket\WebSocketHandler") Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Hi, sorry for delay. What is your PHP version?
Try with PHP 8.0 +
Thanks for report, I will update the composer.json with PHP 8 minimum requirement.
after
composer require rocketslab/wa-laravel
i got this error