Skip to content

Commit b5892fe

Browse files
committed
composer upd
1 parent a10b2b2 commit b5892fe

8 files changed

+70
-26
lines changed

Tests/AbstractQueryBuilderTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ protected function runTestDBALQueryBuilder()
427427
* @param ContainerInterface $container
428428
*
429429
* @return QueryBuilderInterface
430+
*
431+
* @throws \Zk2\SpsComponent\QueryBuilderException
430432
*/
431433
protected function buildOrmQuery(ORMBuilder $ormQb, ContainerInterface $container)
432434
{
@@ -461,6 +463,8 @@ function (Parameter $parameter) {
461463
* @param ContainerInterface $container
462464
*
463465
* @return QueryBuilderInterface
466+
*
467+
* @throws \Zk2\SpsComponent\QueryBuilderException
464468
*/
465469
protected function buildDbalQuery(DBALBuilder $dbalQb, ContainerInterface $container)
466470
{
@@ -513,6 +517,8 @@ protected function getDbalQueryBuilder()
513517

514518
/**
515519
* @param string $fileName
520+
*
521+
* @throws \Exception
516522
*/
517523
protected function initLogger($fileName)
518524
{
@@ -582,6 +588,12 @@ abstract protected function getContainer(array $data);
582588

583589
/**
584590
* loadData
591+
*
592+
* @throws \Doctrine\DBAL\DBALException
593+
* @throws \Doctrine\ORM\ORMException
594+
* @throws \Doctrine\ORM\OptimisticLockException
595+
* @throws \Doctrine\ORM\Tools\ToolsException
596+
* @throws \Exception
585597
*/
586598
private function loadData()
587599
{

Tests/Doctrine/FullTextSearchFunction.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class FullTextSearchFunction extends FunctionNode
4646
* @param Parser $parser
4747
*
4848
* @throws QueryBuilderException
49+
* @throws \Doctrine\DBAL\DBALException
50+
* @throws \Doctrine\ORM\Query\QueryException
4951
*/
5052
public function parse(Parser $parser)
5153
{
@@ -100,6 +102,8 @@ public function parse(Parser $parser)
100102
* @return string
101103
*
102104
* @throws QueryBuilderException
105+
* @throws \Doctrine\DBAL\DBALException
106+
* @throws \Doctrine\ORM\Query\AST\ASTException
103107
*/
104108
public function getSql(SqlWalker $sqlWalker)
105109
{

Tests/Doctrine/SortableNullsWalker.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class SortableNullsWalker extends SqlWalker
2626
* @param OrderByItem $orderByItem
2727
*
2828
* @return string
29+
*
30+
* @throws \Doctrine\DBAL\DBALException
31+
* @throws \Doctrine\ORM\Query\QueryException
2932
*/
3033
public function walkOrderByItem($orderByItem)
3134
{

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=7.1,<8.0",
20+
"ext-pdo": "*",
2021
"doctrine/orm": "^2.6",
2122
"doctrine/dbal": "^2.6",
2223
"doctrine/annotations": "^1.0",

composer.lock

Lines changed: 30 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AbstractQueryBuilder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Doctrine\ORM\Query\Parameter;
1717
use Doctrine\ORM\QueryBuilder as ORMQueryBuilder;
1818
use Zk2\SpsComponent\Condition\ConditionInterface;
19-
use Zk2\SpsComponent\Condition\ContainerException;
2019
use Zk2\SpsComponent\Condition\ContainerInterface;
2120

2221
/**
@@ -166,6 +165,8 @@ public function isAggFunc($func)
166165
* @param string $rootEntity
167166
*
168167
* @return null|string
168+
*
169+
* @throws \Doctrine\DBAL\DBALException
169170
*/
170171
public function getPrimaryKeyName($rootEntity)
171172
{
@@ -225,6 +226,8 @@ public function getSqlPart($qb, $partName)
225226

226227
/**
227228
* @return string
229+
*
230+
* @throws \Doctrine\DBAL\DBALException
228231
*/
229232
public function getPlatform()
230233
{

src/DBALQueryBuilder.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public function __construct(QueryBuilder $queryBuilder)
4646
* @param ContainerInterface $container
4747
*
4848
* @return $this
49+
*
50+
* @throws QueryBuilderException
51+
* @throws \Doctrine\DBAL\DBALException
4952
*/
5053
public function buildWhere(ContainerInterface $container)
5154
{
@@ -66,6 +69,9 @@ public function buildWhere(ContainerInterface $container)
6669
* @param int $offset
6770
*
6871
* @return array
72+
*
73+
* @throws QueryBuilderException
74+
* @throws \Doctrine\DBAL\DBALException
6975
*/
7076
public function getResult($limit = 0, $offset = 0)
7177
{
@@ -184,6 +190,7 @@ protected function aggregate(ConditionInterface $condition)
184190
* @return int
185191
*
186192
* @throws QueryBuilderException
193+
* @throws \Doctrine\DBAL\DBALException
187194
*/
188195
private function count()
189196
{
@@ -204,6 +211,9 @@ private function count()
204211
* @param int $offset
205212
*
206213
* @return bool
214+
*
215+
* @throws QueryBuilderException
216+
* @throws \Doctrine\DBAL\DBALException
207217
*/
208218
private function limitOffset($limit, $offset)
209219
{
@@ -222,6 +232,7 @@ private function limitOffset($limit, $offset)
222232
* @return $this
223233
*
224234
* @throws QueryBuilderException
235+
* @throws \Doctrine\DBAL\DBALException
225236
*/
226237
private function initRoot()
227238
{

src/ORMQueryBuilder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace Zk2\SpsComponent;
1212

1313
use Doctrine\Common\Collections\ArrayCollection;
14+
use Doctrine\ORM\NonUniqueResultException;
1415
use Doctrine\ORM\NoResultException;
1516
use Doctrine\ORM\Query\Expr\Base;
1617
use Doctrine\ORM\Query\Expr\From;
@@ -50,6 +51,8 @@ public function __construct(QueryBuilder $queryBuilder)
5051
* @param ContainerInterface $container
5152
*
5253
* @return $this
54+
*
55+
* @throws QueryBuilderException
5356
*/
5457
public function buildWhere(ContainerInterface $container)
5558
{
@@ -271,7 +274,7 @@ private function count()
271274
->select(sprintf('COUNT(DISTINCT %s)', $this->aliasDotPrimary()));
272275
try {
273276
$this->totalResultCount = $qb->getQuery()->getSingleScalarResult();
274-
} catch (NoResultException $e) {
277+
} catch (NonUniqueResultException $e) {
275278
$this->totalResultCount = 0;
276279
} catch (\Exception $e) {
277280
throw new QueryBuilderException($e->getMessage());
@@ -285,6 +288,7 @@ private function count()
285288
* @return $this
286289
*
287290
* @throws QueryBuilderException
291+
* @throws \Doctrine\ORM\Mapping\MappingException
288292
*/
289293
private function initRoot()
290294
{

0 commit comments

Comments
 (0)