laravel / laravel/forge-cli

Lots of deprecated messages using cli commands

Open
#100 11 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
245
Forks
41
Avg merge
28m
Merged PRs (30d)
1

Description

Forge CLI Version

1.8.3

PHP Version

8.4.1

Description

If I use any of the forge commands in my CLI I get lots of deprecated warnings - I think these warnings exist due to newer PHP versions which encourage stricter type hints:

forge server:switch

Deprecated: optional(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/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 phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/support/helpers.php on line 430

Deprecated: Termwind\style(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/nunomaduro/termwind/src/Functions.php on line 29

Deprecated: Termwind\ask(): Implicitly marking parameter $autocomplete as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/nunomaduro/termwind/src/Functions.php on line 61

Deprecated: Illuminate\Container\Container::beforeResolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Container.php on line 1151

Deprecated: Illuminate\Container\Container::resolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Container.php on line 1171

Deprecated: Illuminate\Container\Container::afterResolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Container.php on line 1191

Deprecated: Illuminate\Container\Container::setInstance(): Implicitly marking parameter $container as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/container/Container.php on line 1430

Deprecated: Illuminate\Contracts\Container\Container::beforeResolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/contracts/Container/Container.php on line 200

Deprecated: Illuminate\Contracts\Container\Container::resolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/contracts/Container/Container.php on line 209

Deprecated: Illuminate\Contracts\Container\Container::afterResolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/contracts/Container/Container.php on line 218

Deprecated: Illuminate\Support\Traits\Conditionable::when(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/conditionable/Traits/Conditionable.php on line 21

Deprecated: Illuminate\Support\Traits\Conditionable::when(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/conditionable/Traits/Conditionable.php on line 21

Deprecated: Illuminate\Support\Traits\Conditionable::unless(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/conditionable/Traits/Conditionable.php on line 53

Deprecated: Illuminate\Support\Traits\Conditionable::unless(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/conditionable/Traits/Conditionable.php on line 53

Deprecated: Illuminate\Support\Arr::first(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/collections/Arr.php on line 188

Deprecated: Illuminate\Support\Arr::last(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/collections/Arr.php on line 219

Deprecated: Illuminate\Events\Dispatcher::__construct(): Implicitly marking parameter $container as nullable is deprecated, the explicit nullable type must be used instead in phar:///home/vjupix-nk/.config/composer/vendor/laravel/forge-cli/builds/forge/vendor/illuminate/events/Dispatcher.php on line 75

 ‣ Which Server Would You Like To Switch To:

So I think the code base should be upgraded to eliminate these warnings?

Steps To Reproduce
  1. Install @forge/cli globally using composer
  2. Use any forge command
  3. See the deprecated warnings

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing any Forge command after the global Composer installation on PHP 8.4.1, then inspect the dependency versions behind vendor/illuminate and vendor/nunomaduro/termwind paths listed in the warnings. Done means Forge CLI commands run without the reported deprecated messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.