Skip to content

Commit f1c1674

Browse files
committed
Update links in README.md and fix phpstan error
1 parent 6192522 commit f1c1674

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This Symfony bundle provides integration of [GraphQL](https://facebook.github.io
1313
and [GraphQL Relay](https://facebook.github.io/relay/docs/en/graphql-server-specification.html).
1414
It also supports:
1515
* batching with [ReactRelayNetworkLayer](https://github.com/nodkz/react-relay-network-layer)
16-
* batching with [Apollo GraphQL](https://www.apollographql.com/docs/react/networking/network-layer/#query-batching)
16+
* batching with [Apollo GraphQL](https://www.apollographql.com/docs/react/api/link/apollo-link-batch-http/)
1717
* upload and batching upload with [apollo-upload-client](https://github.com/jaydenseric/apollo-upload-client)
1818

1919
Browse your version documentation:
@@ -101,7 +101,7 @@ Talks and slides to help you start
101101
- [Video at SymfonyCamp UA 2017](https://www.youtube.com/watch?v=jyoYlnCPNgk) `English`
102102
- [Video at DPC 2017](https://www.youtube.com/watch?v=E7MjoCOGSSY) `English`
103103
* A GraphQL API: From hype to production *by Aurélien David* - [Twitter](https://twitter.com/spyl94), [GitHub](https://github.com/spyl94)
104-
- [Slides at https://spyl.net/slides/symfonycon-cluj-2017](https://spyl.net/slides/symfonycon-cluj-2017) `English`
104+
- [Slides at https://cap-collectif.slides.com/spyl/web2day-2019](https://cap-collectif.slides.com/spyl/web2day-2019) `English`
105105
* Une API GraphQL: du hype à la prod *by Aurélien David* - [Twitter](https://twitter.com/spyl94), [GitHub](https://github.com/spyl94)
106106
- [Video at PHPTour 2017 Nantes](https://www.youtube.com/watch?v=xbipW6fgD6c) `French`
107107
* Introduction to Symfony Flex and setting up OverblogGraphQLBundle with it *by Renato Mendes Figueiredo* - [Twitter](https://twitter.com/renatomefi), [GitHub](https://github.com/renatomefi)

src/DependencyInjection/Compiler/TypeGeneratorPass.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,23 @@ class TypeGeneratorPass implements CompilerPassInterface
2121
*/
2222
public function process(ContainerBuilder $container): void
2323
{
24-
// @phpstan-ignore-next-line
24+
/**
25+
* @var array<class-string, string> $generatedClasses
26+
* @phpstan-ignore-next-line
27+
*/
2528
$generatedClasses = $container->get('overblog_graphql.cache_compiler')
2629
->compile(TypeGenerator::MODE_MAPPING_ONLY);
2730

2831
foreach ($generatedClasses as $class => $file) {
29-
$alias = preg_replace('/Type$/', '', substr(strrchr($class, '\\'), 1));
32+
$portion = strrchr($class, '\\');
33+
34+
if (false !== $portion) {
35+
$portion = substr($portion, 1);
36+
} else {
37+
$portion = $class;
38+
}
39+
40+
$alias = preg_replace('/Type$/', '', $portion);
3041
$this->setTypeServiceDefinition($container, $class, $alias);
3142
}
3243
}

0 commit comments

Comments
 (0)