Running the Alfred GitHub workflow on PHP 8.1+ triggers deprecation warnings:
PHP Deprecated: Workflow::request(): Implicitly marking parameter $curl as nullable is deprecated in workflow.php on line 137
PHP Deprecated: Workflow::requestCache(): Implicitly marking parameter $curl as nullable is deprecated in workflow.php on line 175
PHP Deprecated: Workflow::requestApi(): Implicitly marking parameter $curl as nullable is deprecated in workflow.php on line 299
This is due to the $curl parameter being implicitly nullable. PHP 8.1 requires explicit declaration using the ? operator.
Proposed Solution:
Update the method signatures to explicitly mark $curl as nullable. Example:
public static function request(string $url, ?Curl $curl = null, $callback = null, bool $withAuthorization = true)
Similar updates are needed for requestCache() and requestApi().
Description:
Running the Alfred GitHub workflow on PHP 8.1+ triggers deprecation warnings:
This is due to the
$curl
parameter being implicitly nullable. PHP 8.1 requires explicit declaration using the?
operator.Proposed Solution:
Update the method signatures to explicitly mark
$curl
as nullable. Example:Similar updates are needed for
requestCache()
andrequestApi()
.Environment: