37 Commits

Author SHA1 Message Date
Gina Peter Banyard
27dcb487a7 Make assert() Changelog section DocBook 5.2 conformant (#3343) 2024-04-24 23:19:51 +01:00
Tim Düsterhus
b2cbcaea5b assert: Remove “not recommended” reference to assert_options() (#2869)
The reference itself says that this is not recommended and `assert_options()`
itself is deprecated in PHP 8.3. Remove the reference to slim down the docs.
2023-10-20 12:24:24 +01:00
Tim Düsterhus
968e209abc assert: Remove note about it being a language construct (#2877)
`assert()` behaves like a regular function for all intents and purposes. It can
even be used as a string callable. The only special thing about is that the
`$description`'s default parameter is dynamic.
2023-10-20 12:22:17 +01:00
Tim Düsterhus
30aac0c739 assert: Rewrite examples (#2861)
- Drop the assert.exception=0 case, because that is deprecated.
- Showcase the output for enabled assertions first.
- Add example with a custom message
2023-10-17 00:22:23 +01:00
Tim Düsterhus
56e917c669 assert: Fix return value explanation (#2863)
Specifically, `assert()` will always return `true` if assertions are disabled.
Ideally, the return value would never be used anyway …
2023-10-17 00:22:03 +01:00
Tim Düsterhus
fff186098a assert: Drop examples for legacy string-based assertions (#2862)
They are no longer supported as of PHP 8 and only serve to cause confusion for a
feature that is already complex enough by itself.

In fact the examples will silently misbehave in PHP 8, because a non-empty
string is truthy and no warning is emitted.
2023-10-17 00:19:26 +01:00
George Peter Banyard
ada1d79de3 PHP 8.3: legacy assertion have been deprecated (#2840) 2023-10-08 17:57:35 +01:00
George Peter Banyard
bfabdf420f [skip-revcheck] Minor whitespace fixes 2023-06-13 13:28:40 +01:00
Yoshinari Takaoka
588a44da90 changed assertion in return value description as parameter. 2023-06-10 11:11:57 +09:00
George Peter Banyard
389525942d Update assert() docs for PHP 8 (#2467)
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2023-06-05 14:38:21 +01:00
Alex Dowad
e2e41fdb46 Clarify handling of 3rd parameter for assert callbacks
The handling of the 3rd parameter for assert callbacks set via `assert_options`
changed with the implementation of the expectations RFC, and changed again in
PHP 8. Update the documentation accordingly.

This one seems to be a cause for confusion; witness Bug [#79602]
(https://bugs.php.net/bug.php?id=79602).

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-120.
2023-01-04 17:57:44 +01:00
Kamil Tekiela
59af09939a Remove double parentheses in assert 2022-03-20 21:21:08 +00:00
Bradley Taylor
883d2fe5cb assert() no longer evaluates strings as of PHP 8.0.0
As per the PHP changelog, the functionality to use a string for `assert` has been removed in PHP 8.0: 69888c3ff1/UPGRADING (L350-L354)

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-1471.
2022-03-20 11:59:40 +01:00
蝦米
dd52212027 fix #80766 namespaced assert is no longer allowed 2021-04-20 01:54:29 +08:00
Christoph Michael Becker
86e6094e86 Use canonical type names
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351133 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-02 15:39:04 +00:00
Christoph Michael Becker
3e15d2894f Remove more changelog entries, mostly from PHP 5.4 era
Patch contributed by Sobak <msobaczewski@gmail.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350656 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-26 14:15:17 +00:00
Nikita Popov
de7a562901 Add note on default value of $description param for assert
Patch by alexdowad.

Closes php/doc-en#117.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350018 c90b9560-bf6c-de11-be94-00142212c4b1
2020-06-09 07:49:32 +00:00
Andrey Andreev
028513e94b Document PHP 7.2 deprecations as the result of https://wiki.php.net/rfc/deprecations_php_7_2
Also, simplify the first paragraph of 'Traditional assertions' in assert() docs

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342126 c90b9560-bf6c-de11-be94-00142212c4b1
2017-03-14 11:30:59 +00:00
Andrey Andreev
9320fcb02b Fix assert() doc where 'assertion' is referred to as a function instead of a parameter
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342125 c90b9560-bf6c-de11-be94-00142212c4b1
2017-03-14 11:01:37 +00:00
Christoph Michael Becker
6e94da0618 fixed #71991 (assert() docs seem to imply PHP 5 only)
fix contributed by Lance Sloan

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338974 c90b9560-bf6c-de11-be94-00142212c4b1
2016-04-09 11:12:04 +00:00
Adam Harvey
4526a0712f Add expectations documentation.
This included moving the guide for the new configuration directives into the
assert() page to keep the migration guide snappy.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337862 c90b9560-bf6c-de11-be94-00142212c4b1
2015-09-21 12:16:28 +00:00
Adam Harvey
dd9fa0aed7 Fix doc bug #62986 (Second parameter for assert()), along with a couple of
other unrelated fixes (making the hyphen that should be a dash into an em dash,
adding a full stop, using <constant> consistently).


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@327439 c90b9560-bf6c-de11-be94-00142212c4b1
2012-09-03 02:24:31 +00:00
Daniel Egeberg
96c9d88bad Converted to utf-8
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
2010-03-28 22:10:10 +00:00
Torben Wilson
af4410a7e1 Normalized the sgml-default-dtd-file local-variable line for those
still using this, after discussion on the phpdoc list.
From now on, manual.ced will need to be found at ~/.phpdoc/manual.ced.



git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288721 c90b9560-bf6c-de11-be94-00142212c4b1
2009-09-25 07:04:39 +00:00
Nilgün Belma Bugüner
f4871bb5ba fixed properties
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@283819 c90b9560-bf6c-de11-be94-00142212c4b1
2009-07-11 07:47:57 +00:00
Kalle Sommer Nielsen
cf577d2adf * Added new examples for
* assert_options
 * get_current_user
 * ini_restore
 * sys_get_temp_dir
 * sha1_file


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@267550 c90b9560-bf6c-de11-be94-00142212c4b1
2008-10-20 10:30:08 +00:00
Hannes Magnusson
c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00
Mehdi Achour
7ec2efbee8 ref.info: switch to new style
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@228997 c90b9560-bf6c-de11-be94-00142212c4b1
2007-02-04 22:46:34 +00:00
Mehdi Achour
c3c3be1e6d WS, prepare for new docstyle
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@228996 c90b9560-bf6c-de11-be94-00142212c4b1
2007-02-04 22:46:33 +00:00
Jakub Vrana
d7cff8e392 Fix return types (1/2)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@189110 c90b9560-bf6c-de11-be94-00142212c4b1
2005-06-23 16:53:27 +00:00
Mehdi Achour
45a0f65851 CS : Function declarations follow the 'one true brace' convention
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@148756 c90b9560-bf6c-de11-be94-00142212c4b1
2004-01-15 12:43:50 +00:00
Mehdi Achour
27960e632c Merry XHTML and CS compliant christmas all \!
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146503 c90b9560-bf6c-de11-be94-00142212c4b1
2003-12-15 16:55:22 +00:00
Nicolas Chaillan
63d1500234 fixing protos
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@114841 c90b9560-bf6c-de11-be94-00142212c4b1
2003-02-05 02:38:39 +00:00
Friedhelm Betz
441360581b typo corrected
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@101322 c90b9560-bf6c-de11-be94-00142212c4b1
2002-10-25 17:05:01 +00:00
Derick Rethans
cde693d876 - Document passing of the condition to the assertion handler some more.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@101229 c90b9560-bf6c-de11-be94-00142212c4b1
2002-10-25 05:47:48 +00:00
Hartmut Holzgraefe
5b9fc29465 revision tags added
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-17 06:45:35 +00:00
Hartmut Holzgraefe
a4b6d72ad3 banana-split
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78202 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-15 00:12:54 +00:00