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

[PHP 7.4 - 8.1] Possible incompatibilities in vendor folder #68

Closed
jofranz opened this issue Apr 14, 2023 · 8 comments · Fixed by #72
Closed

[PHP 7.4 - 8.1] Possible incompatibilities in vendor folder #68

jofranz opened this issue Apr 14, 2023 · 8 comments · Fixed by #72

Comments

@jofranz
Copy link
Member

jofranz commented Apr 14, 2023

phpcs -p . --standard=PHPCompatibility --extensions=php --runtime-set testVersion 8.0-8.1

Master branch @ 3bb8033

Without composer update:

FILE: org.project60.bic/vendor/maennchen/zipstream-php/test/BigintTest.php
------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------
 16 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0x0000000012345678'
 24 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0x0000000087654321'
 54 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0x0000000100000000'
 62 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0xFFFFFFFFFFFFFFFF'
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 133 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 28 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 89 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php
------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------
 184 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 229 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 312 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 806 | ERROR | Function get_magic_quotes_gpc() is deprecated since PHP 7.4 and removed since PHP 8.0
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 89 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 533 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php
------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------
 310 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 369 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 370 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 386 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/TextGrid.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 78 | ERROR | The default value of the $flags parameter for htmlentities() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 317 | WARNING | INI directive 'auto_detect_line_endings' is deprecated since PHP 8.1
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------
 74 | WARNING | Function libxml_disable_entity_loader() is deprecated since PHP 8.0
 85 | WARNING | Function libxml_disable_entity_loader() is deprecated since PHP 8.0
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 93 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/myclabs/php-enum/src/Enum.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 22 | WARNING | 'enum' is a soft reserved keyword as of PHP version 8.1 and should not be used to name a class,
    |         | interface or trait or as part of a namespace (class declaration)
 22 | ERROR   | Function name, class name, namespace name or constant name can not be reserved keyword
    |         | 'implements' (since version 5.0)
------------------------------------------------------------------------------------------------------------------
@jofranz
Copy link
Member Author

jofranz commented Apr 14, 2023

After composer update:

Master branch @ 3bb8033

FILE: org.project60.bic/vendor/maennchen/zipstream-php/test/BigintTest.php
------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------
 16 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0x0000000012345678'
 24 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0x0000000087654321'
 54 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0x0000000100000000'
 62 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been
    |       | removed in PHP 7. Found: '0xFFFFFFFFFFFFFFFF'
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 133 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 28 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 89 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php
------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------
 184 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 229 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 312 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 806 | ERROR | Function get_magic_quotes_gpc() is deprecated since PHP 7.4 and removed since PHP 8.0
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 89 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 533 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php
------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------
 310 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 369 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 370 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
 386 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/TextGrid.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 78 | ERROR | The default value of the $flags parameter for htmlentities() was changed from ENT_COMPAT to
    |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
    |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 318 | WARNING | INI directive 'auto_detect_line_endings' is deprecated since PHP 8.1
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------
 74 | WARNING | Function libxml_disable_entity_loader() is deprecated since PHP 8.0
 88 | WARNING | Function libxml_disable_entity_loader() is deprecated since PHP 8.0
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 102 | ERROR | The default value of the $flags parameter for htmlspecialchars() was changed from ENT_COMPAT to
     |       | ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 in PHP 8.1. For cross-version compatibility, the $flags
     |       | parameter should be explicitly set.
------------------------------------------------------------------------------------------------------------------


FILE: org.project60.bic/vendor/myclabs/php-enum/src/Enum.php
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 22 | WARNING | 'enum' is a soft reserved keyword as of PHP version 8.1 and should not be used to name a class,
    |         | interface or trait or as part of a namespace (class declaration)
 22 | ERROR   | Function name, class name, namespace name or constant name can not be reserved keyword
    |         | 'implements' (since version 5.0)
------------------------------------------------------------------------------------------------------------------

@bjendres
Copy link
Member

Does this refer to the current master? You are aware that this is PHP8+, right?

@jofranz
Copy link
Member Author

jofranz commented May 2, 2023

I updated both comments above. Now refers to master on php 8.0 and php 8.1

@bjendres
Copy link
Member

Possible incompatibilities in vendor folder

Just to clarify: version 1.7.x is for PHP<8, 1.8.x is for PHP8+

@bjendres
Copy link
Member

Feel free to re-open if this is still relevant.

@jofranz
Copy link
Member Author

jofranz commented Jan 30, 2024

Above listed commit hash refers to version 1.9 which is PHP 8.x and thus still relevant

@jofranz jofranz reopened this Jan 30, 2024
@bjendres
Copy link
Member

So...to clarify: these ERRORS all refer to the vendor folder, right?

@jofranz Could you please:

  1. make sure that there are the same results wit the current 1.8.x branch
  2. see if those go away when updating the libraries?

@jofranz
Copy link
Member Author

jofranz commented Feb 14, 2024

There is a slight improvement for PHP 8.0 and PHP 8.1. See: #72 72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants