Skip to content

Commit 4417191

Browse files
committed
Fix all invalid API doc links
1 parent 56dd990 commit 4417191

File tree

17 files changed

+49
-61
lines changed

17 files changed

+49
-61
lines changed

book/controller.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,7 @@ A great way to see the core functionality in action is to look in the
429429
Redirecting
430430
~~~~~~~~~~~
431431

432-
If you want to redirect the user to another page, use the
433-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::redirect`
434-
method::
432+
If you want to redirect the user to another page, use the ``redirect()`` method::
435433

436434
public function indexAction()
437435
{
@@ -750,10 +748,9 @@ Forwarding to Another Controller
750748
--------------------------------
751749

752750
Though not very common, you can also forward to another controller internally
753-
with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::forward`
754-
method. Instead of redirecting the user's browser, it makes an internal sub-request,
755-
and calls the controller. The ``forward()`` method returns the ``Response``
756-
object that's returned from *that* controller::
751+
with the ``forward()`` method. Instead of redirecting the user's browser, it
752+
makes an internal sub-request, and calls the controller. The ``forward()``
753+
method returns the ``Response`` object that's returned from *that* controller::
757754

758755
public function indexAction($name)
759756
{

book/doctrine.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,10 @@ of the bundle::
519519
.. tip::
520520

521521
This article shows working with Doctrine from within a controller by using
522-
the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::getDoctrine`
523-
method of the controller. This method is a shortcut to get the
524-
``doctrine`` service. You can work with Doctrine anywhere else
525-
by injecting that service in the service. See
526-
:doc:`/book/service_container` for more on creating your own services.
522+
the ``getDoctrine()`` method of the controller. This method is a shortcut
523+
to get the ``doctrine`` service. You can work with Doctrine anywhere else
524+
by injecting that service in the service. See :doc:`/book/service_container`
525+
for more on creating your own services.
527526

528527
Take a look at the previous example in more detail:
529528

book/http_cache.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ from your application and returning them to the client.
181181
error_log($kernel->getLog());
182182

183183
The ``AppCache`` object has a sensible default configuration, but it can be
184-
finely tuned via a set of options you can set by overriding the
185-
:method:`Symfony\\Bundle\\FrameworkBundle\\HttpCache\\HttpCache::getOptions`
184+
finely tuned via a set of options you can set by overriding the ``getOptions()``
186185
method::
187186

188187
// app/AppCache.php
@@ -627,7 +626,7 @@ doing so much work.
627626

628627
Symfony also supports weak ETags by passing ``true`` as the second
629628
argument to the
630-
:method:`Symfony\\Component\\HttpFoundation\\Response::setETag` method.
629+
:method:`Symfony\\Component\\HttpFoundation\\Response::setEtag` method.
631630

632631
.. index::
633632
single: Cache; Last-Modified header

components/config/definition.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ Numeric Node Constraints
117117
The numeric (float and integer) nodes were introduced in Symfony 2.2.
118118

119119
Numeric nodes (float and integer) provide two extra constraints -
120-
:method:`Symfony\\Component\\Config\\Definition\\Builder::min` and
121-
:method:`Symfony\\Component\\Config\\Definition\\Builder::max` -
122-
allowing to validate the value::
120+
:method:`Symfony\\Component\\Config\\Definition\\Builder\\IntegerNodeDefinition::min`
121+
and :method:`Symfony\\Component\\Config\\Definition\\Builder\\IntegerNodeDefinition::max`
122+
- allowing to validate the value::
123123

124124
$rootNode
125125
->children()

components/dom_crawler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ The crawler supports multiple ways of adding the content::
188188
.. note::
189189

190190
When dealing with character sets other than ISO-8859-1, always add HTML
191-
content using the :method:`Symfony\\Component\\DomCrawler\\Crawler::addHTMLContent`
191+
content using the :method:`Symfony\\Component\\DomCrawler\\Crawler::addHtmlContent`
192192
method where you can specify the second parameter to be your target character
193193
set.
194194

components/form/introduction.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,8 @@ Creating a simple Form
379379

380380
If you're using the Symfony Framework, then the form factory is available
381381
automatically as a service called ``form.factory``. Also, the default
382-
base controller class has a :method:`Symfony\\Bundle\\FrameworkBundle\\Controller::createFormBuilder`
383-
method, which is a shortcut to fetch the form factory and call ``createBuilder``
384-
on it.
382+
base controller class has a ``createFormBuilder()`` method, which is a
383+
shortcut to fetch the form factory and call ``createBuilder`` on it.
385384

386385
Creating a form is done via a :class:`Symfony\\Component\\Form\\FormBuilder`
387386
object, where you build and configure different fields. The form builder

components/http_foundation/session_testing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ The mock storage drivers do not read or write the system globals
2121
``session_id()`` or ``session_name()``. Methods are provided to simulate this if
2222
required:
2323

24-
* :method:`Symfony\\Component\\HttpFoundation\\Session\\SessionStorageInterface::getId`: Gets the
24+
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface::getId`: Gets the
2525
session ID.
2626

27-
* :method:`Symfony\\Component\\HttpFoundation\\Session\\SessionStorageInterface::setId`: Sets the
27+
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface::setId`: Sets the
2828
session ID.
2929

30-
* :method:`Symfony\\Component\\HttpFoundation\\Session\\SessionStorageInterface::getName`: Gets the
30+
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface::getName`: Gets the
3131
session name.
3232

33-
* :method:`Symfony\\Component\\HttpFoundation\\Session\\SessionStorageInterface::setName`: Sets the
33+
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface::setName`: Sets the
3434
session name.
3535

3636
Unit Testing

components/http_foundation/sessions.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,6 @@ has a simple API
226226
:method:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface::has`
227227
Returns true if the attribute exists.
228228

229-
:method:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface::keys`
230-
Returns an array of stored attribute keys.
231-
232229
:method:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface::replace`
233230
Sets multiple attributes at once: takes a keyed array and sets each key => value pair.
234231

components/process.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ To make your code work better on all platforms, you might want to use the
158158
method was introduced in Symfony 2.3.
159159

160160
In case you are building a binary driver, you can use the
161-
:method:`Symfony\\Component\\Process\\Process::setPrefix` method to prefix all
161+
:method:`Symfony\\Component\\Process\\ProcessBuilder::setPrefix` method to prefix all
162162
the generated process commands.
163163

164164
The following example will generate two process commands for a tar binary
@@ -194,7 +194,7 @@ timeout (in seconds)::
194194
$process->run();
195195

196196
If the timeout is reached, a
197-
:class:`Symfony\\Process\\Exception\\RuntimeException` is thrown.
197+
:class:`Symfony\\Component\\Process\\Exception\\RuntimeException` is thrown.
198198

199199
For long running commands, it is your responsibility to perform the timeout
200200
check regularly::

components/security/authentication.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Each provider (since it implements
101101
has a method :method:`Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AuthenticationProviderInterface::supports`
102102
by which the ``AuthenticationProviderManager``
103103
can determine if it supports the given token. If this is the case, the
104-
manager then calls the provider's method :class:`Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AuthenticationProviderInterface::authenticate`.
104+
manager then calls the provider's method :method:`Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AuthenticationProviderInterface::authenticate`.
105105
This method should return an authenticated token or throw an
106106
:class:`Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException`
107107
(or any other exception extending it).
@@ -204,8 +204,7 @@ own, it just needs to follow these rules:
204204
:method:`Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface::isPasswordValid`
205205
must first of all make sure the password is not too long, i.e. the password length is no longer
206206
than 4096 characters. This is for security reasons (see `CVE-2013-5750`_), and you can use the
207-
:method:`Symfony\\Component\\Security\\Core\\Encoder\\BasePasswordEncoder::isPasswordTooLong`
208-
method for this check::
207+
``isPasswordTooLong()`` method for this check::
209208

210209
use Symfony\Component\Security\Core\Encoder\BasePasswordEncoder;
211210
use Symfony\Component\Security\Core\Exception\BadCredentialsException;

components/security/authorization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Roles
177177

178178
Roles are objects that give expression to a certain right the user has.
179179
The only requirement is that they implement :class:`Symfony\\Component\\Security\\Core\\Role\\RoleInterface`,
180-
which means they should also have a :method:`Symfony\\Component\\Security\\Core\\Role\\Role\\RoleInterface::getRole`
180+
which means they should also have a :method:`Symfony\\Component\\Security\\Core\\Role\\RoleInterface::getRole`
181181
method that returns a string representation of the role itself. The default
182182
:class:`Symfony\\Component\\Security\\Core\\Role\\Role` simply returns its
183183
first constructor argument::

components/translation/custom_formats.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,11 @@ will save a few lines::
102102
}
103103
}
104104

