Skip to content

Commit

Permalink
Merge pull request #2 from alleyinteractive/initial
Browse files Browse the repository at this point in the history
Porting concurrent remote requests to feature plugin
  • Loading branch information
srtfisher authored Jul 27, 2022
2 parents 279b476 + 59d76e8 commit 585588f
Show file tree
Hide file tree
Showing 10 changed files with 835 additions and 6,758 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

All notable changes to `plugin_name` will be documented in this file.

## 0.1.0 - 202X-XX-XX
## 0.1.0 - 2022-07-26

- Initial release
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# wp-concurrent-remote-requests
# Concurrent Remote Requests Feature Plugin

Stable tag: 0.1.0

Expand All @@ -14,11 +14,14 @@ Tags: alleyinteractive, wp-concurrent-remote-requests

Contributors: alleyinteractive, srtfisher


[![Coding Standards](https://github.com/alleyinteractive/wp-concurrent-remote-requests/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/alleyinteractive/wp-concurrent-remote-requests/actions/workflows/coding-standards.yml)
[![Testing Suite](https://github.com/alleyinteractive/wp-concurrent-remote-requests/actions/workflows/unit-test.yml/badge.svg)](https://github.com/alleyinteractive/wp-concurrent-remote-requests/actions/workflows/unit-test.yml)

Feature plugin for concurrent HTTP remote requests.
A WordPress Feature plugin for concurrent HTTP remote requests in WordPress.
Adds namespaced helper functions to make concurrent remote requests. Being
tracked in
https://github.com/alleyinteractive/wp-concurrent-remote-requests/pull/2 and
https://core.trac.wordpress.org/ticket/37459.

## Installation

Expand All @@ -33,8 +36,33 @@ composer require alleyinteractive/wp-concurrent-remote-requests
Activate the plugin in WordPress and use it like so:

```php
$plugin = Alley\WP\Concurrent_Remote_Requests\Wp_Concurrent_Remote_Requests\Wp_Concurrent_Remote_Requests();
$plugin->perform_magic();
// Supports an array of URLs:
\Alley\WP\Concurrent_Remote_Requests\wp_remote_get(
[
'https://alley.co/',
'https://wordpress.org/',
]
);

// Or more complex requests.
\Alley\WP\Concurrent_Remote_Requests\wp_remote_request(
[
[
'https://alley.co/',
[
'body' => [ ... ],
'method' => 'POST',
],
],
[
'https://wordpress.org/',
[
'method' => 'DELETE',
],
],
]
);

```

## Testing
Expand Down
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"require-dev": {
"alleyinteractive/alley-coding-standards": "^0.3",
"mantle-framework/testkit": "^0.4",
"mantle-framework/testkit": "^0.5",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
Expand All @@ -33,13 +33,18 @@
},
"sort-packages": true
},
"autoload": {
"files": [
"src/helpers.php"
]
},
"extra": {
"wordpress-autoloader": {
"autoload": {
"Alley\\WP\\Concurrent_Remote_Requests\\Wp_Concurrent_Remote_Requests\\": "src"
"Alley\\WP\\Concurrent_Remote_Requests\\": "src"
},
"autoload-dev": {
"Alley\\WP\\Concurrent_Remote_Requests\\Wp_Concurrent_Remote_Requests\\Tests\\": "tests"
"Alley\\WP\\Concurrent_Remote_Requests\\Tests\\": "tests"
}
}
},
Expand Down
Loading

0 comments on commit 585588f

Please sign in to comment.