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: Deprecation warnings #93

Open
sstottelaar opened this issue Jan 13, 2025 · 4 comments
Open

PHP 8.4: Deprecation warnings #93

sstottelaar opened this issue Jan 13, 2025 · 4 comments

Comments

@sstottelaar
Copy link

Hi,

When using the CLI with (Herd) PHP 8.4, I get deprecation warnings in my terminal:

`Deprecated: optional(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /Users/sjoerdstottelaar/.composer/vendor/illuminate/support/helpers.php on line 190

Deprecated: with(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /Users/sjoerdstottelaar/.composer/vendor/illuminate/support/helpers.php on line 430

Deprecated: Valet\writer(): Implicitly marking parameter $writer as nullable is deprecated, the explicit nullable type must be used instead in /Users/sjoerdstottelaar/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 35

Deprecated: Valet\CommandLine::run(): Implicitly marking parameter $onError as nullable is deprecated, the explicit nullable type must be used instead in /Users/sjoerdstottelaar/.composer/vendor/laravel/valet/cli/Valet/CommandLine.php on line 36

Deprecated: Valet\CommandLine::runAsUser(): Implicitly marking parameter $onError as nullable is deprecated, the explicit nullable type must be used instead in /Users/sjoerdstottelaar/.composer/vendor/laravel/valet/cli/Valet/CommandLine.php on line 44

Deprecated: Valet\CommandLine::runCommand(): Implicitly marking parameter $onError as nullable is deprecated, the explicit nullable type must be used instead in /Users/sjoerdstottelaar/.composer/vendor/laravel/valet/cli/Valet/CommandLine.php on line 52`

I've just updated the CLI to 3.4.1, so I'm running the latest release. When switching back to PHP 8.3, the warnings are gone. The CLI is still functional, but not very usable:

image
@sstottelaar
Copy link
Author

After reading up on Statamic and 8.4, I see that it isn't supported yet. I will close this issue and move forward on 8.3

@duncanmcclean
Copy link
Member

Going to re-open this - the CLI should still support PHP 8.4.

The only reason we don't completely support PHP 8.4 in Core is because some of our dependencies still need updating.

@duncanmcclean duncanmcclean reopened this Jan 13, 2025
@duncanmcclean duncanmcclean changed the title Deprecated warnings PHP 8.4: Deprecation warnings Jan 13, 2025
@duncanmcclean
Copy link
Member

duncanmcclean commented Jan 13, 2025

What's the output of composer global show?

I'm not seeing any deprecation warnings using PHP 8.4 - wondering if your global dependencies are out-of-date.

@jesseleite
Copy link
Member

I am seeing the deprecation warnings in php 8.4, but pretty sure they're all upstream issues of dependencies used by cms/core which still need to be updated for 8.4. Not sure there's anything to address in the cli package itself, but we can leave this issue open to revisit in the near future 👍

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

No branches or pull requests

3 participants