Skip to content

PHP 8 #116

Description

@malcolmfowler

Will there be an upgrade for PHP 8.0 ?

It will not run under this version.

Activity

  1. kstan79 commented on May 27, 2025

    @kstan79
    Contributor

    Php 8 should able to run. It supported since long time ago

  2. malcolmfowler commented on May 27, 2025

    @malcolmfowler
    Author

    I'm getting this error:
    Fatal error: Default value for parameters with a class type can only be NULL in D:\xampp\htdocs\cargo-label\vendor\simitgroup\phpjasperxml\src\Tools\Toolbox.php on line 49

    It's a simple report file with no parameters

    My php version:
    D:\xampp\htdocs\cargo-label>php -v
    PHP 7.4.30 (cli) (built: Jun 7 2022 16:24:55) ( ZTS Visual C++ 2017 x64 )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans

  3. kstan79 commented on May 27, 2025

    @kstan79
    Contributor

    You may try with the example in this project. Compare the php source code with yours

  4. malcolmfowler commented on May 29, 2025

    @malcolmfowler
    Author

    I am trying to locate the "sample.jrxml" file referred to in the readme so that we can carry out a simple test. It does not appear to be in the example folder.

  5. kstan79 commented on May 29, 2025

    @kstan79
    Contributor

    Version since version 2.1 tested in php 8.2 and we use it right now. I notice so sure what happen to you. However, I notice u use php 7.4. You may try to use php 8.1 or 8.2 test again?

  6. malcolmfowler commented on May 29, 2025

    @malcolmfowler
    Author

    Thank you I will try version 8.
    I asked AI to analyse toolbox.php and got these results
    In your Toolbox.php trait, the following functions define parameters with a mixed type hint and default values:
    public function console(mixed $txt='')
    public function failed(mixed $txt='')
    This violates PHP's rules, as default values for typed parameters can only be NULL.

  7. kstan79 commented on May 30, 2025

    @kstan79
    Contributor

    O k you may send pr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions