-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
182 changed files
with
1,660 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: ORM3 Tests | ||
|
||
on: ["push", "pull_request"] | ||
|
||
jobs: | ||
build: | ||
name: PHP ${{ matrix.php }} with ORM3 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: | ||
- 8.1 | ||
- 8.2 | ||
- 8.3 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
|
||
- run: composer validate | ||
|
||
- uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: "highest" | ||
|
||
- run: composer run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ | |
use Doctrine\ORM\Query\Lexer; | ||
use Doctrine\ORM\Query\Parser; | ||
use Doctrine\ORM\Query\SqlWalker; | ||
use Doctrine\ORM\Query\TokenType; | ||
|
||
use function class_exists; | ||
|
||
/** @author Pascal Wacker <[email protected]> */ | ||
class AddTime extends FunctionNode | ||
|
@@ -21,15 +24,17 @@ public function getSql(SqlWalker $sqlWalker): string | |
|
||
public function parse(Parser $parser): void | ||
{ | ||
$parser->match(Lexer::T_IDENTIFIER); | ||
$parser->match(Lexer::T_OPEN_PARENTHESIS); | ||
$orm3 = class_exists(TokenType::class); | ||
|
||
$parser->match($orm3 ? TokenType::T_IDENTIFIER : Lexer::T_IDENTIFIER); | ||
$parser->match($orm3 ? TokenType::T_OPEN_PARENTHESIS : Lexer::T_OPEN_PARENTHESIS); | ||
|
||
$this->date = $parser->ArithmeticPrimary(); | ||
|
||
$parser->match(Lexer::T_COMMA); | ||
$parser->match($orm3 ? TokenType::T_COMMA : Lexer::T_COMMA); | ||
|
||
$this->time = $parser->ArithmeticPrimary(); | ||
|
||
$parser->match(Lexer::T_CLOSE_PARENTHESIS); | ||
$parser->match($orm3 ? TokenType::T_CLOSE_PARENTHESIS : Lexer::T_CLOSE_PARENTHESIS); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ | |
use Doctrine\ORM\Query\Lexer; | ||
use Doctrine\ORM\Query\Parser; | ||
use Doctrine\ORM\Query\SqlWalker; | ||
use Doctrine\ORM\Query\TokenType; | ||
|
||
use function class_exists; | ||
|
||
/** @author Sarjono Mukti Aji <[email protected]> */ | ||
class Binary extends FunctionNode | ||
|
@@ -14,12 +17,14 @@ class Binary extends FunctionNode | |
|
||
public function parse(Parser $parser): void | ||
{ | ||
$parser->match(Lexer::T_IDENTIFIER); | ||
$parser->match(Lexer::T_OPEN_PARENTHESIS); | ||
$orm3 = class_exists(TokenType::class); | ||
|
||
$parser->match($orm3 ? TokenType::T_IDENTIFIER : Lexer::T_IDENTIFIER); | ||
$parser->match($orm3 ? TokenType::T_OPEN_PARENTHESIS : Lexer::T_OPEN_PARENTHESIS); | ||
|
||
$this->stringPrimary = $parser->StringPrimary(); | ||
|
||
$parser->match(Lexer::T_CLOSE_PARENTHESIS); | ||
$parser->match($orm3 ? TokenType::T_CLOSE_PARENTHESIS : Lexer::T_CLOSE_PARENTHESIS); | ||
} | ||
|
||
public function getSql(SqlWalker $sqlWalker): string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.