clue / reactphp-sqlite

Async SQLite database, lightweight non-blocking process wrapper around file-based database extension (ext-sqlite3), built on top of ReactPHP.
https://clue.engineering/2019/introducing-reactphp-sqlite
MIT License
51 stars 10 forks source link

Fatal error: Uncaught ArgumentCountError: #40

Closed sir-reynolds closed 3 years ago

sir-reynolds commented 3 years ago

i try code on example insert and run from cli php react-sqlite.php 50, and this is error information

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Clue\React\SQLite\Factory::__construct(), 0 passed in C:\laragon\www\php-composer-lib\react-sqlite.php on line 8 and exactly 1 expected in C:\laragon\www\php-composer-lib\vendor\clue\reactphp-sqlite\src\Factory.php:29
Stack trace:
#0 C:\laragon\www\php-composer-lib\react-sqlite.php(8): Clue\React\SQLite\Factory->__construct()
#1 {main}
  thrown in C:\laragon\www\php-composer-lib\vendor\clue\reactphp-sqlite\src\Factory.php on line 29

information :

windows 10 Laragon php 7.2.19

clue commented 3 years ago

@sir-reynolds It looks like you're using the documentation/examples from the current main version while running the v1.1.0 release. Your above code should work against the current main version and the upcoming v1.2.0 release version (#39) :+1: