Skip to content
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

[DX] make all configure() methods accept direct value object configuration #1322

Merged
merged 2 commits into from
Nov 27, 2021

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Nov 27, 2021

Follow up to #1285 and #1276

This enables much simpler configuration on classes using single value to input:

Before

    $services->set(AddReturnTypeDeclarationRector::class)
        ->call('configure', [[
            AddReturnTypeDeclarationRector::METHOD_RETURN_TYPES => ValueObjectInliner::inline([
                new AddReturnTypeDeclaration(PHPUnitTestCase::class, 'tearDown', new VoidType()),
            ]),
        ]]);

Now

    $services->set(AddReturnTypeDeclarationRector::class)
        ->configure([
            new AddReturnTypeDeclaration(PHPUnitTestCase::class, 'tearDown', new VoidType())
        ]);

@TomasVotruba TomasVotruba changed the title tv configurable dual [DX] make all configure() methods accept direct value object configuration Nov 27, 2021
@TomasVotruba TomasVotruba force-pushed the tv-configurable-dual branch 3 times, most recently from 8dbb795 to f1cacf6 Compare November 27, 2021 13:14
@TomasVotruba TomasVotruba enabled auto-merge (squash) November 27, 2021 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant