Skip to content

Commit 5b7d46c

Browse files
committed
Merge branch '5.0' into 5.1
* 5.0: The Client class has been replaced by the AbstractBrowser since SF 4.3
2 parents 045b573 + 3642db7 commit 5b7d46c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

components/browser_kit.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,17 @@ Creating a Client
3737
~~~~~~~~~~~~~~~~~
3838

3939
The component only provides an abstract client and does not provide any backend
40-
ready to use for the HTTP layer.
41-
42-
To create your own client, you must extend the abstract ``Client`` class and
43-
implement the :method:`Symfony\\Component\\BrowserKit\\Client::doRequest` method.
40+
ready to use for the HTTP layer. To create your own client, you must extend the
41+
``AbstractBrowser`` class and implement the
42+
:method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::doRequest` method.
4443
This method accepts a request and should return a response::
4544

4645
namespace Acme;
4746

48-
use Symfony\Component\BrowserKit\Client as BaseClient;
47+
use Symfony\Component\BrowserKit\AbstractBrowser;
4948
use Symfony\Component\BrowserKit\Response;
5049

51-
class Client extends BaseClient
50+
class Client extends AbstractBrowser
5251
{
5352
protected function doRequest($request)
5453
{
@@ -67,7 +66,7 @@ provided by the :doc:`HttpKernel component </components/http_kernel>`.
6766
Making Requests
6867
~~~~~~~~~~~~~~~
6968

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

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

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

0 commit comments

Comments
 (0)