mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-25 22:36:02 +03:00
Note about dunderscore becoming hard error in next version
This commit is contained in:
parent
3e1fc1a922
commit
c3db8de9e7
@ -354,7 +354,8 @@ class Utils
|
|||||||
if (!$isIntrospection && isset($name[1]) && $name[0] === '_' && $name[1] === '_') {
|
if (!$isIntrospection && isset($name[1]) && $name[0] === '_' && $name[1] === '_') {
|
||||||
Warning::warnOnce(
|
Warning::warnOnce(
|
||||||
'Name "'.$name.'" must not begin with "__", which is reserved by ' .
|
'Name "'.$name.'" must not begin with "__", which is reserved by ' .
|
||||||
'GraphQL introspection.',
|
'GraphQL introspection. In a future release of graphql this will ' .
|
||||||
|
'become an exception',
|
||||||
'warnAboutDunder'
|
'warnAboutDunder'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ class ValidationTest extends \PHPUnit_Framework_TestCase
|
|||||||
'name' => '__ReservedName',
|
'name' => '__ReservedName',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
], 'Name "__ReservedName" must not begin with "__", which is reserved by GraphQL introspection.');
|
], 'Name "__ReservedName" must not begin with "__", which is reserved by GraphQL introspection. In a future release of graphql this will become an exception');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRejectsAnObjectTypeWithInvalidName()
|
public function testRejectsAnObjectTypeWithInvalidName()
|
||||||
|
Loading…
Reference in New Issue
Block a user