Skip to content

Commit 769e64c

Browse files
committed
Merge branch 'AC-7723' of github.com:magento-gl/magento2ce into Hammer_Regression_Blocker_issues_19jan22
Conflicts: composer.lock dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php
2 parents 08fba0e + df748c4 commit 769e64c

File tree

4 files changed

+16
-24
lines changed

4 files changed

+16
-24
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/tests/static/framework/Magento/PhpStan/Formatters/FilteredErrorFormatter.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,7 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output): in
6666
return self::NO_ERRORS;
6767
}
6868

69-
// @phpstan-ignore-next-line
70-
$clearedAnalysisResult = new AnalysisResult(
71-
$this->clearIgnoredErrors($analysisResult->getFileSpecificErrors()),
72-
$analysisResult->getNotFileSpecificErrors(),
73-
$analysisResult->getInternalErrors(),
74-
$analysisResult->getWarnings(),
75-
$analysisResult->isDefaultLevelUsed(),
76-
$analysisResult->getProjectConfigFile(),
77-
$analysisResult->isResultCacheSaved()
78-
);
79-
80-
return $this->tableErrorFormatter->formatErrors($clearedAnalysisResult, $output);
69+
return $this->tableErrorFormatter->formatErrors($analysisResult, $output);
8170
}
8271

8372
/**

lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/FieldMetaReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function read(\GraphQL\Type\Definition\FieldDefinition $fieldMeta) : arra
128128
private function argumentMetaType(
129129
InputType $typeMeta,
130130
Argument $argumentMeta,
131-
$result
131+
array $result
132132
) : array {
133133
$argumentName = $argumentMeta->name;
134134
$result['arguments'][$argumentName] = array_merge(

lib/internal/Magento/Framework/GraphQlSchemaStitching/GraphQlReader/MetaReader/TypeMetaWrapperReader.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
namespace Magento\Framework\GraphQlSchemaStitching\GraphQlReader\MetaReader;
99

10+
use GraphQL\Type\Definition\ListOfType;
1011
use GraphQL\Type\Definition\NonNull;
12+
use GraphQL\Type\Definition\ScalarType;
13+
use GraphQL\Type\Definition\Type;
1114

1215
/**
1316
* Common cases for types that need extra formatting like wrapping or additional properties added to their definition
@@ -23,11 +26,11 @@ class TypeMetaWrapperReader
2326
/**
2427
* Read from type meta data and determine wrapping types that are needed and extra properties that need to be added
2528
*
26-
* @param \GraphQL\Type\Definition\Type $meta
29+
* @param Type $meta
2730
* @param string $parameterType Argument|OutputField|InputField
2831
* @return array
2932
*/
30-
public function read(\GraphQL\Type\Definition\Type $meta, string $parameterType) : array
33+
public function read(Type $meta, string $parameterType) : array
3134
{
3235
$result = [];
3336
if ($meta instanceof NonNull) {
@@ -36,8 +39,8 @@ public function read(\GraphQL\Type\Definition\Type $meta, string $parameterType)
3639
} else {
3740
$result['required'] = false;
3841
}
39-
if ($meta instanceof \GraphQL\Type\Definition\ListOfType) {
40-
$itemTypeMeta = $meta->getInnermostType();
42+
if ($meta instanceof ListOfType) {
43+
$itemTypeMeta = $meta->getWrappedType();
4144
if ($itemTypeMeta instanceof NonNull) {
4245
$result['itemsRequired'] = true;
4346
$itemTypeMeta = $itemTypeMeta->getWrappedType();
@@ -46,7 +49,7 @@ public function read(\GraphQL\Type\Definition\Type $meta, string $parameterType)
4649
}
4750
$itemTypeName = $itemTypeMeta->name;
4851
$result['itemType'] = $itemTypeName;
49-
if ($itemTypeMeta instanceof \GraphQL\Type\Definition\ScalarType) {
52+
if ($itemTypeMeta instanceof ScalarType) {
5053
$result['type'] = 'ScalarArray' . $parameterType;
5154
} else {
5255
$result['type'] = 'ObjectArray' . $parameterType;

0 commit comments

Comments
 (0)