Skip to content

Commit cfe61b3

Browse files
committed
Merge 3.4
2 parents e1c7800 + 98aefdb commit cfe61b3

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.github/workflows/guides.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ jobs:
4343
- name: Install project dependencies
4444
working-directory: docs
4545
run: |
46-
composer update --no-interaction --no-progress --ansi
47-
cp -r ../src ./vendor/api-platform/core/
46+
composer global require soyuka/pmu
47+
composer global config allow-plugins.soyuka/pmu true --no-interaction
48+
composer global link ..
4849
- name: Test guides
4950
working-directory: docs
5051
env:

docs/composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
}
1616
],
1717
"require": {
18-
"api-platform/core": "dev-main",
18+
"api-platform/symfony": "^3.4 || ^4.0",
19+
"api-platform/doctrine-orm": "^3.4 || ^4.0",
1920
"symfony/expression-language": "^7.0",
2021
"nelmio/cors-bundle": "^2.2",
2122
"phpstan/phpdoc-parser": "^1.15",
@@ -34,8 +35,7 @@
3435
"zenstruck/foundry": "^1.31",
3536
"symfony/http-client": "^7.0",
3637
"symfony/browser-kit": "^7.0",
37-
"justinrainbow/json-schema": "^5.2",
38-
"webonyx/graphql-php": "^15.11"
38+
"justinrainbow/json-schema": "^5.2"
3939
},
4040
"config": {
4141
"allow-plugins": {

src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use ApiPlatform\Doctrine\Orm\State\LinksHandlerInterface as OrmLinksHandlerInterface;
2626
use ApiPlatform\Elasticsearch\Extension\RequestBodySearchCollectionExtensionInterface;
2727
use ApiPlatform\GraphQl\Error\ErrorHandlerInterface;
28+
use ApiPlatform\GraphQl\Executor;
2829
use ApiPlatform\GraphQl\Resolver\MutationResolverInterface;
2930
use ApiPlatform\GraphQl\Resolver\QueryCollectionResolverInterface;
3031
use ApiPlatform\GraphQl\Resolver\QueryItemResolverInterface;
@@ -561,7 +562,6 @@ private function registerJsonProblemConfiguration(array $errorFormats, XmlFileLo
561562
private function registerGraphQlConfiguration(ContainerBuilder $container, array $config, XmlFileLoader $loader): void
562563
{
563564
$enabled = $this->isConfigEnabled($container, $config['graphql']);
564-
565565
$graphqlIntrospectionEnabled = $enabled && $this->isConfigEnabled($container, $config['graphql']['introspection']);
566566

567567
$graphiqlEnabled = $enabled && $this->isConfigEnabled($container, $config['graphql']['graphiql']);
@@ -580,6 +580,10 @@ private function registerGraphQlConfiguration(ContainerBuilder $container, array
580580
return;
581581
}
582582

583+
if (!class_exists(Executor::class)) {
584+
throw new \RuntimeException('Graphql is enabled but not installed, run: composer require "api-platform/graphql".');
585+
}
586+
583587
$container->setParameter('api_platform.graphql.default_ide', $config['graphql']['default_ide']);
584588
$container->setParameter('api_platform.graphql.nesting_separator', $config['graphql']['nesting_separator']);
585589

src/Symfony/composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"symfony/property-info": "^6.4 || ^7.1",
4343
"symfony/property-access": "^6.4 || ^7.1",
4444
"symfony/serializer": "^6.4 || ^7.1",
45-
"symfony/security-core": "^6.4 || ^7.0"
45+
"symfony/security-core": "^6.4 || ^7.0",
46+
"willdurand/negotiation": "^3.0"
4647
},
4748
"require-dev": {
4849
"phpspec/prophecy-phpunit": "^2.2",

0 commit comments

Comments
 (0)