Skip to content
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

PHP 8.4 compatibility #11

Open
mcaskill opened this issue Sep 23, 2024 · 1 comment
Open

PHP 8.4 compatibility #11

mcaskill opened this issue Sep 23, 2024 · 1 comment

Comments

@mcaskill
Copy link

mcaskill commented Sep 23, 2024

While doing some application testing in PHP 8.4-dev, I launched Alfred to use mattstein/alfred-tower-bookmarks-workflow and the following deprecation notices were logged:

PHP Deprecated:  Alfred\Workflows\Workflow::env(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in ~/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.***/vendor/joetannenbaum/alfred-workflow/src/Workflow.php on line 98
PHP Deprecated:  CFPropertyList\CFPropertyList::add(): Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead in ~/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.***/vendor/rodneyrehm/plist/src/CFPropertyList/CFPropertyList.php on line 526
PHP Deprecated:  CFPropertyList\CFDictionary::add(): Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead in ~/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.***/vendor/rodneyrehm/plist/src/CFPropertyList/CFDictionary.php on line 89
PHP Deprecated:  CFPropertyList\CFArray::add(): Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead in ~/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.***/vendor/rodneyrehm/plist/src/CFPropertyList/CFArray.php on line 87

For your Workflow class the fix is simple (I have not checked other occurrences):

- public function env(string $key = null, $default = null)
+ public function env(?string $key = null, $default = null)

Related issue:

@andrewnicols
Copy link

Hi, we've taken the decision to fork CFPropertylist. We did try and contact Teclib without any response over the past 3-4 weeks and I'm unable teo comment on their repo because they've archived the project.

See https://github.com/moodlehq/CFPropertyList/ -- I've literally just created the fork so watch this space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants