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

[Symfony] New Rector: named services in Symfony => constructor injection #2

Merged
merged 29 commits into from
Aug 3, 2017

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jul 16, 2017

A refactor for Symfony named servces, that will turn them to typed and constructor injection.

From

public function renderAction()
{
    $this->get('some_service')->render();
    $someService = $this->get('some_service');
}

To

/** 
 * @var SomeService
 */
private $someService;

public function __construct(SomeService $someService)
{
    $this->someService = $someService;
}

public function renderAction()
{
    $this->someService->render();
    $someService = $this->someService;
}

Related Changes

@TomasVotruba TomasVotruba force-pushed the new-rector-named-services branch from 1aa4fad to 8be5151 Compare July 16, 2017 12:54
@TomasVotruba TomasVotruba force-pushed the new-rector-named-services branch from 8be5151 to e59acf0 Compare July 16, 2017 12:56
@rectorphp rectorphp deleted a comment from coveralls Jul 16, 2017
@rectorphp rectorphp deleted a comment from coveralls Jul 16, 2017
@TomasVotruba TomasVotruba force-pushed the new-rector-named-services branch from 0f7c8c5 to 3e10bdf Compare July 19, 2017 09:03
TomasVotruba added a commit that referenced this pull request Sep 8, 2020
# This is the 1st commit message:

add monorepo split for value objects function

# The commit message #2 will be skipped:

# fixup! add monorepo split for value objects function

# The commit message #3 will be skipped:

# fixup! fixup! add monorepo split for value objects function

# The commit message #4 will be skipped:

# fixup! fixup! fixup! add monorepo split for value objects function
TomasVotruba added a commit that referenced this pull request Jan 29, 2021
* move out repository

* decouple GenericTypeSpecifier, add case with specific type pass

* decouple ExtendsTemplateTypeMapFallbackFactory

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
ruudk added a commit to ruudk/rector that referenced this pull request Feb 14, 2021
# Failing Test for RenameMethodRector

Based on https://getrector.org/demo/38775b0b-7f57-4f18-97ac-b39a71fa6d78

It should detect that the old method is not public and that the new magic method `__invoke` can only be applied when public.

# The commit message rectorphp#2 will be skipped:

# xx
TomasVotruba added a commit that referenced this pull request Feb 27, 2021
* use direct call on isObjectTypes()

* make use of ObjectType over strings
TomasVotruba added a commit that referenced this pull request Mar 21, 2021
TomasVotruba added a commit that referenced this pull request May 10, 2021
a657258 cleanup CHANGELOG, is part of GitHub releases now (#2)
sabbelasichon pushed a commit to sabbelasichon/rector that referenced this pull request May 11, 2021
TomasVotruba added a commit that referenced this pull request May 16, 2021
echo511 pushed a commit to echo511/rector that referenced this pull request Sep 4, 2021
TomasVotruba added a commit that referenced this pull request Nov 2, 2021
rectorphp/rector-src@ff45ce6 Remove dead classes #2, remove unused PlatformAgnosticAssertions, remove ConsoleShowOutputFormatter (#1134)
TomasVotruba added a commit that referenced this pull request Nov 28, 2021
TomasVotruba added a commit that referenced this pull request Jul 20, 2023
TomasVotruba added a commit that referenced this pull request Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant