mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 04:46:04 +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] === '_') {
|
||||
Warning::warnOnce(
|
||||
'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'
|
||||
);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ class ValidationTest extends \PHPUnit_Framework_TestCase
|
||||
'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()
|
||||
|
Loading…
Reference in New Issue
Block a user