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

Conditionally adapt to Core Requests library #5783

Merged
merged 7 commits into from
May 11, 2023

Conversation

schlessera
Copy link
Member

This PR changes the logic to integrate with Requests so that it conditionally adapts to the version that ships with WordPress Core or falls back to the bundled one as needed.

@schlessera schlessera force-pushed the fix/conditionally-adapt-to-core-requests branch from f39ed99 to ea3d695 Compare May 5, 2023 16:43
@schlessera schlessera force-pushed the fix/conditionally-adapt-to-core-requests branch from 4e2a010 to 1dec519 Compare May 5, 2023 17:22
@schlessera schlessera force-pushed the fix/conditionally-adapt-to-core-requests branch from 1dec519 to 2b21853 Compare May 5, 2023 17:26
@danielbachhuber
Copy link
Member

As a FYI, I'm getting this error in wp-cli-dev:

$ wp maintenance release generate entity-command

Fatal error: Uncaught Error: Class "WpOrg\Requests\Autoload" not found in /Users/danielbachhuber/projects/wp-cli-dev/wp-cli/php/WP_CLI/Bootstrap/IncludeRequestsAutoloader.php:83
Stack trace:
#0 /Users/danielbachhuber/projects/wp-cli-dev/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\IncludeRequestsAutoloader->process(Object(WP_CLI\Bootstrap\BootstrapState))
#1 /Users/danielbachhuber/projects/wp-cli-dev/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#2 /Users/danielbachhuber/projects/wp-cli-dev/wp-cli/php/boot-fs.php(17): require_once('/Users/danielba...')
#3 {main}
  thrown in /Users/danielbachhuber/projects/wp-cli-dev/wp-cli/php/WP_CLI/Bootstrap/IncludeRequestsAutoloader.php on line 83

@danielbachhuber
Copy link
Member

As a FYI, I'm getting this error in wp-cli-dev

Deleting wp-cli-dev/composer.lock and running composer install fixed the issue for me.

@schlessera schlessera merged commit 78ee8b3 into main May 11, 2023
@schlessera schlessera deleted the fix/conditionally-adapt-to-core-requests branch May 11, 2023 13:35
@jmtorres
Copy link

This doesn't seem to resolve the case when connecting to a remote WP site through SSH with an alias (and probably by other means). I submitted another issue in relation to this: #5816

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

Successfully merging this pull request may close these issues.

3 participants