php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80188 stub.php files in php-src do not contain class constants and properties
Submitted: 2020-10-05 12:26 UTC Modified: 2021-06-08 12:25 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ondrej at mirtes dot cz Assigned: kocsismate (profile)
Status: Closed Package: Reflection related
PHP Version: 8.0.0rc1 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ondrej at mirtes dot cz
New email:
PHP Version: OS:

 

 [2020-10-05 12:26 UTC] ondrej at mirtes dot cz
Description:
------------
Hello!

I'd like to take advantage of the internal PHP stubs that are in php-src for PHPStan Static Analysis Tool. I've set up a repository that automatically extracts them and offers them as a Composer package: https://github.com/phpstan/php-8-stubs

But I found out that the classes are missing class constants and properties, which would be very useful for me.

Thank you.

Test script:
---------------
N/A

Expected result:
----------------
N/A

Actual result:
--------------
N/A

Patches

Ipvanish.com (last revision 2020-11-16 22:33 UTC by chingbella03 at gmail dot com)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-07 08:24 UTC] kocsismate@php.net
-Assigned To: +Assigned To: kocsismate
 [2020-10-07 11:34 UTC] carusogabriel@php.net
The following pull request has been associated:

Patch Name: Add support for declaring properties in stubs
On GitHub:  https://github.com/php/php-src/pull/6289
Patch:      https://github.com/php/php-src/pull/6289.patch
 [2020-11-16 22:33 UTC] chingbella03 at gmail dot com
The following patch has been added/updated:

Patch Name: Ipvanish.com
Revision:   1605565985
URL:        https://bugs.php.net/patch-display.php?bug=80188&patch=Ipvanish.com&revision=1605565985
 [2021-02-18 11:40 UTC] nikic@php.net
The stub files contain property declarations in PHP 8.1 -- I don't think there's plans to include constant declarations at this time.
 [2021-06-08 12:25 UTC] kocsismate@php.net
-Status: Assigned +Status: Closed
 [2021-06-08 12:25 UTC] kocsismate@php.net
In the meanwhile, almost all dynamic properties became declared and typed as well. As far as I know there's only two exceptions where this hasn't been done yet: ext/date and ext/soap.


FYI: We also started to annotate readonly members via the @readonly tag.

Regarding constants: neither I have plans to add them to the stubs because we wouldn't able to declare their values which are usually legit C constant values.

I think we can close this bug, since the above mentioned tasks are not directly related.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC