Skip to content

PHP 7.4/RemovedFunctionParameters: handle deprecated curl_version() $age#874

Merged
wimg merged 1 commit intomasterfrom
php-7.4/removedfunctionparams-curl-version-age
Aug 28, 2019
Merged

PHP 7.4/RemovedFunctionParameters: handle deprecated curl_version() $age#874
wimg merged 1 commit intomasterfrom
php-7.4/removedfunctionparams-curl-version-age

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 21, 2019

The $version parameter of curl_version() is deprecated. If any value not
equal to the default CURLVERSION_NOW is passed, a warning is raised and the
parameter is ignored.

Notes:

  • While the changelog and the PHP native deprecation message call the parameter $version, the documentation calls it $age, so that's the parameter name used for the error message.
  • Using the CURL_VERSION_NOW constant for the value is still fine, so the sniff takes that into account.

Refs:

Related to #808

@jrfnl jrfnl added Type: enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Aug 21, 2019
@jrfnl jrfnl added this to the 9.3.0 milestone Aug 21, 2019
@jrfnl jrfnl requested a review from wimg August 21, 2019 04:30
> The $version parameter of curl_version() is deprecated. If any value not
> equal to the default CURLVERSION_NOW is passed, a warning is raised and the
> parameter is ignored.

Notes:
* While the changelog and the PHP native deprecation message call the parameter `$version`, the documentation calls it `$age`, so that's the parameter name used for the error message.
* Using the `CURL_VERSION_NOW` constant for the value is still fine, so the sniff takes that into account.

Refs:
* https://github.com/php/php-src/blob/86d751f696786bcb95c580482c9884e41ccf2406/UPGRADING#L55-L57
* https://www.php.net/manual/en/function.curl-version.php
* php/php-src@357da6b
@jrfnl jrfnl force-pushed the php-7.4/removedfunctionparams-curl-version-age branch from 0055206 to decf6ec Compare August 21, 2019 09:45
Copy link
Member

@wimg wimg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice workaround :-)

@wimg wimg merged commit c64ce9d into master Aug 28, 2019
@delete-merged-branch delete-merged-branch bot deleted the php-7.4/removedfunctionparams-curl-version-age branch August 28, 2019 14:25
@jrfnl jrfnl removed PR: ready for review PR: quick merge PR only contains relatively simple changes labels Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants