Bug #81269 [Asn]: getDocComment is not working correctly
| From: | popov654 at yandex dot ru | Date: | Tue, 03 Aug 2021 03:44:35 +0000 |
| Subject: | Bug #81269 [Asn]: getDocComment is not working correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235537@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81269&edit=1
ID: 81269
User updated by: popov654 at yandex dot ru
Reported by: popov654 at yandex dot ru
Summary: getDocComment is not working correctly
Status: Assigned
Type: Bug
Package: Reflection related
Operating System: Windows 7 x64 Pro
PHP Version: 8.0.8
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
>opcache.save_comments is only about doc block comments
Can you confirm that doc block comments are really deleted on Windows 7-10 with any value of
opcache.file_update_protection setting? I don't see it working. Maybe it's a bug in
previous versions, not in 8.0?
Previous Comments:
------------------------------------------------------------------------
[2021-08-03 03:40:14] popov654 at yandex dot ru
Sorry for the delay
------------------------------------------------------------------------
[2021-08-03 03:39:21] popov654 at yandex dot ru
A checked the opcache.file_update_protection enabled setting, and it is not set in both 7.x and 8.0,
so I guess it is not the case of the problem.
Any ideas?
------------------------------------------------------------------------
[2021-08-01 04:22:14] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2021-07-19 09:25:36] cmb@php.net
> I set save_comments to 0, that was the reason of stripping this
> out.
Right. And when you change the setting, you need to restart
Apache for that change to be effective. However, depending on
other INI directives, the code may still be read from the file
cache, what's likely what has happened to you.
> But the behavior of that option has changed since 7.4 anyway (it
> ignored PHPdoc before?).
opcache.save_comments is only about doc block comments (i.e. those
starting with /**); other comments are always stripped.
------------------------------------------------------------------------
[2021-07-19 08:03:23] nikic@php.net
For me the comment is always missing with save_comments=0, regardless of how it looks like. That
also matches the implementation.
I suspect that the behavior you observed might be an artifact of having options like
opcache.file_update_protection enabled. If it's enabled and you access a file quickly after
modifying it, then it will not be cached and save_comments=0 will not take effect.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81269
--
Edit this bug report at https://bugs.php.net/bug.php?id=81269&edit=1