|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66661 AMQP documentation is horribly wrong
Submitted: 2014-02-07 15:55 UTC Modified: 2014-02-09 02:20 UTC
From: phpbugs at rfnj dot org Assigned: lstrojny (profile)
Status: Closed Package: amqp (PECL)
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
 [2014-02-07 15:55 UTC] phpbugs at rfnj dot org
From manual page:

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 */);
$chan = new AMQPChannel($conn);
$exch = new AMQPExchange($chan);

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 '/''


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-07 19:44 UTC] 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 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:

Note: alternatively, it exists an online editor at
 [2014-02-08 16:39 UTC]
See also:

The AMQP maintainer(s) don’t appear to want to keep the docs up-to-date.
 [2014-02-08 17:40 UTC] phpbugs at rfnj dot org
Salathe, thanks for the link.  The work done there is over a year old, but they say was updated with new documentation.  I can't find any official documentation over on that side that could be used to update the 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 docs?
 [2014-02-08 18:32 UTC]
-Assigned To: +Assigned To: lstrojny
 [2014-02-08 18:32 UTC]
It seems to me the best course of action is to remove the docs from 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 or use any infrastructure.

The only reason the ext is on pecl is so it can be "pecl install amqp" it seems, everything else is outside of, including docs.

Lars: Are you OK with removing the docs from
 [2014-02-08 22:45 UTC] phpbugs at rfnj dot org
FWIW I'm good with them being removed.  No docs is better than incorrect docs.
 [2014-02-09 01:44 UTC]
@bjori: yes, please.
 [2014-02-09 02:18 UTC]
Automatic comment from SVN on behalf of bjori
Log: Disable AMQP docs.. probably remove completely later. See bug#66661
 [2014-02-09 02:20 UTC]
-Status: Assigned +Status: Closed
 [2014-02-09 02:20 UTC]
Lars; You may want to fix the "view documentation" link on

The docs have been disabled now
 [2014-03-18 15:11 UTC]
Automatic comment from SVN on behalf of bjori
Log: Fixed bug #66661 (remove amqp from phpdoc)
 [2020-02-07 06:08 UTC]
Automatic comment on behalf of bjori
Log: Fixed bug #66661 (remove amqp from phpdoc)
 [2020-02-07 07:30 UTC]
Automatic comment on behalf of bjori
Log: Fixed bug #66661 (remove amqp from phpdoc)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 08 01:03:53 2023 UTC