# see: https://laravel.com/docs/5.4/upgrade
services:
    Rector\Rector\String_\StringToClassConstantRector:
        kernel.handled: ['Illuminate\Foundation\Http\Events\RequestHandled', 'class']
        locale.changed: ['Illuminate\Foundation\Events\LocaleUpdated', 'class']
        illuminate.log: ['Illuminate\Log\Events\MessageLogged', 'class']

    Rector\Rector\Class_\RenameClassRector:
        Illuminate\Console\AppNamespaceDetectorTrait: 'Illuminate\Console\DetectsApplicationNamespace'
        Illuminate\Http\Exception\HttpResponseException: 'Illuminate\Http\Exceptions\HttpResponseException'
        Illuminate\Http\Exception\PostTooLargeException: 'Illuminate\Http\Exceptions\PostTooLargeException'
        Illuminate\Foundation\Http\Middleware\VerifyPostSize: 'Illuminate\Foundation\Http\Middleware\ValidatePostSize'
        Symfony\Component\HttpFoundation\Session\SessionInterface: 'Illuminate\Contracts\Session\Session'

    Rector\Rector\MethodCall\RenameMethodRector:
        Illuminate\Support\Collection:
            every: 'nth'
        Illuminate\Database\Eloquent\Relations\BelongsToMany:
            setJoin: 'performJoin'
            getRelatedIds: 'allRelatedIds'
        Illuminate\Routing\Router:
            middleware: 'aliasMiddleware'
        Illuminate\Routing\Route:
            getPath: 'uri'
            getUri: 'uri'
            getMethods: 'methods'
            getParameter: 'parameter'
        Illuminate\Contracts\Session\Session:
            set: 'put'
            getToken: 'token'
        Illuminate\Support\Facades\Request:
            setSession: 'setLaravelSession'
        Illuminate\Http\Request:
            setSession: 'setLaravelSession'
        Illuminate\Routing\UrlGenerator:
            forceSchema: 'forceScheme'
        Illuminate\Validation\Validator:
            addError: 'addFailure'
            doReplacements: 'makeReplacements'