105-
The :method:`Symfony\\Component\\Translation\\Dumper\\FileDumper::format`
106-
method creates the output string, that will be used by the
107-
:method:`Symfony\\Component\\Translation\\Dumper\\FileDumper::dump` method
108-
of the FileDumper class to create the file. The dumper can be used like any other
109-
built-in dumper. In the following example, the translation messages defined in the
110-
YAML file are dumped into a text file with the custom format::
105+
The ``format()`` method creates the output string, that will be used by the
106+
:method:`Symfony\\Component\\Translation\\Dumper\\FileDumper::dump` method of
107+
the FileDumper class to create the file. The dumper can be used like any other
108+
built-in dumper. In the following example, the translation messages defined in
109+
the YAML file are dumped into a text file with the custom format::
111110

112111
use Symfony\Component\Translation\Loader\YamlFileLoader;
113112

cookbook/bundles/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ In order to use the schema, the XML configuration file must provide an
353353
``xsi:schemaLocation`` attribute pointing to the XSD file for a certain XML
354354
namespace. This location always starts with the XML namespace. This XML
355355
namespace is then replaced with the XSD validation base path returned from
356-
:method:`Extension::getXsdValidationBasePath() <Symfony\\Component\\DependencyInjection\\ExtensionInterface::getXsdValidationBasePath>`
356+
:method:`Extension::getXsdValidationBasePath() <Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface::getXsdValidationBasePath>`
357357
method. This namespace is then followed by the rest of the path from the base
358358
path to the file itself.
359359

cookbook/controller/service.rst

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -240,22 +240,22 @@ Base Controller Methods and Their Service Replacements
240240
This list explains how to replace the convenience methods of the base
241241
controller:
242242

243-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::createForm` (service: ``form.factory``)
243+
``createForm()`` (service: ``form.factory``)
244244
.. code-block:: php
245245
246246
$formFactory->create($type, $data, $options);
247247
248-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::createFormBuilder` (service: ``form.factory``)
248+
``createFormBuilder()`` (service: ``form.factory``)
249249
.. code-block:: php
250250
251251
$formFactory->createBuilder('form', $data, $options);
252252
253-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::createNotFoundException`
253+
``createNotFoundException()``
254254
.. code-block:: php
255255
256256
new NotFoundHttpException($message, $previous);
257257
258-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::forward` (service: ``http_kernel``)
258+
``forward()`` (service: ``http_kernel``)
259259
.. code-block:: php
260260
261261
use Symfony\Component\HttpKernel\HttpKernelInterface;
@@ -266,16 +266,15 @@ controller:
266266
$subRequest = $request->duplicate($query, null, $attributes);
267267
$httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
268268
269-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::generateUrl` (service: ``router``)
269+
``generateUrl()`` (service: ``router``)
270270
.. code-block:: php
271271
272272
$router->generate($route, $params, $absolute);
273273
274-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::getDoctrine` (service: ``doctrine``)
275-
274+
``getDoctrine()`` (service: ``doctrine``)
276275
*Simply inject doctrine instead of fetching it from the container*
277276

