Doc #66661 [Asn]: AMQP documentation is horribly wrong
| From: | phpbugs at rfnj dot org | Date: | Sat, 08 Feb 2014 22:45:05 +0000 |
| Subject: | Doc #66661 [Asn]: AMQP documentation is horribly wrong | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10965@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66661&edit=1
ID: 66661
User updated by: phpbugs at rfnj dot org
Reported by: phpbugs at rfnj dot org
Summary: AMQP documentation is horribly wrong
Status: Assigned
Type: Documentation Problem
Package: amqp
Operating System: irrelevant
PHP Version: Irrelevant
Assigned To: lstrojny
Block user comment: N
Private report: N
New Comment:
FWIW I'm good with them being removed. No docs is better than incorrect docs.
Previous Comments:
------------------------------------------------------------------------
[2014-02-08 18:32:28] bjori@php.net
It seems to me the best course of action is to remove the docs from php.net to avoid confusion.
The authors of pecl/AMQP have some sort of docs in the github repo and have no wishes to have the
extension documented on php.net or use any php.net infrastructure.
The only reason the ext is on pecl is so it can be "pecl install amqp" it seems,
everything else is outside of php.net, including docs.
Lars: Are you OK with removing the docs from php.net?
------------------------------------------------------------------------
[2014-02-08 17:40:02] phpbugs at rfnj dot org
Salathe, thanks for the link. The work done there is over a year old, but they say svn.php.net was
updated with new documentation. I can't find any official documentation over on that side that
could be used to update the php.net docs.
However there are code comment signatures for each function stub that are in *some* kind of auto
documenting format. They are simply signatures though, with no explanation of the params.
Does the official project have documentation anywhere that could be used to update the php.net docs?
------------------------------------------------------------------------
[2014-02-08 16:39:52] salathe@php.net
See also: https://github.com/pdezwart/php-amqp/issues/17
The AMQP maintainer(s) donât appear to want to keep the docs up-to-date.
------------------------------------------------------------------------
[2014-02-07 19:44:20] dereckson at espace-win dot org
Thank you for your interest to the documentation.
If you wish to improve the documentation, so it best reflects the current extension behavior, you
can:
svn checkout https://svn.php.net/repository/phpdoc/modules/doc-en
phpdoc
# the amqp documentation is then located in phpdoc/en/reference/amqp folder
When you edited a file, you can get the patch for this file with the following command:
svn diff en/reference/amqp/<your file>
To get the list of the files you modified, use svn status.
You can then add to this bug a patch with your edited documentation.
If you wish a general guide to contribute to PHP documentation, this is located at the following
URL. Documentation guide: http://doc.php.net/php/dochowto
Note: alternatively, it exists an online editor at https://edit.php.net/?project=PHP
------------------------------------------------------------------------
[2014-02-07 15:55:29] phpbugs at rfnj dot org
Description:
------------
---
From manual page: http://www.php.net/amqpexchange.delete
---
Nearly all the documentation regarding the AMQP classes is incorrect. It is unknown which side (the
documentation or the code) is out of date, but one obviously is.
The examples on most pages contradict the documentation on the same page, the page this report is
coming from is one example: The documentation for delete() says it takes a set of flags for deleting
the current queue, however the example demonstrates giving it a queue name.
The example is 'correct', in that $exch->delete() does expect a queue name to be given,
and will throw an exception about "unknown queue 528" if the flag AMQP_IFUNUSED is passed
instead; 528 is the decimal value of that flag.
Test script:
---------------
$conn = new AMQPConnection(/* your connection params here */);
$conn->setTimeout(5);
$conn->connect();
$chan = new AMQPChannel($conn);
$exch = new AMQPExchange($chan);
$exch->setName('test');
$exch->setType(AMQP_EX_TYPE_DIRECT);
$exch->setFlags(AMQP_DURABLE | AMQP_MANDATORY);
$exch->declare();
$exch->delete(AMQP_IFUNUSED);
Expected result:
----------------
It should run without exception *OR* the documentation should be corrected.
Actual result:
--------------
Fatal error: Uncaught exception 'AMQPExchangeException' with message 'Server channel
error: 404, message: NOT_FOUND - no exchange '528' in vhost '/''
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66661&edit=1