Skip to content

Commit

Permalink
Merge pull request #7945 from cakephp/sphinx-8
Browse files Browse the repository at this point in the history
Upgrade to sphinx 8
  • Loading branch information
othercorey authored Nov 10, 2024
2 parents 7998a08 + 0e449f8 commit 39ef371
Show file tree
Hide file tree
Showing 127 changed files with 496 additions and 495 deletions.
4 changes: 2 additions & 2 deletions en/console-commands/option-parsers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ Building a ConsoleOptionParser from an Array
Option parsers can also be defined as arrays. Within the array, you can define
keys for ``arguments``, ``options``, ``description`` and ``epilog``. The values
for arguments, and options, should follow the format that
:php:func:`Cake\\Console\\ConsoleOptionParser::addArguments()` and
:php:func:`Cake\\Console\\ConsoleOptionParser::addOptions()` use. You can also
:php:func:`\\Cake\\Console\\ConsoleOptionParser::addArguments()` and
:php:func:`\\Cake\\Console\\ConsoleOptionParser::addOptions()` use. You can also
use ``buildFromArray`` on its own, to build an option parser::

public function getOptionParser()
Expand Down
8 changes: 4 additions & 4 deletions en/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The App Controller

As stated in the introduction, the ``AppController`` class is the parent class
to all of your application's controllers. ``AppController`` itself extends the
:php:class:`Cake\\Controller\\Controller` class included in CakePHP.
:php:class:`\\Cake\\Controller\\Controller` class included in CakePHP.
``AppController`` is defined in **src/Controller/AppController.php** as
follows::

Expand Down Expand Up @@ -77,7 +77,7 @@ Request Flow
============

When a request is made to a CakePHP application, CakePHP's
:php:class:`Cake\\Routing\\Router` and :php:class:`Cake\\Routing\\Dispatcher`
:php:class:`\\Cake\\Routing\\Router` and :php:class:`\\Cake\\Routing\\Dispatcher`
classes use :ref:`routes-configuration` to find and create the correct
controller instance. The request data is encapsulated in a request object.
CakePHP puts all of the important request information into the ``$this->request``
Expand Down Expand Up @@ -130,7 +130,7 @@ once a controller action has completed, CakePHP will handle rendering and
delivering the View.

If for some reason you'd like to skip the default behavior, you can return a
:php:class:`Cake\\Http\\Response` object from the action with the fully
:php:class:`\\Cake\\Http\\Response` object from the action with the fully
created response.

In order for you to use a controller effectively in your own application, we'll
Expand Down Expand Up @@ -548,7 +548,7 @@ methods are implemented by your controllers
Called during the ``Controller.beforeRender`` event which occurs after
controller action logic, but before the view is rendered. This callback is
not used often, but may be needed if you are calling
:php:meth:`~Cake\\Controller\\Controller::render()` manually before the end
:php:meth:`\\Cake\\Controller\\Controller::render()` manually before the end
of a given action.

.. php:method:: afterFilter(EventInterface $event)
Expand Down
4 changes: 2 additions & 2 deletions en/controllers/components/form-protection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ in your ``initialize()`` method.
your forms. In addition, you must **not** override any of the fields' "name"
attributes. The FormProtection Component looks for certain indicators that are
created and managed by the FormHelper (especially those created in
:php:meth:`~Cake\\View\\Helper\\FormHelper::create()` and
:php:meth:`~Cake\\View\\Helper\\FormHelper::end()`). Dynamically altering
:php:meth:`\\Cake\\View\\Helper\\FormHelper::create()` and
:php:meth:`\\Cake\\View\\Helper\\FormHelper::end()`). Dynamically altering
the fields that are submitted in a POST request, such as disabling, deleting
or creating new fields via JavaScript, is likely to cause the form token
validation to fail.
Expand Down
46 changes: 23 additions & 23 deletions en/controllers/request-response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Request Body Data
.. php:method:: getData($name, $default = null)
All POST data normally available through PHP's ``$_POST`` global variable can be
accessed using :php:meth:`Cake\\Http\\ServerRequest::getData()`. For example::
accessed using :php:meth:`\\Cake\\Http\\ServerRequest::getData()`. For example::