278-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::getUser` (service: ``security.context``)
277+
``getUser()`` (service: ``security.context``)
279278
.. code-block:: php
280279
281280
$user = null;
@@ -284,29 +283,29 @@ controller:
284283
$user = $token->getUser();
285284
}
286285
287-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::isGranted` (service: ``security.context``)
286+
``isGranted()`` (service: ``security.context``)
288287
.. code-block:: php
289288
290289
$securityContext->isGranted($attributes, $object);
291290
292-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::redirect`
291+
``redirect()``
293292
.. code-block:: php
294293
295294
use Symfony\Component\HttpFoundation\RedirectResponse;
296295
297296
return new RedirectResponse($url, $status);
298297
299-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::render` (service: ``templating``)
298+
``render()`` (service: ``templating``)
300299
.. code-block:: php
301300
302301
$templating->renderResponse($view, $parameters, $response);
303302
304-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::renderView` (service: ``templating``)
303+
``renderView()`` (service: ``templating``)
305304
.. code-block:: php
306305
307306
$templating->render($view, $parameters);
308307
309-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::stream` (service: ``templating``)
308+
``stream()`` (service: ``templating``)
310309
.. code-block:: php
311310
312311
use Symfony\Component\HttpFoundation\StreamedResponse;
@@ -324,7 +323,6 @@ controller:
324323
controller action method called ``Request $request``. The order of the
325324
parameters is not important, but the typehint must be provided.
326325

327-
328326
.. _`Controller class source code`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
329327
.. _`base Controller class`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
330328
.. _`FrameworkExtraBundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html

cookbook/controller/upload_file.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ There are some important things to consider in the code of the above controller:
156156
provides methods for the most common operations when dealing with uploaded files.
157157
#. A well-known security best practice is to never trust the input provided by
158158
users. This also applies to the files uploaded by your visitors. The ``Uploaded``
159-
class provides methods to get the original file extension (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getExtension`),
160-
the original file size (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getSize`)
159+
class provides methods to get the original file extension
160+
(:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getExtension`),
161+
the original file size (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientSize`)
161162
and the original file name (:method:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile::getClientOriginalName`).
162163
However, they are considered *not safe* because a malicious user could tamper
163164
that information. That's why it's always better to generate a unique name and

cookbook/routing/redirect_in_config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Redirecting Using a Path
1717

1818
Assume there is no default controller for the ``/`` path of your application
1919
and you want to redirect these requests to ``/app``. You will need to use the
20-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirect`
20+
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::urlRedirectAction`
2121
action to redirect to this new url:
2222

2323
.. configuration-block::
@@ -97,7 +97,7 @@ Redirecting Using a Route
9797
Assume you are migrating your website from WordPress to Symfony, you want to
9898
redirect ``/wp-admin`` to the route ``sonata_admin_dashboard``. You don't know
9999
the path, only the route name. This can be achieved using the
100-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::redirect`
100+
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController::redirectAction`
101101
action:
102102

103103
.. configuration-block::

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ instance), the host might have been manipulated by an attacker.
311311
You can read "`HTTP Host header attacks`_" for more information about
312312
these kinds of attacks.
313313

314-
The Symfony :method:`Request::getHost() <Symfony\\Component\\HttpFoundation\\Request:getHost>`
314+
The Symfony :method:`Request::getHost() <Symfony\\Component\\HttpFoundation\\Request::getHost>`
315315
method might be vulnerable to some of these attacks because it depends on
316316
the configuration of your web server. One simple solution to avoid these
317317
attacks is to whitelist the hosts that your Symfony application can respond

0 commit comments

Comments
 (0)