Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b971ee0
feat: add support for range types
martin-georgiev Jun 30, 2025
31c9707
Drop AI noise that is not strictly required.
martin-georgiev Jul 1, 2025
978996e
Drop AI noise that is not strictly required.
martin-georgiev Jul 1, 2025
036661f
Address code duplication
martin-georgiev Jul 4, 2025
22da0b0
Add the correct integration tests
martin-georgiev Jul 4, 2025
7c94c0e
Simplify unit tests
martin-georgiev Jul 4, 2025
d937631
Improve error handling
martin-georgiev Jul 5, 2025
692c233
Merge branch 'main' into range-types
martin-georgiev Jul 5, 2025
6a4ab35
Narrow down interfaced method
martin-georgiev Jul 5, 2025
ecb779e
Use template for BaseRangeTestCase
martin-georgiev Jul 5, 2025
c1a439d
Accept errors as a known PHPStan limitation rather than worked around…
martin-georgiev Jul 5, 2025
75bd932
Add basic documentation
martin-georgiev Jul 5, 2025
b70f8c3
Add examples for range's VO and DT usage
martin-georgiev Jul 6, 2025
2f55bcb
Add more tests
martin-georgiev Jul 7, 2025
bf9b2c7
Fix broken tests
martin-georgiev Jul 7, 2025
7e62726
YAGNI tests
martin-georgiev Jul 13, 2025
3a48123
add PHPStan template annotations and suppress covariant generics
martin-georgiev Jul 13, 2025
7bb57d1
Merge branch 'main' into range-types
martin-georgiev Jul 28, 2025
6b3613b
cs-fixer applied
martin-georgiev Jul 28, 2025
d4bed1a
RangeOperatorsTest array operators and range containment expectations
martin-georgiev Jul 28, 2025
98d0c37
RangeOperatorsTest array operators and range containment expectations
martin-georgiev Jul 29, 2025
4f04cc9
cs fixer
martin-georgiev Jul 29, 2025
a883515
Update README.md
martin-georgiev Jul 29, 2025
59e2136
less words = clear docs
martin-georgiev Jul 29, 2025
0371c36
Merge branch 'range-types' of https://github.com/martin-georgiev/post…
martin-georgiev Jul 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
use MartinGeorgiev\Doctrine\DBAL\Types\Exceptions\InvalidRangeForDatabaseException;
use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range;

/**
* Base class for PostgreSQL range types.
*
* @template T of Range
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
abstract class BaseRangeType extends Type
{
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
return static::TYPE_NAME;

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType::getSQLDeclaration() should return string but returns mixed.

Check failure on line 25 in src/MartinGeorgiev/Doctrine/DBAL/Types/BaseRangeType.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Access to undefined constant static(MartinGeorgiev\Doctrine\DBAL\Types\BaseRangeType<T of MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range>)::TYPE_NAME.
}

public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if ($value === null) {
return null;
}

if (!$value instanceof Range) {
throw InvalidRangeForDatabaseException::forInvalidType($value);
}

return (string) $value;
}

/**
* @param mixed $value
*
* @return T|null
*/
public function convertToPHPValue($value, AbstractPlatform $platform): ?Range
{
if ($value === null) {
return null;
}

if (!\is_string($value)) {
throw InvalidRangeForDatabaseException::forInvalidType($value);
}

if ($value === '') {
return null;
}

try {
return $this->createFromString($value);
} catch (\InvalidArgumentException) {
throw InvalidRangeForDatabaseException::forInvalidFormat($value);
}
}

/**
* @return T
*/
abstract protected function createFromString(string $value): Range;
}
27 changes: 27 additions & 0 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\DateRange as DateRangeValueObject;
use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range;

/**
* Implementation of PostgreSQL DATERANGE type.
*
* @extends BaseRangeType<DateRangeValueObject>
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
class DateRange extends BaseRangeType

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/DateRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\DateRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.
{
protected const TYPE_NAME = 'daterange';

protected function createFromString(string $value): Range
{
return DateRangeValueObject::fromString($value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types\Exceptions;

/**
* Exception thrown when an invalid range value is provided for database conversion.
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
final class InvalidRangeForDatabaseException extends \InvalidArgumentException
{
public static function forInvalidType(mixed $value): self
{
return new self(
\sprintf(
'Invalid type for range. Expected Range object or string, got %s',
\get_debug_type($value)
)
);
}

public static function forInvalidFormat(string $value): self
{
return new self(
\sprintf('Invalid range format: %s', $value)
);
}
}
27 changes: 27 additions & 0 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Int4Range as Int4RangeValueObject;
use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range;

/**
* Implementation of PostgreSQL INT4RANGE type.
*
* @extends BaseRangeType<Int4RangeValueObject>
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
class Int4Range extends BaseRangeType

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int4Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int4Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.
{
protected const TYPE_NAME = 'int4range';

protected function createFromString(string $value): Range
{
return Int4RangeValueObject::fromString($value);
}
}
27 changes: 27 additions & 0 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Int8Range as Int8RangeValueObject;
use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range;

/**
* Implementation of PostgreSQL INT8RANGE type.
*
* @extends BaseRangeType<Int8RangeValueObject>
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
class Int8Range extends BaseRangeType

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/Int8Range.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\Int8Range contains abstract method getName() from class Doctrine\DBAL\Types\Type.
{
protected const TYPE_NAME = 'int8range';

protected function createFromString(string $value): Range
{
return Int8RangeValueObject::fromString($value);
}
}
27 changes: 27 additions & 0 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\NumericRange;
use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range;

/**
* Implementation of PostgreSQL NUMRANGE type.
*
* @extends BaseRangeType<NumericRange>
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
class NumRange extends BaseRangeType

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/NumRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\NumRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.
{
protected const TYPE_NAME = 'numrange';

protected function createFromString(string $value): Range
{
return NumericRange::fromString($value);
}
}
27 changes: 27 additions & 0 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range;
use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\TsRange as TsRangeValueObject;

/**
* Implementation of PostgreSQL TSRANGE type.
*
* @extends BaseRangeType<TsRangeValueObject>
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
class TsRange extends BaseRangeType

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TsRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TsRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.
{
protected const TYPE_NAME = 'tsrange';

protected function createFromString(string $value): Range
{
return TsRangeValueObject::fromString($value);
}
}
27 changes: 27 additions & 0 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range;
use MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\TstzRange as TstzRangeValueObject;

/**
* Implementation of PostgreSQL TSTZRANGE type.
*
* @extends BaseRangeType<TstzRangeValueObject>
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
class TstzRange extends BaseRangeType

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.

Check failure on line 19 in src/MartinGeorgiev/Doctrine/DBAL/Types/TstzRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Non-abstract class MartinGeorgiev\Doctrine\DBAL\Types\TstzRange contains abstract method getName() from class Doctrine\DBAL\Types\Type.
{
protected const TYPE_NAME = 'tstzrange';

protected function createFromString(string $value): Range
{
return TstzRangeValueObject::fromString($value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types\ValueObject;

/**
* Base class for PostgreSQL integer range types.
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
abstract class BaseIntegerRange extends Range

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseIntegerRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T
{
public function __construct(
?int $lower,
?int $upper,
bool $isLowerBracketInclusive = true,
bool $isUpperBracketInclusive = false,
bool $isExplicitlyEmpty = false,
) {
parent::__construct($lower, $upper, $isLowerBracketInclusive, $isUpperBracketInclusive, $isExplicitlyEmpty);
}

protected function compareBounds(mixed $a, mixed $b): int
{
return $a <=> $b;
}

protected function formatValue(mixed $value): string
{
return (string) $value;

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to string.

Check failure on line 33 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseIntegerRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Cannot cast mixed to string.
}

protected static function parseValue(string $value): int
{
$intValue = (int) $value;
if ((string) $intValue !== $value) {
throw new \InvalidArgumentException(
\sprintf('Value %s is not a valid integer', $value)
);
}

return $intValue;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types\ValueObject;

/**
* Base class for PostgreSQL timestamp range types.
*
* @since 3.3
*
* @author Martin Georgiev <martin.georgiev@gmail.com>
*/
abstract class BaseTimestampRange extends Range

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T

Check failure on line 14 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\BaseTimestampRange extends generic class MartinGeorgiev\Doctrine\DBAL\Types\ValueObject\Range but does not specify its types: T
{
public function __construct(
?\DateTimeInterface $lower,
?\DateTimeInterface $upper,
bool $isLowerBracketInclusive = true,
bool $isUpperBracketInclusive = false,
bool $isExplicitlyEmpty = false,
) {
parent::__construct($lower, $upper, $isLowerBracketInclusive, $isUpperBracketInclusive, $isExplicitlyEmpty);
}

protected function compareBounds(mixed $a, mixed $b): int
{
$timestampComparison = $a->getTimestamp() <=> $b->getTimestamp();

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.

Check failure on line 28 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method getTimestamp() on mixed.
if ($timestampComparison !== 0) {
return $timestampComparison;
}

// PHP's getTimestamp() only returns seconds, so we need to separate the microsecond comparison.
return (int) $a->format('u') <=> (int) $b->format('u');

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot cast mixed to int.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.

Check failure on line 34 in src/MartinGeorgiev/Doctrine/DBAL/Types/ValueObject/BaseTimestampRange.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Cannot call method format() on mixed.
}

protected static function parseValue(string $value): \DateTimeImmutable
{
try {
return new \DateTimeImmutable($value);
} catch (\Exception $exception) {
throw new \InvalidArgumentException(
\sprintf('Invalid timestamp value: %s. Error: %s', $value, $exception->getMessage()),
0,
$exception
);
}
}
}
Loading
Loading