-
Notifications
You must be signed in to change notification settings - Fork 7.8k
fileinfo: Deprecate finfo_close()
#18396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
I added this to https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_finfo_close already |
Thanks, I've linked this PR in the RFC as the implementation. |
I think merging the test changes already is fine. But having it in the bulk RFC is probably the "proper" way to do it, even if I would agree just deprecating it should be fine. |
|
This is for consistency with other `*_close()` functions that have become obsolete when migrating from resources to objects.
3ebec92
to
bad3cef
Compare
@@ -92,6 +92,7 @@ public function set_flags(int $flags): true {} | |||
/** @refcount 1 */ | |||
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {} | |||
|
|||
#[\Deprecated(since: '8.5', message: 'as finfo objects are freed automatically')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[\Deprecated(since: '8.5', message: 'as finfo objects are freed automatically')] | |
#[\Deprecated(since: 'PHP 8.5', message: 'as finfo objects are freed automatically')] |
Isn't it better to be explicit about the version? There may be case that the plain version number may be confused with other software, i.e. MySQL has close version number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a discussion for another place. The “bare version” format is what is currently used by PHP core. See: 29f98e7
Does this need an RFC or can we do this by simple agreement? Requesting reviews from Girgias and the RMs 😄
This is for consistency with other
*_close()
functions that have become obsolete when migrating from resources to objects.