Skip to content

Remove deprecations #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ UPGRADE FROM 0.13 to 0.14
- [Replace `overblog_graphql.global_variable` tag](#replace-overblog_graphqlglobal_variable-tag)
- [Replace `resolver` expression function](#replace-resolver-expression-function)
- [Rename `ResolverInterface` to `QueryInterface`](#rename-resolverinterface-to-queryinterface)
- [Remove Argument deprecated method](#remove-argument-deprecated-method)
- [Remove ConnectionBuilder deprecated class](#remove-connectionbuilder-deprecated-class)

### Customize the cursor encoder of the edges of a connection

Expand Down Expand Up @@ -199,6 +201,15 @@ Example:
}
```

### Remove Argument deprecated method

Method `Overblog\GraphQLBundle\Definition\Argument::getRawArguments` is replaced by
`Overblog\GraphQLBundle\Definition\Argument::getArrayCopy`.

### Remove ConnectionBuilder deprecated class

Class `Overblog\GraphQLBundle\Relay\Connection\Output\ConnectionBuilder` is replaced by
`Overblog\GraphQLBundle\Relay\Connection\ConnectionBuilder`.

UPGRADE FROM 0.12 to 0.13
=======================
Expand Down
20 changes: 0 additions & 20 deletions src/Definition/Argument.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

use function array_key_exists;
use function count;
use function sprintf;
use function trigger_error;
use const E_USER_DEPRECATED;

class Argument implements ArgumentInterface
{
Expand All @@ -32,23 +29,6 @@ public function getArrayCopy(): array
return $this->rawArguments;
}

/**
* @deprecated This method is deprecated since 0.12 and will be removed in 0.13. You should use getArrayCopy method instead.
*/
public function getRawArguments(): array
{
@trigger_error(
sprintf(
'This "%s" method is deprecated since 0.12 and will be removed in 0.13. You should use "%s::getArrayCopy" instead.',
__METHOD__,
__CLASS__
),
E_USER_DEPRECATED
);

return $this->getArrayCopy();
}

/**
* @param int|string $offset
*/
Expand Down
97 changes: 0 additions & 97 deletions src/Relay/Connection/Output/ConnectionBuilder.php

This file was deleted.

10 changes: 0 additions & 10 deletions tests/Definition/ArgumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,4 @@ public function testGetRawArgs(): void
{
$this->assertSame($this->rawArgs, $this->argument->getArrayCopy());
}

/**
* @group legacy
*
* @expectedDeprecation This "%s" method is deprecated since 0.12 and will be removed in 0.13. You should use "%s::getArrayCopy" instead.
*/
public function testDeprecatedGetRawArgs(): void
{
$this->assertSame($this->rawArgs, $this->argument->getRawArguments());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Mutation:
defaultValue: 'foo'
isStringNull:
type: Boolean!
resolve: "@=null === args.getRawArguments()['string']"
resolve: "@=null === args.getArrayCopy()['string']"
args:
string:
type: String
Expand All @@ -24,7 +24,7 @@ Mutation:
type: EchoInput!
isStringNullUsingInput:
type: Boolean!
resolve: "@=null === args.getRawArguments()['input']['string']"
resolve: "@=null === args.getArrayCopy()['input']['string']"
args:
input:
type: isStringNullInput!
Expand Down

This file was deleted.

43 changes: 0 additions & 43 deletions tests/Relay/Connection/Output/ConnectionBuilderTest.php

This file was deleted.