Skip to content

Commit

Permalink
fix: minimum dependencies
Browse files Browse the repository at this point in the history
upd: remove unwanted SQL test
  • Loading branch information
j-schumann committed May 11, 2024
1 parent 0c597de commit 101b873
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"symfony/yaml": "^7.0.0"
},
"require-dev": {
"api-platform/core": "^3.2.19",
"doctrine/doctrine-bundle": "^2.8.0",
"api-platform/core": "^3.3.0",
"doctrine/doctrine-bundle": "^2.12.0",
"doctrine/data-fixtures": "^1.5.3",
"doctrine/persistence": "^3.1.0",
"doctrine/doctrine-fixtures-bundle": "^3.5.1",
"doctrine/orm": "^3.0.0",
"friendsofphp/php-cs-fixer": "^3.52.1",
"friendsofphp/php-cs-fixer": "^3.56.1",
"monolog/monolog": "^3.0.0",
"phpunit/phpunit": "^11.0.9",
"phpunit/phpunit": "^11.1.3",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "^7.0.0",
"symfony/http-client": "^7.0.0",
Expand Down
8 changes: 1 addition & 7 deletions tests/Filter/JsonExistsFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function testApplyFilter(): void
$filter = new JsonExistsFilter($doctrine, null, ['jsonColumn' => null], null);
$doctrine = static::getContainer()->get('doctrine');
$queryNameGen = new QueryNameGenerator();

/** @var QueryBuilder $qb */
$qb = $doctrine->getManager()->getRepository(TestEntity::class)
->createQueryBuilder('o');
Expand All @@ -59,12 +60,5 @@ public function testApplyFilter(): void
'WHERE JSON_CONTAINS_TEXT(o.jsonColumn, :jsonColumn_p1) = true',
(string) $qb
);

// @todo this should not be necessary, that JSON_CONTAINS_TEXT results in the
// correct SQL should be tested in vrok/doctrine-addons:
$this->assertStringContainsString(
'WHERE (t0_.jsonColumn ?? ?) = true',
$qb->getQuery()->getSQL()
);
}
}
3 changes: 3 additions & 0 deletions tests/Fixtures/app/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ doctrine:

orm:
auto_generate_proxy_classes: '%kernel.debug%'
controller_resolver:
auto_mapping: false
enable_lazy_ghost_objects: true
mappings:
Fixtures:
Expand All @@ -64,6 +66,7 @@ doctrine:

api_platform:
keep_legacy_inflector: false
use_symfony_listeners: false
formats:
json: [ 'application/json' ]
jsonld: [ 'application/ld+json' ]
Expand Down

0 comments on commit 101b873

Please sign in to comment.