diff --git a/extension.neon b/extension.neon index 046d05d6..18bf1904 100644 --- a/extension.neon +++ b/extension.neon @@ -18,6 +18,7 @@ parameters: - stubs/DBAL/Types/Type.stub - stubs/DBAL/Exception.stub - stubs/DBAL/Result.stub + - stubs/DBAL/Statement.stub - stubs/DocumentManager.stub - stubs/DocumentRepository.stub - stubs/EntityManager.stub diff --git a/stubs/DBAL/Connection.stub b/stubs/DBAL/Connection.stub index 5011618d..1101ad59 100644 --- a/stubs/DBAL/Connection.stub +++ b/stubs/DBAL/Connection.stub @@ -10,6 +10,15 @@ use Throwable; class Connection { + /** + * Prepares an SQL statement. + * + * @param __doctrine-literal-string $sql The SQL statement to prepare. + * + * @throws Exception + */ + public function prepare(string $sql): Statement; + /** * Executes an SQL statement with the given parameters and returns the number of affected rows. * diff --git a/stubs/DBAL/Connection4.stub b/stubs/DBAL/Connection4.stub index de89ab16..bcc5528b 100644 --- a/stubs/DBAL/Connection4.stub +++ b/stubs/DBAL/Connection4.stub @@ -14,6 +14,15 @@ use Throwable; */ class Connection { + /** + * Prepares an SQL statement. + * + * @param __doctrine-literal-string $sql The SQL statement to prepare. + * + * @throws Exception + */ + public function prepare(string $sql): Statement; + /** * Executes an SQL statement with the given parameters and returns the number of affected rows. * diff --git a/stubs/DBAL/Statement.stub b/stubs/DBAL/Statement.stub new file mode 100644 index 00000000..26f4a3a9 --- /dev/null +++ b/stubs/DBAL/Statement.stub @@ -0,0 +1,8 @@ +