pdt icon indicating copy to clipboard operation
pdt copied to clipboard

standard v.7.4.2 number_format function is wrongly documented

Open rimace opened this issue 2 years ago • 1 comments

Describe the bug The stanrdard function (in the standard.php file) "number_format" is not correctly documented.

Describe the eclipse environment A clear and concise description about Eclipse Version 2021-12, PDT version 8.0.

Describe your system

  • OS: Fedora Linux
  • Version 35
  • PHP Version 7.4
  • Utilis Eclipse IDE

To Reproduce Steps to reproduce the behavior:

  1. Look at the standard classes/functions of php.
  2. See that number_format() function has only 2 arguments (but it should be 4)

Expected behavior The function number_format should be documented as:

 number_format(
    float $num,
    int $decimals = 0,
    ?string $decimal_separator = ".",
    ?string $thousands_separator = ","
): string

Additional context Add any other context about the problem here.

rimace avatar Mar 11 '22 14:03 rimace

Looks like the language documentation may have been generated with an out-of-date version of the phpdoc repo. There was a note in the commit about updating the documentation once the PHP 7.4 binaries were available.

agmckee avatar Mar 11 '22 15:03 agmckee

The language documentation is out of date. Some arguments of some functions are missing. I have generated the documentation with Debian 11 but I don't have all extensions (official and PECL) installed. The script use reflection of installed packages and the official documentation.

Documentation of PECL extensions are very out of date. How can we generate their documentation ? I will create a Debian 11 VM with PHP 7.4 and install all extensions provided by Debian. Is it a good idea ? Some extensions not maintained has to be removed. Others have to be updated. And some PECL extensions have to be added to the language documentation.

sebromon avatar Nov 03 '22 18:11 sebromon

Our language generate need some enhancements. For now it incorrectly "parse" manuala references. I made some fixes for #148, but it still need improvements.

zulus avatar May 15 '23 11:05 zulus

I switched from tons of "preg_replace" to DOMDocument (after compile manual) + some smaller hacks. From my point of view language library is a lot better now

zulus avatar May 21 '23 21:05 zulus