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

[BrowserKit] Rename Client to Browser #30541

Merged
merged 1 commit into from Mar 12, 2019

Conversation

Projects
None yet
5 participants
@fabpot
Copy link
Member

fabpot commented Mar 12, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Client is very generic and used in 3 places: BrowserKit, HttpKernel, and FramewrokBundle. Each Client extends another one. So, to make things clearer, I'd like to rename Client to Browser like this:

Symfony\Component\BrowerKit\Client -> AbstractBrowser
Symfony\Component\HttpKernel\Client -> HttpKernelBrowser
Symfony\Bundle\FrameworkBundle\Client -> KernelBrowser

The next PR will introduce an HttpBrowser based on the new HttpClient component :)

@nicolas-grekas nicolas-grekas changed the title Rename Client to Browser [BrowserKit] Rename Client to Browser Mar 12, 2019

@fabpot fabpot force-pushed the fabpot:client-rename branch 2 times, most recently from b5151a7 to 3a84669 Mar 12, 2019

@fabpot fabpot force-pushed the fabpot:client-rename branch from 3a84669 to dbe4f86 Mar 12, 2019

@fabpot fabpot merged commit dbe4f86 into symfony:master Mar 12, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Mar 12, 2019

feature #30541 [BrowserKit] Rename Client to Browser (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[BrowserKit] Rename Client to Browser

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

`Client` is very generic and used in 3 places: BrowserKit, HttpKernel, and FramewrokBundle. Each Client extends another one. So, to make things clearer, I'd like to rename Client to Browser like this:

Symfony\Component\BrowerKit\Client -> AbstractBrowser
Symfony\Component\HttpKernel\Client -> HttpKernelBrowser
Symfony\Bundle\FrameworkBundle\Client -> KernelBrowser

The next PR will introduce an `HttpBrowser` based on the new HttpClient component :)

Commits
-------

dbe4f86 renamed Client to Browser
*
* @param array $options An array of options to pass to the createKernel method
* @param array $server An array of server parameters
*
* @return Client A Client instance
* @return KernelBrowser A KernelBrowser instance
*/
protected static function createClient(array $options = [], array $server = [])

This comment has been minimized.

@stof

stof Mar 13, 2019

Member

should we rename that method too ?

This comment has been minimized.

@fabpot

fabpot Mar 13, 2019

Author Member

I thought about renaming methods but I think that's too much. What others think?

This comment has been minimized.

@HeahDude

HeahDude Mar 13, 2019

Member

With a hard copy pasting you could also add return type hints on methods.

@stof

This comment has been minimized.

Copy link
Member

stof commented Mar 13, 2019

This is a BC break, because the BC class Symfony\Bundle\FrameworkBundle\Client does not extend the BC class Symfony\Component\BrowerKit\Client

@stof

This comment has been minimized.

Copy link
Member

stof commented Mar 13, 2019

I think you will need to use class aliases here instead., to preserve the class hierarchy.

@fabpot fabpot deleted the fabpot:client-rename branch Mar 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.