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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ '8.1', '8.2', '8.3', '8.4' ]
php-version: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
dependency-version: [ prefer-lowest, prefer-stable ]
steps:
-
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
],
"require": {
"php": "^8.1",
"doctrine/orm": "^3.3.0"
"doctrine/orm": "^3.5.3"
},
"require-dev": {
"doctrine/dbal": "^4.0",
"doctrine/event-manager": "^2.0",
"editorconfig-checker/editorconfig-checker": "10.6.0",
"ergebnis/composer-normalize": "2.44.0",
"ergebnis/composer-normalize": "^2.45",
"phpstan/phpstan": "2.0.1",
"phpstan/phpstan-phpunit": "2.0.0",
"phpstan/phpstan-strict-rules": "2.0.0",
Expand All @@ -23,6 +23,9 @@
"symfony/cache": "^6.4.13",
"symfony/cache-contracts": "^3.5.0"
},
"conflict": {
"doctrine/persistence": "< 3.4.1"
},
"autoload": {
"psr-4": {
"ShipMonk\\Doctrine\\Walker\\": "src/"
Expand Down
7 changes: 6 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ parameters:
ignoreErrors:
-
message: '#ShipMonk\\Doctrine\\Walker\\HintDrivenSqlWalker\:\:__construct\(\)#' # unable to replicate PHPStan bug
reportUnmatched: false # issue differs with versinos of doctrine/orm
reportUnmatched: false # issue differs with versions of doctrine/orm

-
message: '#enableNativeLazy#'
identifier: function.alreadyNarrowedType
reportUnmatched: false # issue differs with versions of doctrine/orm
15 changes: 12 additions & 3 deletions tests/HintDrivenSqlWalkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use ShipMonk\Doctrine\Walker\Handlers\CommentWholeSqlHintHandler;
use ShipMonk\Doctrine\Walker\Handlers\LowercaseSelectHintHandler;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use function method_exists;
use const PHP_VERSION_ID;

class HintDrivenSqlWalkerTest extends TestCase
{
Expand Down Expand Up @@ -150,10 +152,17 @@ public static function walksProvider(): iterable
private function createEntityManagerMock(): EntityManager
{
$config = new Configuration();
$config->setProxyNamespace('Tmp\Doctrine\Tests\Proxies');
$config->setProxyDir('/tmp/doctrine');

if (PHP_VERSION_ID >= 8_04_00 && method_exists($config, 'enableNativeLazyObjects')) {
$config->enableNativeLazyObjects(true);

} else {
$config->setProxyNamespace('Tmp\Doctrine\Tests\Proxies');
$config->setProxyDir('/tmp/doctrine');
$config->setAutoGenerateProxyClasses(false);
}

$config->setQueryCache(new ArrayAdapter());
$config->setAutoGenerateProxyClasses(false);
$config->setSecondLevelCacheEnabled(false);
$config->setMetadataDriverImpl(new AttributeDriver([__DIR__]));
$config->setNamingStrategy(new UnderscoreNamingStrategy());
Expand Down