// An input with a name attribute equal to 'title' is accessible at
$title = $this->request->getData('title');
Expand All @@ -160,7 +160,7 @@ If you want to access all the data parameters you can use
File Uploads
------------

Uploaded files can be accessed through the request body data, using the :php:meth:`Cake\\Http\\ServerRequest::getData()`
Uploaded files can be accessed through the request body data, using the :php:meth:`\\Cake\\Http\\ServerRequest::getData()`
method described above. For example, a file from an input element with a name attribute of ``attachment``, can
be accessed like this::

Expand Down Expand Up @@ -195,11 +195,11 @@ origins, which makes testing file uploads possible.
.. php:method:: getUploadedFile($path)
Returns the uploaded file at a specific path. The path uses the same dot syntax as the
:php:meth:`Cake\\Http\\ServerRequest::getData()` method::
:php:meth:`\\Cake\\Http\\ServerRequest::getData()` method::

$attachment = $this->request->getUploadedFile('attachment');

Unlike :php:meth:`Cake\\Http\\ServerRequest::getData()`, :php:meth:`Cake\\Http\\ServerRequest::getUploadedFile()` would
Unlike :php:meth:`\\Cake\\Http\\ServerRequest::getData()`, :php:meth:`\\Cake\\Http\\ServerRequest::getUploadedFile()` would
only return data when an actual file upload exists for the given path, if there is regular, non-file request body data
present at the given path, then this method will return ``null``, just like it would for any non-existent path.

Expand Down Expand Up @@ -244,9 +244,9 @@ replace all possibly existing uploaded files::
.. note::

Uploaded files that have been added to the request via this method, will *not* be available in the request body
data, ie you cannot retrieve them via :php:meth:`Cake\\Http\\ServerRequest::getData()`! If you need them in the
request data (too), then you have to set them via :php:meth:`Cake\\Http\\ServerRequest::withData()` or
:php:meth:`Cake\\Http\\ServerRequest::withParsedBody()`.
data, ie you cannot retrieve them via :php:meth:`\\Cake\\Http\\ServerRequest::getData()`! If you need them in the
request data (too), then you have to set them via :php:meth:`\\Cake\\Http\\ServerRequest::withData()` or
:php:meth:`\\Cake\\Http\\ServerRequest::withParsedBody()`.

PUT, PATCH or DELETE Data
-------------------------
Expand Down Expand Up @@ -341,7 +341,7 @@ conditions, as well as inspect other application specific request criteria::
$isPost = $this->request->is('post');

You can also extend the request detectors that are available, by using
:php:meth:`Cake\\Http\\ServerRequest::addDetector()` to create new kinds of
:php:meth:`\\Cake\\Http\\ServerRequest::addDetector()` to create new kinds of
detectors. There are different types of detectors that you can create:

* Environment value comparison - Compares a value fetched from :php:func:`env()`
Expand Down Expand Up @@ -431,9 +431,9 @@ There are several built-in detectors that you can use:
'application/xml' or 'text/xml'.

``ServerRequest`` also includes methods like
:php:meth:`Cake\\Http\\ServerRequest::domain()`,
:php:meth:`Cake\\Http\\ServerRequest::subdomains()` and
:php:meth:`Cake\\Http\\ServerRequest::host()` to make applications that use
:php:meth:`\\Cake\\Http\\ServerRequest::domain()`,
:php:meth:`\\Cake\\Http\\ServerRequest::subdomains()` and
:php:meth:`\\Cake\\Http\\ServerRequest::host()` to make applications that use
subdomains simpler.

Session Data
Expand Down Expand Up @@ -602,7 +602,7 @@ Request cookies can be read through a number of methods::
// Get a CookieCollection instance
$cookies = $this->request->getCookieCollection()

See the :php:class:`Cake\\Http\\Cookie\\CookieCollection` documentation for how
See the :php:class:`\\Cake\\Http\\Cookie\\CookieCollection` documentation for how
to work with cookie collection.


Expand Down Expand Up @@ -645,7 +645,7 @@ Response

