Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
wp: ['6.5', '6.6', '6.7', '6.8', '6.9']

steps:
Expand Down
5 changes: 5 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode" />
</rule>

<!-- Rules: PHP compatibility -->
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibilityWP"/>
</ruleset>
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This plugin uses the OAuth 2 protocol to allow delegated authorization; that is,

This plugin only supports WordPress >= 4.8.

Requires PHP 7.4 or higher.

## Contributors Welcome!

This plugin works and is in use in several production environments, but the user experience and documentation could be substantially improved. We welcome input and contributions to make this tool better!
Expand Down
1 change: 1 addition & 0 deletions bin/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Contributors: rmccue, rachelbaker, danielbachhuber, joehoyle
Tags: json, rest, api, rest-api
Requires at least: 4.8
Requires PHP: 7.4
Tested up to: 4.8
Stable tag: {{TAG}}
License: GPLv2 or later
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"composer/installers": "^1 || ^2",
"php": ">=7.4"
"php": "^7.4 || ^8.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.13.1",
Expand Down
2 changes: 1 addition & 1 deletion inc/admin/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function validate_parameters( $params ) {
*
* @return array|null List of errors. Issues a redirect and exits on success.
*/
function handle_edit_submit( Client $consumer = null ) {
function handle_edit_submit( ?Client $consumer = null ) {
$messages = [];
if ( empty( $consumer ) ) {
$did_action = 'add';
Expand Down
1 change: 1 addition & 0 deletions inc/class-scopes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

class Scopes {
protected $capabilities;
protected $scopes = [];

public function __construct() {
$this->capabilities = [];
Expand Down
2 changes: 1 addition & 1 deletion inc/types/class-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected function validate_redirect_uri( Client $client, $redirect_uri = null )
* @param Client $client Client being authorised.
* @param WP_Error $errors Errors to display, if any.
*/
protected function render_form( Client $client, WP_Error $errors = null ) {
protected function render_form( Client $client, ?WP_Error $errors = null ) {
$file = locate_template( 'oauth2-authorize.php' );
if ( empty( $file ) ) {
$file = dirname( dirname( __DIR__ ) ) . '/theme/oauth2-authorize.php';
Expand Down
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Text Domain: oauth2
* Domain Path: /languages
* Requires at least: 4.8
* Requires PHP: 5.6
* Requires PHP: 7.4
*/

namespace WP\OAuth2;
Expand Down
Loading