Skip to content

Commit 54871a4

Browse files
authored
Merge pull request #7009 from kenjis/fix-docs-add-deprecated
docs: add deprecated directives
2 parents 7cd8519 + 2c63441 commit 54871a4

4 files changed

Lines changed: 24 additions & 16 deletions

File tree

user_guide_src/source/database/query_builder.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,9 @@ Class Reference
17991799

18001800
.. php:method:: setInsertBatch($key[, $value = ''[, $escape = null]])
18011801
1802+
.. deprecated:: 4.3.0
1803+
Use :php:meth:`CodeIgniter\\Database\\BaseBuilder::setData()` instead.
1804+
18021805
:param mixed $key: Field name or an array of field/value pairs
18031806
:param string $value: Field value, if $key is a single field
18041807
:param bool $escape: Whether to escape values
@@ -1866,40 +1869,43 @@ Class Reference
18661869

18671870
.. php:method:: updateFields($set, [$addToDefault = false, [$ignore = null]])
18681871
1872+
.. versionadded:: 4.3.0
1873+
18691874
:param mixed $set: Row of columns or array of rows, a row is an array or object
18701875
:param bool $addToDefault: Adds an additional column than those in dataset
18711876
:param bool $ignore: An array of columns to ignore from those in $set
18721877
:returns: ``BaseBuilder`` instance (method chaining)
18731878
:rtype: ``BaseBuilder``
18741879

1875-
.. versionadded:: 4.3.0
1876-
18771880
Used with ``updateBatch()`` and ``upsertBatch()`` methods. This defines the fields which will be updated.
18781881

18791882
.. php:method:: onConstraint($set)
18801883
1884+
.. versionadded:: 4.3.0
1885+
18811886
:param mixed $set: A set of fields or field used has keys or constraints
18821887
:returns: ``BaseBuilder`` instance (method chaining)
18831888
:rtype: ``BaseBuilder``
18841889

1885-
.. versionadded:: 4.3.0
1886-
18871890
Used with ``updateBatch()`` and ``upsertBatch()`` methods. This takes a comma delimited string of columns, and array, associative array, or RawSql.
18881891

18891892
.. php:method:: setData($set, [$escape = null, [$alias = '']])
18901893
1894+
.. versionadded:: 4.3.0
1895+
18911896
:param mixed $set: Row of columns or array of rows, a row is an array or object
18921897
:param bool $escape: Whether to escape values
18931898
:param bool $alias: A table alias for dataset
18941899
:returns: ``BaseBuilder`` instance (method chaining)
18951900
:rtype: ``BaseBuilder``
18961901

1897-
.. versionadded:: 4.3.0
1898-
18991902
Used for ``*Batch()`` methods to set data for insert, update, upsert.
19001903

19011904
.. php:method:: setUpdateBatch($key[, $value = ''[, $escape = null]])
19021905
1906+
.. deprecated:: 4.3.0
1907+
Use :php:meth:`CodeIgniter\\Database\\BaseBuilder::setData()` instead.
1908+
19031909
:param mixed $key: Field name or an array of field/value pairs
19041910
:param string $value: Field value, if $key is a single field
19051911
:param bool $escape: Whether to escape values

user_guide_src/source/general/common_functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,20 +349,20 @@ Miscellaneous Functions
349349

350350
.. php:function:: request()
351351
352+
.. versionadded:: 4.3.0
353+
352354
:returns: The shared Request object.
353355
:rtype: IncomingRequest|CLIRequest
354356

355-
.. versionadded:: 4.3.0
356-
357357
This function is a wrapper for ``Services::request()``.
358358

359359
.. php:function:: response()
360360
361+
.. versionadded:: 4.3.0
362+
361363
:returns: The shared Response object.
362364
:rtype: Response
363365

364-
.. versionadded:: 4.3.0
365-
366366
This function is a wrapper for ``Services::response()``.
367367

368368
.. php:function:: route_to($method[, ...$params])

user_guide_src/source/helpers/form_helper.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,11 @@ The following functions are available:
521521

522522
.. php:function:: validation_errors()
523523
524+
.. versionadded:: 4.3.0
525+
524526
:returns: The validation errors
525527
:rtype: array
526528

527-
.. versionadded:: 4.3.0
528-
529529
Returns the validation errors. First, this function checks the validation errors
530530
that are stored in the session. To store the errors in the session, you need to use ``withInput()`` with :php:func:`redirect() <redirect>`.
531531

@@ -538,12 +538,12 @@ The following functions are available:
538538

539539
.. php:function:: validation_list_errors($template = 'list')
540540
541+
.. versionadded:: 4.3.0
542+
541543
:param string $template: Validation template name
542544
:returns: Rendered HTML of the validation errors
543545
:rtype: string
544546

545-
.. versionadded:: 4.3.0
546-
547547
Returns the rendered HTML of the validation errors.
548548

549549
The parameter ``$template`` is a Validation template name.
@@ -557,13 +557,13 @@ The following functions are available:
557557

558558
.. php:function:: validation_show_error($field, $template = 'single')
559559
560+
.. versionadded:: 4.3.0
561+
560562
:param string $field: Field name
561563
:param string $template: Validation template name
562564
:returns: Rendered HTML of the validation error
563565
:rtype: string
564566

565-
.. versionadded:: 4.3.0
566-
567567
Returns a single error for the specified field in formatted HTML.
568568

569569
The parameter ``$template`` is a Validation template name.

user_guide_src/source/libraries/cookies.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ Class Reference
326326

327327
.. php:method:: withNeverExpiring()
328328
329+
.. deprecated:: 4.2.6
330+
329331
.. important:: This method is deprecated. It will be removed in future releases.
330332

331333
:param string $name:

0 commit comments

Comments
 (0)