.. php:class:: Response
:php:class:`Cake\\Http\\Response` is the default response class in CakePHP.
:php:class:`\\Cake\\Http\\Response` is the default response class in CakePHP.
It encapsulates a number of features and functionality for generating HTTP
responses in your application. It also assists in testing, as it can be
mocked/stubbed allowing you to inspect headers that will be sent.
Expand All @@ -664,7 +664,7 @@ Dealing with Content Types
.. php:method:: withType($contentType = null)
You can control the Content-Type of your application's responses with
:php:meth:`Cake\\Http\\Response::withType()`. If your application needs to deal
:php:meth:`\\Cake\\Http\\Response::withType()`. If your application needs to deal
with content types that are not built into Response, you can map them with
``setTypeMap()`` as well::

Expand All @@ -686,7 +686,7 @@ Sending Files
.. php:method:: withFile(string $path, array $options = [])
There are times when you want to send files as responses for your requests.
You can accomplish that by using :php:meth:`Cake\\Http\\Response::withFile()`::
You can accomplish that by using :php:meth:`\\Cake\\Http\\Response::withFile()`::

public function sendFile($id)
{
Expand All @@ -700,8 +700,8 @@ You can accomplish that by using :php:meth:`Cake\\Http\\Response::withFile()`::
As shown in the above example, you must pass the file path to the method.
CakePHP will send a proper content type header if it's a known file type listed
in `Cake\\Http\\Response::$_mimeTypes`. You can add new types prior to calling
:php:meth:`Cake\\Http\\Response::withFile()` by using the
:php:meth:`Cake\\Http\\Response::withType()` method.
:php:meth:`\\Cake\\Http\\Response::withFile()` by using the
:php:meth:`\\Cake\\Http\\Response::withType()` method.

If you want, you can also force a file to be downloaded instead of displayed in
the browser by specifying the options::
Expand Down Expand Up @@ -749,7 +749,7 @@ Setting Headers

.. php:method:: withHeader($header, $value)
Setting headers is done with the :php:meth:`Cake\\Http\\Response::withHeader()`
Setting headers is done with the :php:meth:`\\Cake\\Http\\Response::withHeader()`
method. Like all of the PSR-7 interface methods, this method returns a *new*
instance with the new header::

Expand All @@ -767,7 +767,7 @@ Headers are not sent when set. Instead, they are held until the response is
emitted by ``Cake\Http\Server``.

You can now use the convenience method
:php:meth:`Cake\\Http\\Response::withLocation()` to directly set or get the
:php:meth:`\\Cake\\Http\\Response::withLocation()` to directly set or get the
redirect location header.

Setting the Body
Expand Down Expand Up @@ -833,7 +833,7 @@ Interacting with Browser Caching
.. php:method:: withDisabledCache()
You sometimes need to force browsers not to cache the results of a controller
action. :php:meth:`Cake\\Http\\Response::withDisabledCache()` is intended for just
action. :php:meth:`\\Cake\\Http\\Response::withDisabledCache()` is intended for just
that::

public function index()
Expand All @@ -850,7 +850,7 @@ that::
.. php:method:: withCache($since, $time = '+1 day')
You can also tell clients that you want them to cache responses. By using
:php:meth:`Cake\\Http\\Response::withCache()`::
:php:meth:`\\Cake\\Http\\Response::withCache()`::

public function index()
{
Expand Down Expand Up @@ -878,7 +878,7 @@ Rather than forcing you to code the logic for caching and for invalidating
(refreshing) it once the data has changed, HTTP uses two models, expiration and
validation, which usually are much simpler to use.

Apart from using :php:meth:`Cake\\Http\\Response::withCache()`, you can also use
Apart from using :php:meth:`\\Cake\\Http\\Response::withCache()`, you can also use
many other methods to fine-tune HTTP cache headers to take advantage of browser
or reverse proxy caching.

Expand Down Expand Up @@ -1040,7 +1040,7 @@ the response content, and sends the `304 Not Modified` header::
Setting Cookies
---------------

Cookies can be added to response using either an array or a :php:class:`Cake\\Http\\Cookie\\Cookie`
Cookies can be added to response using either an array or a :php:class:`\\Cake\\Http\\Cookie\\Cookie`
object::

use Cake\Http\Cookie\Cookie;
Expand Down
14 changes: 7 additions & 7 deletions en/core-libraries/caching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ build your own backend. The built-in caching engines are:
operations.

Regardless of the CacheEngine you choose to use, your application interacts with
:php:class:`Cake\\Cache\\Cache`.
:php:class:`\\Cake\\Cache\\Cache`.

.. _cache-configuration:

Expand Down Expand Up @@ -110,8 +110,8 @@ You can also configure Cache engines at runtime::
Cache::setConfig('other', $object);

The name of these engine configurations ('short' and 'long') are used as the ``$config``
parameter for :php:meth:`Cake\\Cache\\Cache::write()` and
:php:meth:`Cake\\Cache\\Cache::read()`. When configuring cache engines you can
parameter for :php:meth:`\\Cake\\Cache\\Cache::write()` and
:php:meth:`\\Cake\\Cache\\Cache::read()`. When configuring cache engines you can
refer to the class name using the following syntaxes::

// Short name (in App\ or Cake namespaces)
Expand Down Expand Up @@ -243,8 +243,8 @@ Removing Configured Cache Engines
.. php:staticmethod:: drop($key)
Once a configuration is created you cannot change it. Instead you should drop
the configuration and re-create it using :php:meth:`Cake\\Cache\\Cache::drop()` and
:php:meth:`Cake\\Cache\\Cache::setConfig()`. Dropping a cache engine will remove
the configuration and re-create it using :php:meth:`\\Cake\\Cache\\Cache::drop()` and
:php:meth:`\\Cake\\Cache\\Cache::setConfig()`. Dropping a cache engine will remove
the config and destroy the adapter if it was constructed.

Writing to a Cache
Expand Down Expand Up @@ -488,7 +488,7 @@ Using Cache to Store Common Query Results
You can greatly improve the performance of your application by putting results
that infrequently change, or that are subject to heavy reads into the cache.
A perfect example of this are the results from
:php:meth:`Cake\\ORM\\Table::find()`. The Query object allows you to cache
:php:meth:`\\Cake\\ORM\\Table::find()`. The Query object allows you to cache
results using the ``cache()`` method. See the :ref:`caching-query-results` section
for more information.

Expand Down Expand Up @@ -594,7 +594,7 @@ dot syntax::
// ...
]);

Custom Cache engines must extend :php:class:`Cake\\Cache\\CacheEngine` which
Custom Cache engines must extend :php:class:`\\Cake\\Cache\\CacheEngine` which
defines a number of abstract methods as well as provides a few initialization
methods.

Expand Down
2 changes: 1 addition & 1 deletion en/core-libraries/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ This last example uses ``toList()`` unlike other examples, which is important
when we're getting results with possibly duplicate keys. By using ``toList()``
we'll be guaranteed to get all values even if there are duplicate keys.

Unlike :php:meth:`Cake\\Utility\\Hash::extract()` this method only supports the
Unlike :php:meth:`\\Cake\\Utility\\Hash::extract()` this method only supports the
``{*}`` wildcard. All other wildcard and attributes matchers are not supported.

.. php:method:: combine($keyPath, $valuePath, $groupPath = null)
Expand Down
2 changes: 1 addition & 1 deletion en/core-libraries/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ In the above example we see the 3 hook methods that forms provide:

* ``_buildSchema`` is used to define the schema data that is used by FormHelper
to create an HTML form. You can define field type, length, and precision.
* ``validationDefault`` Gets a :php:class:`Cake\\Validation\\Validator` instance
* ``validationDefault`` Gets a :php:class:`\\Cake\\Validation\\Validator` instance
that you can attach validators to.
* ``_execute`` lets you define the behavior you want to happen when
``execute()`` is called and the data is valid.
Expand Down
2 changes: 1 addition & 1 deletion en/core-libraries/global-constants-and-functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ aliases for *all* functions listed below.
.. php:function:: collection(mixed $items)
Convenience wrapper for instantiating a new :php:class:`Cake\\Collection\\Collection`
Convenience wrapper for instantiating a new :php:class:`\\Cake\\Collection\\Collection`
object, wrapping the passed argument. The ``$items`` parameter takes either
a ``Traversable`` object or an array.

Expand Down
6 changes: 3 additions & 3 deletions en/core-libraries/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Logging Configuration
Configuring ``Log`` should be done during your application's bootstrap phase.
The **config/app.php** file is intended for just this. You can define
as many or as few loggers as your application needs. Loggers should be
configured using :php:class:`Cake\\Log\\Log`. An example would be::
configured using :php:class:`\\Cake\\Log\\Log`. An example would be::

use Cake\Log\Engine\FileLog;
use Cake\Log\Log;
Expand Down Expand Up @@ -97,7 +97,7 @@ Writing to Logs
===============

Writing to the log files can be done in two different ways. The first
is to use the static :php:meth:`Cake\\Log\\Log::write()` method::
is to use the static :php:meth:`\\Cake\\Log\\Log::write()` method::

Log::write('debug', 'Something did not work');

Expand All @@ -109,7 +109,7 @@ class using the ``LogTrait``. Calling ``log()`` will internally call
$this->log('Something did not work!', 'debug');

All configured log streams are written to sequentially each time
:php:meth:`Cake\\Log\\Log::write()` is called. If you have not configured any
:php:meth:`\\Cake\\Log\\Log::write()` is called. If you have not configured any
logging engines ``log()`` will return ``false`` and no log messages will be
written.

Expand Down
4 changes: 2 additions & 2 deletions en/core-libraries/number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Setting the Default Currency
.. php:method:: setDefaultCurrency($currency)
Setter for the default currency. This removes the need to always pass the
currency to :php:meth:`Cake\\I18n\\Number::currency()` and change all
currency to :php:meth:`\\Cake\\I18n\\Number::currency()` and change all
currency outputs by setting other default. If ``$currency`` is set to ``null``,
it will clear the currently stored value.

Expand Down Expand Up @@ -152,7 +152,7 @@ Formatting Percentages
| | multiplied by 100. Useful for decimal percentages. |
+---------------------+----------------------------------------------------+

Like :php:meth:`Cake\\I18n\\Number::precision()`, this method formats a number
Like :php:meth:`\\Cake\\I18n\\Number::precision()`, this method formats a number
according to the supplied precision (where numbers are rounded to meet the
given precision). This method also expresses the number as a percentage
and appends the output with a percent sign. ::
Expand Down
2 changes: 1 addition & 1 deletion en/core-libraries/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ An example use would be::

If you do not supply an HMAC salt, the value of ``Security::getSalt()`` will be used.
Encrypted values can be decrypted using
:php:meth:`Cake\\Utility\\Security::decrypt()`.
:php:meth:`\\Cake\\Utility\\Security::decrypt()`.

This method should **never** be used to store passwords.

Expand Down
2 changes: 1 addition & 1 deletion en/core-libraries/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Text class includes convenience methods for creating and manipulating
strings and is normally accessed statically. Example:
``Text::uuid()``.

If you need :php:class:`Cake\\View\\Helper\\TextHelper` functionalities outside
If you need :php:class:`\\Cake\\View\\Helper\\TextHelper` functionalities outside
of a ``View``, use the ``Text`` class::

namespace App\Controller;
Expand Down
2 changes: 1 addition & 1 deletion en/core-libraries/xml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ can be enabled with the ``loadEntities`` and ``parseHuge`` options respectively.
Transforming a XML String in Array
==================================

.. php:staticmethod:: toArray($obj);
.. php:staticmethod:: toArray($obj)
Converting XML strings into arrays is simple with the Xml class as well. By
default you'll get a SimpleXml object back::
Expand Down
4 changes: 2 additions & 2 deletions en/development/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ If ``$key`` is left null, all values in Configure will be returned.

.. php:staticmethod:: readOrFail($key)
Reads configuration data just like :php:meth:`Cake\\Core\\Configure::read`
Reads configuration data just like :php:meth:`\\Cake\\Core\\Configure::read()`
but expects to find a key/value pair. In case the requested pair does not
exist, a :php:class:`RuntimeException` will be thrown::

Expand Down Expand Up @@ -402,7 +402,7 @@ combine reading and deleting values in a single operation.

.. php:staticmethod:: consumeOrFail($key)
Consumes configuration data just like :php:meth:`Cake\\Core\\Configure::consume`
Consumes configuration data just like :php:meth:`\\Cake\\Core\\Configure::consume()`
but expects to find a key/value pair. In case the requested pair does not
exist, a :php:class:`RuntimeException` will be thrown::

Expand Down
Loading

0 comments on commit 39ef371

Please sign in to comment.