Skip to content

Commit 70062fd

Browse files
PierreRebeilleausoyuka
authored andcommitted
chore(validation): api-platform/validator (api-platform#5529)
1 parent 320b268 commit 70062fd

File tree

7 files changed

+89
-3
lines changed

7 files changed

+89
-3
lines changed

src/Doctrine/Orm/Extension/FilterEagerLoadingExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
namespace ApiPlatform\Doctrine\Orm\Extension;
1515

16-
use ApiPlatform\Api\ResourceClassResolverInterface;
1716
use ApiPlatform\Doctrine\Orm\Util\QueryBuilderHelper;
1817
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
1918
use ApiPlatform\Exception\InvalidArgumentException;
2019
use ApiPlatform\Metadata\Operation;
20+
use ApiPlatform\Metadata\ResourceClassResolverInterface;
2121
use Doctrine\ORM\EntityManagerInterface;
2222
use Doctrine\ORM\Mapping\ClassMetadataInfo;
2323
use Doctrine\ORM\Query\Expr\Join;

src/Validator/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/composer.lock
2+
/vendor
3+
/.phpunit.result.cache

src/Validator/Exception/ValidationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace ApiPlatform\Validator\Exception;
1515

16-
use ApiPlatform\Exception\RuntimeException;
16+
use ApiPlatform\Metadata\Exception\RuntimeException;
1717

1818
/**
1919
* Thrown when a validation error occurs.

src/Validator/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT license
2+
3+
Copyright (c) 2015-present Kévin Dunglas
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is furnished
10+
to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

src/Validator/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# API Platform - Validator
2+
3+
Validator component from API Platform

src/Validator/composer.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "api-platform/validator",
3+
"description": "API Platform validator component",
4+
"type": "library",
5+
"keywords": [
6+
"Validator",
7+
"API"
8+
],
9+
"homepage": "https://api-platform.com",
10+
"license": "MIT",
11+
"authors": [
12+
{
13+
"name": "Kévin Dunglas",
14+
"email": "[email protected]",
15+
"homepage": "https://dunglas.fr"
16+
},
17+
{
18+
"name": "API Platform Community",
19+
"homepage": "https://api-platform.com/community/contributors"
20+
}
21+
],
22+
"require": {
23+
"php": ">=8.1",
24+
"api-platform/metadata": "*@dev || ^3.1"
25+
},
26+
"require-dev": {
27+
"phpspec/prophecy-phpunit": "^2.0",
28+
"symfony/phpunit-bridge": "^6.1"
29+
},
30+
"autoload": {
31+
"psr-4": {
32+
"ApiPlatform\\Validator\\": ""
33+
}
34+
},
35+
"config": {
36+
"preferred-install": {
37+
"*": "dist"
38+
},
39+
"sort-packages": true,
40+
"allow-plugins": {
41+
"composer/package-versions-deprecated": true,
42+
"phpstan/extension-installer": true
43+
}
44+
},
45+
"extra": {
46+
"branch-alias": {
47+
"dev-main": "3.2.x-dev"
48+
},
49+
"symfony": {
50+
"require": "^6.1"
51+
}
52+
},
53+
"repositories": [
54+
{
55+
"type": "path",
56+
"url": "../Metadata"
57+
}
58+
]
59+
}

tests/Doctrine/Orm/Extension/FilterEagerLoadingExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
namespace ApiPlatform\Tests\Doctrine\Orm\Extension;
1515

16-
use ApiPlatform\Api\ResourceClassResolver;
1716
use ApiPlatform\Doctrine\Orm\Extension\FilterEagerLoadingExtension;
1817
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
1918
use ApiPlatform\Metadata\Get;
2019
use ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface;
2120
use ApiPlatform\Metadata\Resource\ResourceNameCollection;
21+
use ApiPlatform\Metadata\ResourceClassResolver;
2222
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\CompositeItem;
2323
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\CompositeLabel;
2424
use ApiPlatform\Tests\Fixtures\TestBundle\Entity\CompositeRelation;

0 commit comments

Comments
 (0)