-
-
Notifications
You must be signed in to change notification settings - Fork 56
chore: test the BaseType and BaseFunction abstractions
#309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request introduces two new PHPUnit test classes in separate namespaces. The first, BaseTypeTest, validates exception throwing and SQL declaration behavior for a BaseType subclass when the Changes
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php (1)
19-38:❓ Verification inconclusive
Consider testing with more complex function prototypes.
While the current test covers basic functionality, consider adding tests for more complex PostgreSQL function patterns with different placeholders and formatting options to ensure the BaseFunction can handle a variety of SQL function structures.
🌐 Web query:
What are some complex PostgreSQL function syntax examples?💡 Result:
PostgreSQL offers several advanced function syntax patterns for complex use cases. Here are notable examples demonstrating sophisticated features:
1. Returning Composite Types with Multiple Columns
Functions can return complex types using
OUTparameters or explicit composite types:-- Using OUT parameters CREATE FUNCTION dup(in int, out f1 int, out f2 text) AS $$ SELECT $1, CAST($1 AS text) || ' is text' $$ LANGUAGE SQL; SELECT * FROM dup(42); -- Returns (42, "42 is text")[1] -- With explicit composite type CREATE TYPE dup_result AS (f1 int, f2 text); CREATE FUNCTION dup(int) RETURNS dup_result AS $$ SELECT $1, CAST($1 AS text) || ' is text' $$ LANGUAGE SQL; SELECT * FROM dup(42); -- Same result as above[1][4]2. Set-Returning Functions (TABLE)
Functions can return entire tables for set-based operations:
CREATE FUNCTION dup(int) RETURNS TABLE(f1 int, f2 text) AS $$ SELECT $1, CAST($1 AS text) || ' is text' $$ LANGUAGE SQL; SELECT * FROM dup(42); -- Returns result set with columns f1, f2[1][6]3. Trigger Functions
Advanced trigger functions require specific syntax for audit logging:
-- Composite type handling in triggers CREATE OR REPLACE FUNCTION log_price_change() RETURNS TRIGGER AS $$ BEGIN IF NEW.price <> OLD.price THEN INSERT INTO product_price_changes(product_id, old_price, new_price, changed_on) VALUES (OLD.id, OLD.price, NEW.price, NOW()); END IF; RETURN NEW; END; $$ LANGUAGE plpgsql; CREATE TRIGGER price_audit_trigger BEFORE UPDATE ON products FOR EACH ROW EXECUTE FUNCTION log_price_change();[3][11]4. Polymorphic Parameter Handling
Functions can accept variadic arguments and use named parameters:
-- Mixed notation parameter passing CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) RETURNS text AS $$ SELECT CASE WHEN $3 THEN UPPER($1 || ' ' || $2) ELSE LOWER($1 || ' ' || $2) END; $$ LANGUAGE SQL; -- Calling with positional, named, and default parameters SELECT concat_lower_or_upper('Hello', 'World'); -- Returns "hello world" SELECT concat_lower_or_upper(a => 'Hi', uppercase => true, b => 'There'); -- Returns "HI THERE"[6][8]5. Row-Type Variable Manipulation
Functions can process whole table rows using composite variables:
CREATE FUNCTION double_salary(emp) RETURNS numeric AS $$ SELECT $1.salary * 2; $$ LANGUAGE SQL; SELECT name, double_salary(emp.*) FROM emp WHERE age > 30; -- Processes row objects[4][14]6. Procedural Logic with PL/pgSQL
Complex business logic using variables and conditional blocks:
CREATE OR REPLACE FUNCTION get_film_count(len_from int, len_to int) RETURNS int LANGUAGE plpgsql AS $$ DECLARE film_count INTEGER; BEGIN SELECT COUNT(*) INTO film_count FROM film WHERE length BETWEEN len_from AND len_to; RETURN film_count; END; $$; -- Usage: SELECT get_film_count(90, 120);[5][8]These examples highlight PostgreSQL's capabilities for:
- Composite type handling through explicit types or
OUTparameters[1][4]- Set operations via
RETURNS TABLEsyntax[1][6]- Trigger integration with row-level event handling[3][11]
- Parameter flexibility using positional/named notation and defaults[6][8]
- Row-level object manipulation with composite type references[4][14]
- Procedural programming in PL/pgSQL[5][8]
When creating advanced functions, critical considerations include proper type casting, trigger return types (
TRIGGERvsVOID)[3], and matching composite type structures in return clauses[4].Citations:
- 1: https://www.postgresql.org/docs/current/sql-createfunction.html
- 2: https://www.tutorialspoint.com/postgresql/postgresql_functions.htm
- 3: https://estuary.dev/postgresql-triggers/
- 4: https://www.postgresql.org/docs/9.1/xfunc-sql.html
- 5: https://neon.tech/postgresql/postgresql-plpgsql/postgresql-create-function
- 6: https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html
- 7: https://neon.tech/postgresql/postgresql-aggregate-functions
- 8: https://www.sprinkledata.com/blogs/postgresql-function
- 9: https://www.codecademy.com/learn/fscp-advanced-postgresql/modules/fscp-postgres-database-performance/cheatsheet
- 10: https://neon.tech/postgresql/postgresql-plpgsql
- 11: https://www.postgresql.org/docs/7.1/advanced.html
- 12: https://www.joeconway.com/presentations/function_basics.pdf
- 13: https://bytescout.com/blog/postgresql-advanced-queries.html
- 14: https://www.enterprisedb.com/postgres-tutorials/examples-using-greatest-and-least-functions-postgresql
Advanced Function Prototype Testing
While the existing test using the prototype
TEST(%s, %s)verifies the basic behavior of theBaseFunction, it would be beneficial to extend the test coverage. Consider adding tests that incorporate more intricate PostgreSQL function patterns to ensure robust handling. In particular, you might explore:
- Composite Types & OUT Parameters: Test functions that return composite types or use OUT parameters (e.g., prototypes mimicking
RETURN (a, b)syntax).- Set-Returning Functions: Validate behavior for functions defined with
RETURNS TABLE(...), ensuring the function correctly handles multiple result columns.- Trigger Functions & PL/pgSQL Logic: Include cases that simulate advanced formatting or conditional logic (e.g., functions with trigger-specific behaviors or procedures written in PL/pgSQL).
- Polymorphic & Named Parameters: Consider prototypes that involve variadic parameters, default values, or named parameter usage, similar to PostgreSQL’s flexible syntax.
Incorporating these diverse scenarios will help ensure that
BaseFunctionis resilient and versatile when handling a variety of SQL function structures.🧰 Tools
🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php(1 hunks)tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/**/*.php`: Use the PostgreSQL official documentation to verify that tests include comprehensive use cases and example SQL que...
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/**/*.php: Use the PostgreSQL official documentation to verify that tests include comprehensive use cases and example SQL queries for the tested SQL functions and operators.
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
🧬 Code Definitions (1)
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php (1)
src/MartinGeorgiev/Doctrine/DBAL/Types/BaseType.php (4)
BaseType(17-52)getName(31-36)getSQLDeclaration(24-29)requiresSQLCommentHint(41-44)
🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🪛 GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
[failure] 66-66:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:65::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
[failure] 20-20:
Parameter #1 $name (string) of method MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseFunction@anonymous/tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php:19::__construct() is not contravariant with parameter #1 $name (mixed) of method Doctrine\ORM\Query\AST\Functions\FunctionNode::__construct().
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
[failure] 94-94:
Call to deprecated method requiresSQLCommentHint() of class MartinGeorgiev\Doctrine\DBAL\Types\BaseType.
🔇 Additional comments (8)
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php (2)
1-11: LGTM! Proper namespace and imports setup.The namespace and imports are correctly defined for testing the
BaseFunctionclass.
12-13: LGTM! Class declaration is appropriate.The test class correctly extends PHPUnit's TestCase and follows naming conventions.
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php (6)
1-11: LGTM! Proper namespace and imports setup.The namespace and imports are correctly defined for testing the
BaseTypeclass.
12-23: LGTM! Good setup of mock platform.The test class declaration and setUp method properly initialize the AbstractPlatform mock for testing.
24-37: LGTM! Exception testing is properly implemented.The test correctly validates that an exception is thrown when TYPE_NAME is not configured.
39-52: LGTM! SQL declaration exception test is thorough.This test properly verifies that an exception is thrown when attempting to get SQL declaration without a proper TYPE_NAME.
54-64: LGTM! Type name test is accurate.The test properly verifies that the getName method returns the correct custom type name.
66-83: LGTM! SQL declaration test is well-implemented.The test correctly verifies that the getSQLDeclaration method returns the proper SQL type by mocking the platform's getDoctrineTypeMapping method.
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
Show resolved
Hide resolved
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php (2)
14-59: Enhance test with PostgreSQL-specific function examples.According to the project's coding guidelines, tests for functions should include comprehensive use cases with example SQL queries from PostgreSQL documentation. Consider enhancing this test with real PostgreSQL function examples to validate the SQL generation matches PostgreSQL's syntax.
For example, you could test with common PostgreSQL functions like
array_to_string,json_build_object, or aggregation functions to ensure the implementation correctly maps to PostgreSQL's SQL dialect.
1-97: Consider expanding test coverage for BaseFunction.The tests cover basic SQL generation and null handling, which is good. However, consider adding additional test cases to validate:
- Error handling (e.g., incorrect number of arguments)
- Different argument types (e.g., expressions, literals, identifiers)
- Nested function calls (functions as arguments to other functions)
- Special SQL characters/escaping in arguments
These additional test cases would make the test suite more comprehensive, especially for PostgreSQL-specific function behaviors.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php(1 hunks)tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/MartinGeorgiev/Doctrine/DBAL/Types/BaseTypeTest.php
🧰 Additional context used
📓 Path-based instructions (1)
`tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/**/*.php`: Use the PostgreSQL official documentation to verify that tests include comprehensive use cases and example SQL que...
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/**/*.php: Use the PostgreSQL official documentation to verify that tests include comprehensive use cases and example SQL queries for the tested SQL functions and operators.
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0
- GitHub Check: PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2
- GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest
- GitHub Check: sloth
🔇 Additional comments (2)
tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/BaseFunctionTest.php (2)
19-25: Fix parameter type incompatibility in constructor.The constructor parameter type issue appears here as well. The same fix should be applied:
- public function __construct(string $name) + public function __construct($name)The test otherwise correctly verifies that the formatted function call works with multiple arguments.
66-72: Fix parameter type incompatibility in constructor.The constructor parameter type issue appears here as well. The same fix should be applied:
- public function __construct(string $name) + public function __construct($name)The test otherwise correctly verifies that null nodes are properly handled in SQL generation.
Summary by CodeRabbit
BaseTypeTestto validate error handling and functionality for data types, ensuring exceptions are thrown for misconfigurations.BaseFunctionTestto verify SQL generation for function calls, including handling of multiple and null arguments for accurate output.