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

[Rector] Add ImplementsFactoryInterfaceToPsrFactoryRector #35

Merged
merged 35 commits into from
Feb 17, 2022

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Oct 18, 2021

Q A
New Feature yes

Description

Adding ImplementsFactoryInterfaceToPsrFactoryRector to change class implements FactoryInterface with has __invoke() method to Psr Factory.

Part of #34

Todo:

  • test
  • doc

@Ocramius
Copy link
Member

Is there a way to have a before -> after integration test for this?

@samsonasik
Copy link
Member Author

samsonasik commented Oct 18, 2021

I will add test for it under Fixture for before -> after like this https://github.com/laminas/laminas-servicemanager-migration/blob/0.1.x/test/Rector/RenameClassRector/Fixture/factory_invoke_typehint.php.inc

@samsonasik
Copy link
Member Author

@Ocramius this is the sample test b6971b1

@samsonasik samsonasik force-pushed the add-servicelocator-to-psr-factory branch 2 times, most recently from bfc651f to 76d9020 Compare October 18, 2021 15:17
@samsonasik samsonasik changed the title [Rector] Add ImplementsAbstractFactoryToPsrFactoryRector [Rector] Add ImplementsFactoryInterfaceToToPsrFactoryRector Oct 18, 2021
@samsonasik samsonasik changed the title [Rector] Add ImplementsFactoryInterfaceToToPsrFactoryRector [Rector] Add ImplementsFactoryInterfaceToPsrFactoryRector Oct 18, 2021
@samsonasik samsonasik force-pushed the add-servicelocator-to-psr-factory branch from 862aa4b to 2a69bc0 Compare October 18, 2021 19:15
@samsonasik samsonasik force-pushed the add-servicelocator-to-psr-factory branch 2 times, most recently from 71390be to ed801de Compare October 20, 2021 08:34
@samsonasik
Copy link
Member Author

@froschdesign I added functionality to remove use Interop\Container\ContainerInterface and rely to auto import to import Psr\Container\ContainerInterface when auto import enabled, I will clean up the code next ed801de

@samsonasik samsonasik force-pushed the add-servicelocator-to-psr-factory branch 4 times, most recently from b5f5cac to 8251d97 Compare October 23, 2021 20:09
@samsonasik samsonasik changed the base branch from 0.1.x to 0.2.x December 11, 2021 03:13
@samsonasik samsonasik force-pushed the add-servicelocator-to-psr-factory branch 2 times, most recently from 70448a7 to 610a1b6 Compare December 11, 2021 03:18
@samsonasik samsonasik force-pushed the add-servicelocator-to-psr-factory branch 3 times, most recently from 5b7a773 to 49dc7c4 Compare February 9, 2022 22:32
@samsonasik
Copy link
Member Author

@froschdesign I've added documentation

@samsonasik
Copy link
Member Author

All green 🎉

@samsonasik samsonasik added this to the 0.2.0 milestone Feb 10, 2022
samsonasik and others added 23 commits February 17, 2022 18:48
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
…ontainer.md

Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
…ontainer.md

Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
…ontainer.md

Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
…ontainer.md

Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
…ontainer.md

Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
…ontainer.md

Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Abdul Malik Ikhsan <[email protected]>
@samsonasik samsonasik force-pushed the add-servicelocator-to-psr-factory branch from 16129e3 to cffa349 Compare February 17, 2022 11:48
@samsonasik
Copy link
Member Author

Thank you @froschdesign @Ocramius for the review.

I am merging it and will create 0.2.0 release for it

@samsonasik samsonasik merged commit d35f9c5 into 0.2.x Feb 17, 2022
@samsonasik samsonasik deleted the add-servicelocator-to-psr-factory branch February 17, 2022 12:08
@froschdesign
Copy link
Member

…will create 0.2.0 release for it

Then we can see if #32 has also been solved.

@samsonasik
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants