Skip to content

BUG: PHP Runtime Deprecations due Non-canonical casts under PHP 8.5.x #1962

@bavarianbytes

Description

@bavarianbytes

I have checked that the bug exists in the dev-development branch
Yes

I have checked that there are no already open issues or recently closed issues about this bug
Yes

Describe the bug
Running vhs (7.2.0) under PHP 8.5.1 (and TYPO3 13.4.23) leads to several "PHP Runtime Deprecation Notice" exceptions.
Looks like the used casting method is deprecated in PHP 8.5.x, e.g. (boolean) instead of newer (bool). But the vhs composer.json explicitly allows PHP ^8.

Two examples:

PHP Runtime Deprecation Notice: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in /.../vendor/fluidtypo3/vhs/Classes/ViewHelpers/Condition/Page/HasSubpagesViewHelper.php line 50
PHP Runtime Deprecation Notice: Non-canonical cast (integer) is deprecated, use the (int) cast instead in /.../vendor/fluidtypo3/vhs/Classes/ViewHelpers/Condition/Iterator/ContainsViewHelper.php line 116

To Reproduce
Steps to reproduce the behavior:

  1. Install latest vhs version and use PHP 8.5.x
  2. Call the backend url
  3. See error

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