Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd56e303

Browse files
committed
minor#13550 [Browserkit] The Client class has been replaced by the AbstractBrowser since SF 4.3 (Calex92)
This PR was merged into the 4.4 branch.Discussion----------[Browserkit] The Client class has been replaced by the AbstractBrowser since SF 4.3I noticed that in the BrowserKit documentation, there was multiple references to the old ``Symfony\Component\BrowserKit\Client`` class instead of the ``Symfony\Component\BrowserKit\AbstractBrowser`` one.See [https://github.com/symfony/symfony/pull/30541](https://github.com/symfony/symfony/pull/30541)There was a previous merge request for SF5 here (#12717), but I don't know if it was possible for me to use it since I'm quite new with Github best practice about contribution.Don't hesitate to tell me if I'm wrong!Commits-------a3ff4e0 The Client class has been replaced by the AbstractBrowser since SF 4.3
2 parentsf4577d1 +a3ff4e0 commitd56e303

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎components/browser_kit.rst‎

Lines changed: 6 additions & 6 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 theabstract ``Client`` class and
43-
implement the:method:`Symfony\\Component\\BrowserKit\\Client::doRequest` method.
42+
To create your own client, you must extend the``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 extendsBaseClient
51+
class Client extendsAbstractBrowser
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

‎testing.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ script::
484484
AJAX Requests
485485
~~~~~~~~~~~~~
486486

487-
The Client provides a:method:`Symfony\\Component\\BrowserKit\\Client::xmlHttpRequest`
487+
The Client provides a:method:`Symfony\\Component\\BrowserKit\\AbstractBrowser::xmlHttpRequest`
488488
method, which has the same arguments as the ``request()`` method, and it's a
489489
shortcut to make AJAX requests::
490490

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp