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

Compatibility with PHP 8.1 #2667

Closed
9 of 18 tasks
sjinks opened this issue Nov 26, 2021 · 3 comments
Closed
9 of 18 tasks

Compatibility with PHP 8.1 #2667

sjinks opened this issue Nov 26, 2021 · 3 comments

Comments

@sjinks
Copy link
Member

sjinks commented Nov 26, 2021

This is an umbrella issue for all PHP 8.1-related bugs.

The goal is to make vip-go-mu-plugins fully compatible with PHP 8.1.

We use the following commands to run the test suite against PHP 8.1:

./bin/test.sh --php 8.1  --phpunit 9 --wp nightly
./bin/test.sh --php 8.1  --phpunit 9 --wp nightly --multisite 1

So far, the test suite generates 448 errors.

Third-party plugins/dependencies:

  • Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php on line 40
  • PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/circleci/project/search/elasticpress/includes/classes/Feature/Search/Synonyms.php on line 329
  • Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php on line 51
  • Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php on line 68
  • Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php on line 82
  • Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php on line 91
  • Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Cookie/Jar.php on line 63
  • Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Cookie/Jar.php on line 73
  • Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Cookie/Jar.php on line 89
  • Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Cookie/Jar.php on line 102
  • Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/circleci/project/vendor/rmccue/requests/library/Requests/Cookie/Jar.php on line 111
  • PHP Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /home/circleci/project/vendor/rmccue/requests/library/Requests/Transport/cURL.php on line 345
@sjinks
Copy link
Member Author

sjinks commented May 16, 2022

With this "patch":

diff --git a/000-vip-init.php b/000-vip-init.php
index 2c132dbc9..0e9f1c8ff 100644
--- a/000-vip-init.php
+++ b/000-vip-init.php
@@ -272,3 +272,4 @@ if ( ! defined( 'WP_RUN_CORE_TESTS' ) || ! WP_RUN_CORE_TESTS ) {
 }
 
 do_action( 'vip_loaded' );
+error_reporting( error_reporting() & ~ ( E_DEPRECATED | E_USER_DEPRECATED ) );

all tests pass.

@github-actions
Copy link
Contributor

This issue has been marked stale because it has been open for 60 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep issues manageable and actionable and is not a comment on the quality of this issue nor on the work done so far. Closed issues are still valuable to the project and are available to be searched.

@github-actions
Copy link
Contributor

This issue has been marked stale because it has been open for 60 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep issues manageable and actionable and is not a comment on the quality of this issue nor on the work done so far. Closed issues are still valuable to the project and are available to be searched.

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