Skip to content

Conversation

@martin-georgiev
Copy link
Owner

@martin-georgiev martin-georgiev commented Mar 26, 2025

Summary by CodeRabbit

  • Tests
    • Introduced a new test class BaseTypeTest to validate error handling and functionality for data types, ensuring exceptions are thrown for misconfigurations.
    • Added a new test class BaseFunctionTest to verify SQL generation for function calls, including handling of multiple and null arguments for accurate output.

@coveralls
Copy link

coveralls commented Mar 26, 2025

Coverage Status

coverage: 95.341% (+0.7%) from 94.659%
when pulling eccc921 on more-tests
into 67c344e on main.

@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 2025

Walkthrough

This 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 TYPE_NAME constant is misconfigured or properly set. The second, BaseFunctionTest, verifies the SQL generation process of a custom BaseFunction subclass, including formatted function calls with multiple arguments and handling of null nodes. Both tests utilize PHPUnit’s mocking capabilities to simulate platform behavior and ensure expected outcomes.

Changes

File Change Summary
tests/MartinGeorgiev/.../DBAL/Types/BaseTypeTest.php Added new test class BaseTypeTest to validate BaseType behavior. Tests check exception throwing when TYPE_NAME is missing, proper retrieval of the type name, correct SQL declaration, and that SQL comment hints return false.
tests/MartinGeorgiev/.../ORM/Query/AST/Functions/BaseFunctionTest.php Added new test class BaseFunctionTest to validate BaseFunction SQL generation. Tests confirm that SQL is formatted correctly for calls with multiple arguments and that null nodes are handled appropriately within the function prototype context.

Poem

I'm a rabbit beneath the code's moonlight,
Hopping through tests with joyful delight.
Base types and functions rhyme in every line,
Where exceptions and SQL strings perfectly align.
With a twitch of my whiskers and a skip so free,
I celebrate code as sweet as a fresh, crisp pea!

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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 OUT parameters 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 OUT parameters[1][4]
  • Set operations via RETURNS TABLE syntax[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 (TRIGGER vs VOID)[3], and matching composite type structures in return clauses[4].

Citations:


Advanced Function Prototype Testing

While the existing test using the prototype TEST(%s, %s) verifies the basic behavior of the BaseFunction, 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 BaseFunction is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 67c344e and 5d267cf.

📒 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 BaseFunction class.


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 BaseType class.


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.

Copy link

@coderabbitai coderabbitai bot left a 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:

  1. Error handling (e.g., incorrect number of arguments)
  2. Different argument types (e.g., expressions, literals, identifiers)
  3. Nested function calls (functions as arguments to other functions)
  4. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5d267cf and eccc921.

📒 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants