forge-cli icon indicating copy to clipboard operation
forge-cli copied to clipboard

Lots of deprecated messages using cli commands

Open nilskretschmer opened this issue 7 months ago • 7 comments

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

nilskretschmer avatar Jun 27 '25 08:06 nilskretschmer

Same here. Annoying.

abreufilho avatar Jul 25 '25 15:07 abreufilho

same here

Enadabuzaid avatar Aug 01 '25 12:08 Enadabuzaid

same 😕

n1crack avatar Aug 29 '25 05:08 n1crack

Any update on this? Is this repository maintained? The last release of the CLI was over a year ago.

nilskretschmer avatar Oct 07 '25 17:10 nilskretschmer

Any update on this? Is this repository maintained? The last release of the CLI was over a year ago.

It is fixed with me. .. I was connected foreg with Herd, this was creating conflict. When disconnected from Herd, it works.

Enadabuzaid avatar Oct 08 '25 07:10 Enadabuzaid

@Enadabuzaid which PHP version are you using?

nilskretschmer avatar Oct 08 '25 07:10 nilskretschmer

@nilskretschmer , Sorry, my problem was unauthenticated. Every time, use the Forge CLI.

  • When using v8.0, the warning messages disappear.

  • When using v8.4, the warning message appears, but the command is working; it's just a warning.

Enadabuzaid avatar Oct 08 '25 08:10 Enadabuzaid