Skip to content

Commit 63c7d11

Browse files
authored
Browser-Kit: Replace Client with AbstractBrowser
This has been renamed in 4.3 implementation of BrowserKit, but not updated in the docs.
1 parent 728c3b7 commit 63c7d11

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

components/browser_kit.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ Creating a Client
3939
The component only provides an abstract client and does not provide any backend
4040
ready to use for the HTTP layer.
4141

42-
To create your own client, you must extend the abstract ``Client`` class and
43-
implement the :method:`Symfony\\Component\\BrowserKit\\Client::doRequest` method.
42+
To create your own client, you must extend the abstract ``AbstractBrowser`` class and
43+
implement the :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::doRequest` method.
4444
This method accepts a request and should return a response::
4545

4646
namespace Acme;
4747

48-
use Symfony\Component\BrowserKit\Client as BaseClient;
48+
use Symfony\Component\BrowserKit\AbstractBrowser;
4949
use Symfony\Component\BrowserKit\Response;
5050

51-
class Client extends BaseClient
51+
class Client extends AbstractBrowser
5252
{
5353
protected function doRequest($request)
5454
{
@@ -67,7 +67,7 @@ provided by the :doc:`HttpKernel component </components/http_kernel>`.
6767
Making Requests
6868
~~~~~~~~~~~~~~~
6969

70-
Use the :method:`Symfony\\Component\\BrowserKit\\Client::request` method to
70+
Use the :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::request` method to
7171
make HTTP requests. The first two arguments are the HTTP method and the requested
7272
URL::
7373

@@ -81,7 +81,7 @@ The value returned by the ``request()`` method is an instance of the
8181
:doc:`DomCrawler component </components/dom_crawler>`, which allows accessing
8282
and traversing HTML elements programmatically.
8383

84-
The :method:`Symfony\\Component\\BrowserKit\\Client::xmlHttpRequest` method,
84+
The :method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::xmlHttpRequest` method,
8585
which defines the same arguments as the ``request()`` method, is a shortcut to
8686
make AJAX requests::
8787

@@ -94,7 +94,7 @@ make AJAX requests::
9494
Clicking Links
9595
~~~~~~~~~~~~~~
9696

97-
The ``Client`` object is capable of simulating link clicks. Pass the text
97+
The ``AbstractBrowser`` is capable of simulating link clicks. Pass the text
9898
content of the link and the client will perform the needed HTTP GET request to
9999
simulate the link click::
100100

@@ -117,7 +117,7 @@ provides access to the link properties (e.g. ``$link->getMethod()``,
117117
Submitting Forms
118118
~~~~~~~~~~~~~~~~
119119

120-
The ``Client`` object is also capable of submitting forms. First, select the
120+
The ``AbstractBrowser`` is also capable of submitting forms. First, select the
121121
form using any of its buttons and then override any of its properties (method,
122122
field values, etc.) before submitting it::
123123

@@ -168,7 +168,7 @@ Cookies
168168
Retrieving Cookies
169169
~~~~~~~~~~~~~~~~~~
170170

171-
The ``Client`` implementation exposes cookies (if any) through a
171+
The ``AbstractBrowser`` implementation exposes cookies (if any) through a
172172
:class:`Symfony\\Component\\BrowserKit\\CookieJar`, which allows you to store and
173173
retrieve any cookie while making requests with the client::
174174

0 commit comments

Comments
 (0)