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

Problems with 2.2.0 #1361

Open
s22-tech opened this issue Dec 12, 2023 · 6 comments
Open

Problems with 2.2.0 #1361

s22-tech opened this issue Dec 12, 2023 · 6 comments
Assignees

Comments

@s22-tech
Copy link

Output

% phpbrew -v
  ______ _   _ ____________
  | ___ \ | | || ___ \ ___ \
  | |_/ / |_| || |_/ / |_/ /_ __ _____      __
  |  __/|  _  ||  __/| ___ \ '__/ _ \ \ /\ / /
  | |   | | | || |   | |_/ / | |  __/\ V  V /
  \_|   \_| |_/\_|   \____/|_|  \___| \_/\_/

PHP Deprecated:  Callables of the form ["PhpBrew\Command\HelpCommand", "parent::execute"] are deprecated in phar:///Users/marc/bin/phpbrew/src/PhpBrew/Command/HelpCommand.php on line 28

Deprecated: Callables of the form ["PhpBrew\Command\HelpCommand", "parent::execute"] are deprecated in phar:///Users/marc/bin/phpbrew/src/PhpBrew/Command/HelpCommand.php on line 28
Brew your latest php!

PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/marc/bin/phpbrew/vendor/corneltek/cliframework/src/Command/HelpCommand.php on line 156

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///Users/marc/bin/phpbrew/vendor/corneltek/cliframework/src/Command/HelpCommand.php on line 156

Platform

MacOS 13.5
PHP 8.2.13 and 8.3

@peter279k
Copy link
Member

Thanks for reporting the issue. And the reference is available here.

@peter279k peter279k self-assigned this Mar 27, 2024
@peter279k
Copy link
Member

I cannot reproduce the issue with the PHP8.2.17 version:

$ php -v
PHP 8.2.17 (cli) (built: Mar 16 2024 08:41:44) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.17, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.17, Copyright (c), by Zend Technologies
$ phpbrew -v
  ______ _   _ ____________
  | ___ \ | | || ___ \ ___ \
  | |_/ / |_| || |_/ / |_/ /_ __ _____      __
  |  __/|  _  ||  __/| ___ \ '__/ _ \ \ /\ / /
  | |   | | | || |   | |_/ / | |  __/\ V  V /
  \_|   \_| |_/\_|   \____/|_|  \___| \_/\_/

Brew your latest php!

SYNOPSIS
        phpbrew [options] <command>

OPTIONS
        -v, --verbose
                Print verbose message.

        -d, --debug
                Print debug message.

        -q, --quiet
                Be quiet.

        -h, --help
                Show help.

        --version
                Show version.

        -p, --profile
                Display timing and memory usage information.

        --log-path=[<value>]
                The path of a log file.

        --no-interact
                Do not ask any interactive question.

        --no-progress
                Do not display progress bar.


COMMANDS
                help    Show help message of a command
                init    Initialize phpbrew config file.
               known    List known PHP versions
             install    Install php
                list    List installed PHPs
                 use    Use php, switch version temporarily
              switch    Switch default php version.
                each    Iterate and run a given shell command over all php versions managed by PHPBrew.
              config    Edit your current php.ini in your favorite $EDITOR
                info    Show current PHP information
                 env    Export environment variables
           extension    List extensions or execute extension subcommands
            variants    List php variants
                path    Show paths of the current PHP.
                  cd    Change to directories
            download    Download php
               clean    Clean up the source directory of a PHP distribution
              update    Update PHP release source file
               ctags    Run ctags at current php source dir for extension development.
                 fpm    fpm commands
            list-ini    List loaded ini config files.
         self-update    Self-update, default to master version
              remove    Remove installed php build.
               purge    Remove installed php version and config files.
                 off    Temporarily go back to the system php
          switch-off    Definitely go back to the system php
              system    Get or set the internally used PHP binary
          system-off    Use the currently effective PHP binary internally

HELP
        'phpbrew help' lists available subcommands and some topics. See
        'phpbrew help <command>' or 'phpbrew help <topic>' to read about a
        specific subcommand or phpbrew.

phpbrew 2.2.0           powered by https://github.com/c9s/CLIFramework

It will not effect with the PHP 8.3.4 version:

$ php -v
PHP 8.3.4 (cli) (built: Mar 16 2024 08:39:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.4, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies
$ phpbrew -v
  ______ _   _ ____________
  | ___ \ | | || ___ \ ___ \
  | |_/ / |_| || |_/ / |_/ /_ __ _____      __
  |  __/|  _  ||  __/| ___ \ '__/ _ \ \ /\ / /
  | |   | | | || |   | |_/ / | |  __/\ V  V /
  \_|   \_| |_/\_|   \____/|_|  \___| \_/\_/

Brew your latest php!

SYNOPSIS
        phpbrew [options] <command>

OPTIONS
        -v, --verbose
                Print verbose message.

        -d, --debug
                Print debug message.

        -q, --quiet
                Be quiet.

        -h, --help
                Show help.

        --version
                Show version.

        -p, --profile
                Display timing and memory usage information.

        --log-path=[<value>]
                The path of a log file.

        --no-interact
                Do not ask any interactive question.

        --no-progress
                Do not display progress bar.


COMMANDS
                help    Show help message of a command
                init    Initialize phpbrew config file.
               known    List known PHP versions
             install    Install php
                list    List installed PHPs
                 use    Use php, switch version temporarily
              switch    Switch default php version.
                each    Iterate and run a given shell command over all php versions managed by PHPBrew.
              config    Edit your current php.ini in your favorite $EDITOR
                info    Show current PHP information
                 env    Export environment variables
           extension    List extensions or execute extension subcommands
            variants    List php variants
                path    Show paths of the current PHP.
                  cd    Change to directories
            download    Download php
               clean    Clean up the source directory of a PHP distribution
              update    Update PHP release source file
               ctags    Run ctags at current php source dir for extension development.
                 fpm    fpm commands
            list-ini    List loaded ini config files.
         self-update    Self-update, default to master version
              remove    Remove installed php build.
               purge    Remove installed php version and config files.
                 off    Temporarily go back to the system php
          switch-off    Definitely go back to the system php
              system    Get or set the internally used PHP binary
          system-off    Use the currently effective PHP binary internally

HELP
        'phpbrew help' lists available subcommands and some topics. See
        'phpbrew help <command>' or 'phpbrew help <topic>' to read about a
        specific subcommand or phpbrew.

phpbrew 2.2.0           powered by https://github.com/c9s/CLIFramework

@s22-tech
Copy link
Author

Well, that's strange. I just ran % phpbrew -v again under PHP 8.3.3 and got the same output. These are deprecated warnings - not errors that could be caused by a missing extension or something. 🫤 However, I did update all listed dependencies for phpbrew, but that didn't change anything for me.

I wonder what could be causing this?

@peter279k
Copy link
Member

Maybe I need to reproduce the issue in the MacOS 13.5(Ventura).

These outputs I generate in the Ubuntu 20.04.

@peter279k
Copy link
Member

I cannot use the MacOS 13.5 and I try to reproduce this issue in the MacOS 12.2.

It seems that this will be verified because of this reason I found.

The deprecated notice message is not presented in the Ubuntu 20.04 because my PHP package I install turn off the deprecated warning message in the php.ini file by default.

Here are my running command logs:

% sw_vers
ProductName:    macOS
ProductVersion: 12.6.6
BuildVersion:   21G646
% brew tap shivammathur/php
% brew install php@8.2
% brew link --overwrite --force php@8.2
% php -v
PHP 8.2.17 (cli) (built: Mar 14 2024 18:17:12) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.17, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.17, Copyright (c), by Zend Technologies
% curl -L -O https://github.com/phpbrew/phpbrew/releases/latest/download/phpbrew.phar
% chmod +x phpbrew.phar
% sudo mv phpbrew.phar /usr/local/bin/phpbrew
% phpbrew init
%  source /Users/cloudxmac/.phpbrew/bashrc
% phpbrew -v
  ______ _   _ ____________
  | ___ \ | | || ___ \ ___ \
  | |_/ / |_| || |_/ / |_/ /_ __ _____      __
  |  __/|  _  ||  __/| ___ \ '__/ _ \ \ /\ / /
  | |   | | | || |   | |_/ / | |  __/\ V  V /
  \_|   \_| |_/\_|   \____/|_|  \___| \_/\_/

PHP Deprecated:  Callables of the form ["PhpBrew\Command\HelpCommand", "parent::execute"] are deprecated in phar:///usr/local/bin/phpbrew/src/PhpBrew/Command/HelpCommand.php on line 28

Deprecated: Callables of the form ["PhpBrew\Command\HelpCommand", "parent::execute"] are deprecated in phar:///usr/local/bin/phpbrew/src/PhpBrew/Command/HelpCommand.php on line 28
Brew your latest php!

PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///usr/local/bin/phpbrew/vendor/corneltek/cliframework/src/Command/HelpCommand.php on line 156

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in phar:///usr/local/bin/phpbrew/vendor/corneltek/cliframework/src/Command/HelpCommand.php on line 156

I plan to fix this issue in the next released version. And thanks for your reporting issue.

@s22-tech
Copy link
Author

It finally makes sense now! 🙂 I didn't realize you could turn off deprecated warnings.

I look forward to the next release. Thanks!

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

2 participants