Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/tests/phpunit.xml
/vendor
.php-cs-fixer.cache
clover.xml
clover.xml
.idea
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
"doctrine/orm": "^3.3"
},
"require-dev": {
"carbonphp/carbon-doctrine-types": "^3.2",
"friendsofphp/php-cs-fixer": "^3.64",
"nesbot/carbon": "^2.72",
"nesbot/carbon": "^3.8",
"phpstan/phpstan": "^1.12",
"phpunit/phpunit": "^10.5",
"symfony/cache": "^6.4 || ^7.0",
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<source>
<include>
<directory>./src/Query</directory>
<directory>./src/Types</directory>
</include>
</source>
</phpunit>
9 changes: 2 additions & 7 deletions src/Query/Mysql/Atan2.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ class Atan2 extends FunctionNode

public function getSql(SqlWalker $sqlWalker): string
{
$firstArgument = $sqlWalker->walkSimpleArithmeticExpression(
$this->firstExpression
);

$secondArgument = $sqlWalker->walkSimpleArithmeticExpression(
$this->secondExpression
);
$firstArgument = $sqlWalker->walkSimpleArithmeticExpression($this->firstExpression);
$secondArgument = $sqlWalker->walkSimpleArithmeticExpression($this->secondExpression);

return 'ATAN2(' . $firstArgument . ', ' . $secondArgument . ')';
}
Expand Down
12 changes: 6 additions & 6 deletions src/Query/SortableNullsWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace DoctrineExtensions\Query;

use Doctrine\ORM\Query;
use Doctrine\ORM\Query\AST\OrderByItem;

/**
* The SortableNullsWalker is a TreeWalker that walks over a DQL AST and constructs
Expand All @@ -18,12 +17,12 @@
* ->addOrderBy('p.id', 'DESC'); // relation to person
*
* $query = $qb->getQuery();
* $query->setHint(Doctrine\ORM\Query::HINT_CUSTOM_OUTPUT_WALKER, 'Webges\DoctrineExtensions\Query\SortableNullsWalker');
* $query->setHint("sortableNulls.fields", array(
* $query->setHint(Doctrine\ORM\Query::HINT_CUSTOM_OUTPUT_WALKER, SortableNullsWalker::class);
* $query->setHint("sortableNulls.fields", [
* "p.firstname" => Webges\DoctrineExtensions\Query\SortableNullsWalker::NULLS_FIRST,
* "p.lastname" => Webges\DoctrineExtensions\Query\SortableNullsWalker::NULLS_LAST,
* "p.id" => Webges\DoctrineExtensions\Query\SortableNullsWalker::NULLS_LAST
* ));
* ]);
*
* @see http://www.doctrine-project.org/jira/browse/DDC-490
*/
Expand All @@ -34,9 +33,10 @@ class SortableNullsWalker extends Query\SqlWalker
public const NULLS_LAST = 'NULLS LAST';

/**
* @param OrderByItem $orderByItem
* @param Query\AST\OrderByItem $orderByItem
* @throws Query\QueryException
*/
public function walkOrderByItem($orderByItem): array|string
public function walkOrderByItem($orderByItem): string
{
$sql = parent::walkOrderByItem($orderByItem);
$hint = $this->getQuery()->getHint('sortableNulls.fields');
Expand Down
33 changes: 0 additions & 33 deletions src/Types/CarbonDateTimeType.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Types/CarbonDateTimeTzType.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Types/CarbonDateType.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Types/CarbonImmutableDateTimeType.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Types/CarbonImmutableDateTimeTzType.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Types/CarbonImmutableDateType.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Types/CarbonImmutableTimeType.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Types/CarbonTimeType.php

This file was deleted.

Loading