rector/config/level/guzzle/guzzle50.yml

28 lines
1.1 KiB
YAML

parameters:
classes_to_defluent:
- 'GuzzleHttp\Collection'
- 'GuzzleHttp\Url'
- 'GuzzleHttp\Query'
- 'GuzzleHttp\Post\PostBody'
- 'GuzzleHttp\Cookie\SetCookie'
services:
# both uses "%classes_to_defluent%
# covers https://github.com/guzzle/guzzle/commit/668209c895049759377593eed129e0949d9565b7#diff-810cdcfdd8a6b9e1fc0d1e96d7786874
Rector\Rector\MethodBody\ReturnThisRemoveRector: ~
Rector\Rector\MethodBody\FluentReplaceRector: ~
Rector\Rector\Function_\FunctionToMethodCallRector:
'GuzzleHttp\json_decode': ['GuzzleHttp\Utils', 'jsonDecode']
'GuzzleHttp\get_path': ['GuzzleHttp\Utils', 'getPath']
Rector\Rector\StaticCall\StaticCallToFunctionRector:
'GuzzleHttp\Utils':
setPath: 'GuzzleHttp\set_path'
'GuzzleHttp\Pool':
batch: 'GuzzleHttp\Pool\batch'
Rector\Guzzle\Rector\FuncCall\MessageAsArrayRector: ~
Rector\Rector\MethodCall\MethodNameReplacerRector:
GuzzleHttp\Message\MessageInterface:
getHeaderLines: 'getHeaderAsArray'