You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# show current insalled version
composer show --tree phpcompatibility/php-compatibility
# run phpcs in a very basic file -> no deprecation found for PHP 8.2
./vendor/bin/phpcs test_php_8_2.php --standard="10up-Default"
# require the develop branch of phpcompatibility/php-compatibility as an alias in your project
composer require --dev phpcompatibility/php-compatibility:"dev-develop as 9.99.99"
# show current insalled version
# should be phpcompatibility/php-compatibility dev-develop
composer show --tree phpcompatibility/php-compatibility
# run phpcs again -> should flag about utf8_encode()
./vendor/bin/phpcs test_php_8_2.php --standard="10up-Default"
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------
8 | WARNING | Function utf8_encode() is deprecated since PHP 8.2; Use mb_convert_encoding(), UConverter::transcode() or iconv instead
---------------------------------------------------------------------------------------------------------------------------------------
Screenshots, screen recording, code snippet
Environment information
No response
WordPress information
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
I've managed to replicate this issue, but can't seem to find a way to resolve it 🤔
Do you have any thoughts here? The other option is that we add the following to the installation instructions until v10 of PHPCompatibility and V3 of PHPCompatibilityWP are released, which would resolve this issue.
composer require --dev phpcompatibility/php-compatibility:"dev-develop as 9.99.99"
Hi @darylldoyle, thanks for checking. I'm not sure we can resolve the issue without requiring the package at the project level. The proposed solution works for me.
Describe the bug
If you clone the project and run composer install, it installs
![image](https://private-user-images.githubusercontent.com/4009928/291636965-25a991ed-88a3-4012-bcec-9f6a10dba46b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTQwMDUsIm5iZiI6MTczOTE1MzcwNSwicGF0aCI6Ii80MDA5OTI4LzI5MTYzNjk2NS0yNWE5OTFlZC04OGEzLTQwMTItYmNlYy05ZjZhMTBkYmE0NmIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDIxNTA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Njg3NTlmOWI3MGEyN2ZjYjk2MTQzOTQyMDNlZjI4OWQ3MTE2OGQ2OTYxNmRkZjMwN2RkMzg1OTdjZTFjNWM4ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.VyzIth9R2bJiBU7nLutWgqxXwZJLskgSDuo2t3R9vus)
phpcompatibility/php-compatibility dev-develop
which has the latest PHP sniffs.But when is installed via package in a project, is still using
![image](https://private-user-images.githubusercontent.com/4009928/291637477-daaaf229-80ea-4c04-a0c2-7be6724759bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTQwMDUsIm5iZiI6MTczOTE1MzcwNSwicGF0aCI6Ii80MDA5OTI4LzI5MTYzNzQ3Ny1kYWFhZjIyOS04MGVhLTRjMDQtYTBjMi03YmU2NzI0NzU5YmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDIxNTA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2I2MmU2ZGU4ODcwOWU5OGVlYzI5MmVlZGM5ZmQzMjhhZDJkZDhjYmU2ZGIyMzUwMTJlY2E5OGVmM2U2OWNlMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.LNw1y8WLGiMcr8scFk-71E5ULQ49qfkzcvY73WWLy7A)
phpcompatibility/php-compatibility 9.3.5
:As a temp fix I added, the alias to my project:
composer require --dev phpcompatibility/php-compatibility:"dev-develop as 9.99.99"
Steps to Reproduce
#create a file for testing
![testphpcs 2023-12-19 16-44-33](https://private-user-images.githubusercontent.com/4009928/291640216-b6e509ce-ca0e-46e5-8b58-3d9704bfd07b.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTQwMDUsIm5iZiI6MTczOTE1MzcwNSwicGF0aCI6Ii80MDA5OTI4LzI5MTY0MDIxNi1iNmU1MDljZS1jYTBlLTQ2ZTUtOGI1OC0zZDk3MDRiZmQwN2IuanBnP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDIxNTA1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmU3ZTllOTFlMjJjZDhhNDcxNmFlMGNmYzk2MzU4MDJkYTQ2MGRmNjFmZWYxNDQ1NmNhOWI2OGQxNDkzYzQ0ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.1qC83lnFrtApS1lqwr9IB0821EfzBXozq97m0Gt9l7g)
2.
Screenshots, screen recording, code snippet
Environment information
No response
WordPress information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: