From 2a5d2ce2ea9786325bab73f7207739df052ef831 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Thu, 28 Sep 2023 11:01:47 +0530 Subject: [PATCH 1/9] fix validator as repo has moved to 10up --- composer.json | 16 ++- composer.lock | 239 +++++++++++++------------------------ restricted_site_access.php | 2 +- 3 files changed, 96 insertions(+), 161 deletions(-) diff --git a/composer.json b/composer.json index e842d681..d7d68bc9 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,15 @@ "test": "phpunit", "test:acceptance": "wpacceptance run", "lint": "phpcs --extensions=php -s .", - "lint-fix": "phpcbf --extensions=php ." + "lint-fix": "phpcbf --extensions=php .", + "post-install-cmd": [ + "./vendor/siddharth/wp-compat-validation-tools/replace-namespace.sh RSA_Validator", + "composer dump-autoload" + ], + "post-update-cmd": [ + "./vendor/siddharth/wp-compat-validation-tools/replace-namespace.sh RSA_Validator", + "composer dump-autoload" + ] }, "minimum-stability": "dev", "config": { @@ -30,14 +38,12 @@ "platform-check": false }, "require": { - "mlocati/ip-lib": "dev-master", - "siddharth/wp-compat-checker": "dev-master", - "php": ">=7.4" + "siddharth/wp-compat-validation-tools": "dev-trunk" }, "repositories": [ { "type": "git", - "url": "https://github.com/Sidsector9/wp-compat-checker.git" + "url": "https://github.com/Sidsector9/wp-compat-validation-tools.git" } ] } diff --git a/composer.lock b/composer.lock index 7befdc0f..8bf777e9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,96 +4,23 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0dd4e7ba0a6791c2cd6062c426a6bff3", + "content-hash": "3e170f8f5a3f72c9bae611432ce0b2ad", "packages": [ { - "name": "mlocati/ip-lib", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/mlocati/ip-lib.git", - "reference": "6fec056ea3ca0657ceec59db64edaa835f119be3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mlocati/ip-lib/zipball/6fec056ea3ca0657ceec59db64edaa835f119be3", - "reference": "6fec056ea3ca0657ceec59db64edaa835f119be3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "ext-pdo_sqlite": "*", - "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5 || ^8.5 || ^9.5" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "IPLib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michele Locati", - "email": "mlocati@gmail.com", - "homepage": "https://github.com/mlocati", - "role": "Author" - } - ], - "description": "Handle IPv4, IPv6 addresses and ranges", - "homepage": "https://github.com/mlocati/ip-lib", - "keywords": [ - "IP", - "address", - "addresses", - "ipv4", - "ipv6", - "manage", - "managing", - "matching", - "network", - "networking", - "range", - "subnet" - ], - "support": { - "issues": "https://github.com/mlocati/ip-lib/issues", - "source": "https://github.com/mlocati/ip-lib/tree/master" - }, - "funding": [ - { - "url": "https://github.com/sponsors/mlocati", - "type": "github" - }, - { - "url": "https://paypal.me/mlocati", - "type": "other" - } - ], - "time": "2022-11-04T21:44:49+00:00" - }, - { - "name": "siddharth/wp-compat-checker", - "version": "dev-master", + "name": "siddharth/wp-compat-validation-tools", + "version": "dev-trunk", "source": { "type": "git", - "url": "https://github.com/Sidsector9/wp-compat-checker.git", - "reference": "f3293ab4dbe3adde8b3ed5ddb42b7cc10c7b3635" + "url": "https://github.com/Sidsector9/wp-compat-validation-tools.git", + "reference": "79d89cb851b0b6ebeea1c0f9814bdb2ff8951d03" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { - "WP_Compat_Checker\\": "src/" + "WP_Compat_Validation_Tools\\": "src/" } }, - "time": "2023-08-03T18:38:53+00:00" + "time": "2023-09-03T07:19:38+00:00" } ], "packages-dev": [ @@ -103,12 +30,12 @@ "source": { "type": "git", "url": "https://github.com/10up/phpcs-composer.git", - "reference": "9c085cf0554a0b5311623548663aa9e4d8f52587" + "reference": "4a2f47d5ed0493836ef33ee2edad32192699fad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/10up/phpcs-composer/zipball/9c085cf0554a0b5311623548663aa9e4d8f52587", - "reference": "9c085cf0554a0b5311623548663aa9e4d8f52587", + "url": "https://api.github.com/repos/10up/phpcs-composer/zipball/4a2f47d5ed0493836ef33ee2edad32192699fad6", + "reference": "4a2f47d5ed0493836ef33ee2edad32192699fad6", "shasum": "" }, "require": { @@ -126,40 +53,41 @@ ], "authors": [ { - "name": "Ephraim Gregor", - "email": "ephraim.gregor@10up.com" + "name": "10up", + "homepage": "https://10up.com/" } ], + "description": "10up's PHP CodeSniffer Ruleset", "support": { "issues": "https://github.com/10up/phpcs-composer/issues", - "source": "https://github.com/10up/phpcs-composer/tree/master" + "source": "https://github.com/10up/phpcs-composer/tree/2.0.1" }, - "time": "2023-05-10T22:44:49+00:00" + "time": "2023-09-14T12:16:59+00:00" }, { "name": "automattic/vipwpcs", - "version": "2.3.3", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/Automattic/VIP-Coding-Standards.git", - "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b" + "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b", - "reference": "6cd0a6a82bc0ac988dbf9d6a7c2e293dc8ac640b", + "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", + "reference": "b8610e3837f49c5f2fcc4b663b6c0a7c9b3509b6", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", - "sirbrillig/phpcs-variable-analysis": "^2.11.1", - "squizlabs/php_codesniffer": "^3.5.5", + "sirbrillig/phpcs-variable-analysis": "^2.11.17", + "squizlabs/php_codesniffer": "^3.7.1", "wp-coding-standards/wpcs": "^2.3" }, "require-dev": { - "php-parallel-lint/php-console-highlighter": "^0.5", - "php-parallel-lint/php-parallel-lint": "^1.0", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9", "phpcsstandards/phpcsdevtools": "^1.0", "phpunit/phpunit": "^4 || ^5 || ^6 || ^7" @@ -179,6 +107,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -186,39 +115,42 @@ "source": "https://github.com/Automattic/VIP-Coding-Standards", "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" }, - "time": "2021-09-29T16:20:23+00:00" + "time": "2023-08-24T15:11:13+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.2", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", - "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", + "php": ">=5.4", "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpcompatibility/php-compatibility": "^9.0" + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, "type": "composer-plugin", "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, "autoload": { "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -234,7 +166,7 @@ }, { "name": "Contributors", - "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], "description": "PHP_CodeSniffer Standards Composer Installer Plugin", @@ -258,10 +190,10 @@ "tests" ], "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2022-02-04T12:51:07+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "doctrine/deprecations", @@ -269,12 +201,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "bdaa697ed9c7f5ee2f7d3b5f9c2a6f2519523cd9" + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/bdaa697ed9c7f5ee2f7d3b5f9c2a6f2519523cd9", - "reference": "bdaa697ed9c7f5ee2f7d3b5f9c2a6f2519523cd9", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", "shasum": "" }, "require": { @@ -307,9 +239,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.x" + "source": "https://github.com/doctrine/deprecations/tree/1.1.2" }, - "time": "2023-07-29T16:12:19+00:00" + "time": "2023-09-27T20:04:15+00:00" }, { "name": "doctrine/instantiator", @@ -448,12 +380,12 @@ "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "cfc54e30a4f5e5af5f9d9ce86697cfcc5f7e7c24" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/cfc54e30a4f5e5af5f9d9ce86697cfcc5f7e7c24", - "reference": "cfc54e30a4f5e5af5f9d9ce86697cfcc5f7e7c24", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -495,9 +427,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/4.x" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-07-30T21:38:32+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phar-io/manifest", @@ -915,12 +847,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "07100e65d09fd50608d649fc656cae1c921a2495" + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/07100e65d09fd50608d649fc656cae1c921a2495", - "reference": "07100e65d09fd50608d649fc656cae1c921a2495", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", "shasum": "" }, "require": { @@ -964,9 +896,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.x" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" }, - "time": "2023-07-20T19:57:33+00:00" + "time": "2023-08-12T11:01:26+00:00" }, { "name": "phpspec/prophecy", @@ -974,12 +906,12 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "e0ae0992aafbc5dee4337a700a44a8d04fbd2ccf" + "reference": "098f8850e4bd800b7734c65b2c8c10b28d87f10e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e0ae0992aafbc5dee4337a700a44a8d04fbd2ccf", - "reference": "e0ae0992aafbc5dee4337a700a44a8d04fbd2ccf", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/098f8850e4bd800b7734c65b2c8c10b28d87f10e", + "reference": "098f8850e4bd800b7734c65b2c8c10b28d87f10e", "shasum": "" }, "require": { @@ -1026,6 +958,7 @@ "keywords": [ "Double", "Dummy", + "dev", "fake", "mock", "spy", @@ -1035,20 +968,20 @@ "issues": "https://github.com/phpspec/prophecy/issues", "source": "https://github.com/phpspec/prophecy/tree/master" }, - "time": "2023-06-21T12:00:53+00:00" + "time": "2023-08-31T13:58:35+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.23.x-dev", + "version": "1.24.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" + "reference": "bcad8d995980440892759db0c32acae7c8e79442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442", + "reference": "bcad8d995980440892759db0c32acae7c8e79442", "shasum": "" }, "require": { @@ -1065,7 +998,6 @@ "phpunit/phpunit": "^9.5", "symfony/process": "^5.2" }, - "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -1081,9 +1013,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2" }, - "time": "2023-08-03T16:32:59+00:00" + "time": "2023-09-26T12:28:12+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1091,12 +1023,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9e1baee3a7525530f5600035759ce754a8b3750b" + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9e1baee3a7525530f5600035759ce754a8b3750b", - "reference": "9e1baee3a7525530f5600035759ce754a8b3750b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", "shasum": "" }, "require": { @@ -1153,7 +1085,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" }, "funding": [ { @@ -1161,7 +1093,7 @@ "type": "github" } ], - "time": "2023-08-02T09:00:29+00:00" + "time": "2023-09-19T04:57:46+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2477,12 +2409,12 @@ "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "002ae3ab4ca052823c676de4ec7503e96aaf5a35" + "reference": "191ed14c00358f5cb4c286c3e9137510f52ff5c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/002ae3ab4ca052823c676de4ec7503e96aaf5a35", - "reference": "002ae3ab4ca052823c676de4ec7503e96aaf5a35", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/191ed14c00358f5cb4c286c3e9137510f52ff5c0", + "reference": "191ed14c00358f5cb4c286c3e9137510f52ff5c0", "shasum": "" }, "require": { @@ -2528,7 +2460,7 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2023-07-19T00:44:18+00:00" + "time": "2023-09-13T17:22:00+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -2751,12 +2683,12 @@ "source": { "type": "git", "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", - "reference": "f4c425a8aae6c1f2d448289b42311d58af5ff7a4" + "reference": "f1f7e15daf4f0e7225757ff902322df6d47c1385" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/f4c425a8aae6c1f2d448289b42311d58af5ff7a4", - "reference": "f4c425a8aae6c1f2d448289b42311d58af5ff7a4", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/f1f7e15daf4f0e7225757ff902322df6d47c1385", + "reference": "f1f7e15daf4f0e7225757ff902322df6d47c1385", "shasum": "" }, "require": { @@ -2803,22 +2735,19 @@ "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues", "source": "https://github.com/Yoast/PHPUnit-Polyfills" }, - "time": "2023-06-06T15:51:44+00:00" + "time": "2023-09-27T10:45:26+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "mlocati/ip-lib": 20, - "siddharth/wp-compat-checker": 20, + "siddharth/wp-compat-validation-tools": 20, "10up/phpcs-composer": 20, "yoast/phpunit-polyfills": 20 }, "prefer-stable": false, "prefer-lowest": false, - "platform": { - "php": ">=7.4" - }, + "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/restricted_site_access.php b/restricted_site_access.php index e280181e..26dae4e0 100644 --- a/restricted_site_access.php +++ b/restricted_site_access.php @@ -17,7 +17,7 @@ if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) { require_once __DIR__ . '/vendor/autoload.php'; - $compat_checker = new \WP_Compat_Checker\WP_Compat_Checker(); + $compat_checker = new \RSA_Validator\Validator(); $compat_checker ->set_plugin_name( 'Restricted Site Access' ) ->set_php_min_required_version( '7.4' ); From f4ec391ee4a35503706c6358103defbb66e6a5d5 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 3 Oct 2023 21:11:52 +0530 Subject: [PATCH 2/9] fix plugin validator --- composer.json | 8 ++++---- composer.lock | 39 ++++++++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index d7d68bc9..10decf15 100644 --- a/composer.json +++ b/composer.json @@ -22,11 +22,11 @@ "lint": "phpcs --extensions=php -s .", "lint-fix": "phpcbf --extensions=php .", "post-install-cmd": [ - "./vendor/siddharth/wp-compat-validation-tools/replace-namespace.sh RSA_Validator", + "./vendor/10up/wp-compat-validation-tool/replace-namespace.sh RSA_Validator", "composer dump-autoload" ], "post-update-cmd": [ - "./vendor/siddharth/wp-compat-validation-tools/replace-namespace.sh RSA_Validator", + "./vendor/10up/wp-compat-validation-tool/replace-namespace.sh RSA_Validator", "composer dump-autoload" ] }, @@ -38,12 +38,12 @@ "platform-check": false }, "require": { - "siddharth/wp-compat-validation-tools": "dev-trunk" + "10up/wp-compat-validation-tool": "dev-trunk" }, "repositories": [ { "type": "git", - "url": "https://github.com/Sidsector9/wp-compat-validation-tools.git" + "url": "https://github.com/10up/wp-compat-validation-tool.git" } ] } diff --git a/composer.lock b/composer.lock index 8bf777e9..48ea6da8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,23 +4,36 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3e170f8f5a3f72c9bae611432ce0b2ad", + "content-hash": "5e47c0d8fab672c136d24352b55e88b1", "packages": [ { - "name": "siddharth/wp-compat-validation-tools", + "name": "10up/wp-compat-validation-tool", "version": "dev-trunk", "source": { "type": "git", - "url": "https://github.com/Sidsector9/wp-compat-validation-tools.git", - "reference": "79d89cb851b0b6ebeea1c0f9814bdb2ff8951d03" + "url": "https://github.com/10up/wp-compat-validation-tool.git", + "reference": "b2279a76d962319f0b48bc534af0d0b5a22d23ab" }, "type": "library", "autoload": { "psr-4": { - "WP_Compat_Validation_Tools\\": "src/" + "WP_Compat_Validation_Tool\\": "src/" } }, - "time": "2023-09-03T07:19:38+00:00" + "license": [ + "MIT" + ], + "authors": [ + { + "name": "10up", + "email": "opensource@10up.com", + "homepage": "https://10up.com", + "role": "Developer" + } + ], + "description": "Perform PHP and WP version compatibility checks in your plugin.", + "homepage": "https://github.com/10up/wp-compat-validation-tool", + "time": "2023-10-03T04:05:28+00:00" } ], "packages-dev": [ @@ -1023,12 +1036,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "a296faea1fc5986d39243fde2abd9504f05079ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a296faea1fc5986d39243fde2abd9504f05079ca", + "reference": "a296faea1fc5986d39243fde2abd9504f05079ca", "shasum": "" }, "require": { @@ -1085,7 +1098,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" }, "funding": [ { @@ -1093,7 +1106,7 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-09-29T10:36:14+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2741,7 +2754,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { - "siddharth/wp-compat-validation-tools": 20, + "10up/wp-compat-validation-tool": 20, "10up/phpcs-composer": 20, "yoast/phpunit-polyfills": 20 }, @@ -2749,5 +2762,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From 25dd00eb96a7498e1e94e356d27b87ad553a7ab4 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Tue, 10 Oct 2023 15:14:48 +0530 Subject: [PATCH 3/9] update validator tool --- .gitignore | 1 + composer.json | 13 ++-- composer.lock | 181 +++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 175 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index ca896325..75cedab8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ screenshots assets/js/build .wp-env.override.json .idea +10up-lib tests/cypress/screenshots tests/cypress/videos diff --git a/composer.json b/composer.json index 10decf15..e49d218b 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,10 @@ "lint": "phpcs --extensions=php -s .", "lint-fix": "phpcbf --extensions=php .", "post-install-cmd": [ - "./vendor/10up/wp-compat-validation-tool/replace-namespace.sh RSA_Validator", - "composer dump-autoload" + "./10up-lib/wp-compat-validation-tool/replace-namespace.sh RSA_Validator" ], "post-update-cmd": [ - "./vendor/10up/wp-compat-validation-tool/replace-namespace.sh RSA_Validator", - "composer dump-autoload" + "./10up-lib/wp-compat-validation-tool/replace-namespace.sh RSA_Validator" ] }, "minimum-stability": "dev", @@ -45,5 +43,10 @@ "type": "git", "url": "https://github.com/10up/wp-compat-validation-tool.git" } - ] + ], + "extra": { + "installer-paths": { + "./{$name}/": ["10up/wp-compat-validation-tool"] + } + } } diff --git a/composer.lock b/composer.lock index 48ea6da8..18304062 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5e47c0d8fab672c136d24352b55e88b1", + "content-hash": "05548f799def9aad861d6bf217eb06e3", "packages": [ { "name": "10up/wp-compat-validation-tool", @@ -12,9 +12,15 @@ "source": { "type": "git", "url": "https://github.com/10up/wp-compat-validation-tool.git", - "reference": "b2279a76d962319f0b48bc534af0d0b5a22d23ab" + "reference": "4ce23b31bb65a0ce23190139d0099118203948cb" + }, + "require": { + "composer/installers": "^2.2" + }, + "type": "wordpress-plugin", + "extra": { + "installer-name": "10up-lib/wp-compat-validation-tool" }, - "type": "library", "autoload": { "psr-4": { "WP_Compat_Validation_Tool\\": "src/" @@ -33,7 +39,153 @@ ], "description": "Perform PHP and WP version compatibility checks in your plugin.", "homepage": "https://github.com/10up/wp-compat-validation-tool", - "time": "2023-10-03T04:05:28+00:00" + "time": "2023-10-09T06:28:24+00:00" + }, + { + "name": "composer/installers", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "2a9170263fcd9cc4fd0b50917293c21d6c1a5bfe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/2a9170263fcd9cc4fd0b50917293c21d6c1a5bfe", + "reference": "2a9170263fcd9cc4fd0b50917293c21d6c1a5bfe", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan-phpunit": "^0.12.16", + "symfony/phpunit-bridge": "^5.3", + "symfony/process": "^5" + }, + "default-branch": true, + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-main": "2.x-dev" + }, + "plugin-modifies-install-path": true + }, + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "MantisBT", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Starbug", + "Thelia", + "Whmcs", + "WolfCMS", + "agl", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "known", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "matomo", + "mediawiki", + "miaoxing", + "modulework", + "modx", + "moodle", + "osclass", + "pantheon", + "phpbb", + "piwik", + "ppi", + "processwire", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "sylius", + "tastyigniter", + "wordpress", + "yawik", + "zend", + "zikula" + ], + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/main" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-10-12T12:07:30+00:00" } ], "packages-dev": [ @@ -393,12 +545,12 @@ "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "54103d838734be0499172026525e38cbf6af2711" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/54103d838734be0499172026525e38cbf6af2711", + "reference": "54103d838734be0499172026525e38cbf6af2711", "shasum": "" }, "require": { @@ -409,7 +561,6 @@ "ircmaxell/php-yacc": "^0.0.7", "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, - "default-branch": true, "bin": [ "bin/php-parse" ], @@ -440,9 +591,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/4.x" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2023-10-03T21:00:18+00:00" }, { "name": "phar-io/manifest", @@ -1036,12 +1187,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "a296faea1fc5986d39243fde2abd9504f05079ca" + "reference": "0b6cb84a359426d34e439ce6d1173b41e07cb672" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a296faea1fc5986d39243fde2abd9504f05079ca", - "reference": "a296faea1fc5986d39243fde2abd9504f05079ca", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0b6cb84a359426d34e439ce6d1173b41e07cb672", + "reference": "0b6cb84a359426d34e439ce6d1173b41e07cb672", "shasum": "" }, "require": { @@ -1106,7 +1257,7 @@ "type": "github" } ], - "time": "2023-09-29T10:36:14+00:00" + "time": "2023-10-06T09:53:04+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2762,5 +2913,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.1.0" } From eee87f64fe6a3ddddd63eaeb8d503a10e4feb061 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Wed, 11 Oct 2023 18:44:45 +0530 Subject: [PATCH 4/9] add missing dependencies --- composer.json | 4 ++- composer.lock | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e49d218b..fc4ac653 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,9 @@ "platform-check": false }, "require": { - "10up/wp-compat-validation-tool": "dev-trunk" + "10up/wp-compat-validation-tool": "dev-trunk", + "mlocati/ip-lib": "dev-master", + "php": ">=7.4" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 18304062..03029716 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "05548f799def9aad861d6bf217eb06e3", + "content-hash": "b7fb2afd477f26267dbe5e7a2615920c", "packages": [ { "name": "10up/wp-compat-validation-tool", @@ -186,6 +186,78 @@ } ], "time": "2022-10-12T12:07:30+00:00" + }, + { + "name": "mlocati/ip-lib", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/mlocati/ip-lib.git", + "reference": "eb3656df7e954babbeb7dbffa48210812139a740" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mlocati/ip-lib/zipball/eb3656df7e954babbeb7dbffa48210812139a740", + "reference": "eb3656df7e954babbeb7dbffa48210812139a740", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5 || ^8.5 || ^9.5" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "IPLib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michele Locati", + "email": "mlocati@gmail.com", + "homepage": "https://github.com/mlocati", + "role": "Author" + } + ], + "description": "Handle IPv4, IPv6 addresses and ranges", + "homepage": "https://github.com/mlocati/ip-lib", + "keywords": [ + "IP", + "address", + "addresses", + "ipv4", + "ipv6", + "manage", + "managing", + "matching", + "network", + "networking", + "range", + "subnet" + ], + "support": { + "issues": "https://github.com/mlocati/ip-lib/issues", + "source": "https://github.com/mlocati/ip-lib/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sponsors/mlocati", + "type": "github" + }, + { + "url": "https://paypal.me/mlocati", + "type": "other" + } + ], + "time": "2023-09-11T20:23:39+00:00" } ], "packages-dev": [ @@ -2906,6 +2978,7 @@ "minimum-stability": "dev", "stability-flags": { "10up/wp-compat-validation-tool": 20, + "mlocati/ip-lib": 20, "10up/phpcs-composer": 20, "yoast/phpunit-polyfills": 20 }, From 8442a33a8fad6ed6ed02bcc495066f5da3415c6f Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Wed, 11 Oct 2023 19:02:34 +0530 Subject: [PATCH 5/9] use develop branch of 10up/wp-compat-validation-tool --- composer.json | 2 +- composer.lock | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index fc4ac653..1a0892b6 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "platform-check": false }, "require": { - "10up/wp-compat-validation-tool": "dev-trunk", + "10up/wp-compat-validation-tool": "dev-develop", "mlocati/ip-lib": "dev-master", "php": ">=7.4" }, diff --git a/composer.lock b/composer.lock index 03029716..76408f99 100644 --- a/composer.lock +++ b/composer.lock @@ -4,19 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b7fb2afd477f26267dbe5e7a2615920c", + "content-hash": "d51cbd68932f91856794081a673b3d22", "packages": [ { "name": "10up/wp-compat-validation-tool", - "version": "dev-trunk", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/10up/wp-compat-validation-tool.git", - "reference": "4ce23b31bb65a0ce23190139d0099118203948cb" + "reference": "081a2f04fd4bb147d031462080c119eff2d884a7" }, "require": { "composer/installers": "^2.2" }, + "default-branch": true, "type": "wordpress-plugin", "extra": { "installer-name": "10up-lib/wp-compat-validation-tool" @@ -39,7 +40,7 @@ ], "description": "Perform PHP and WP version compatibility checks in your plugin.", "homepage": "https://github.com/10up/wp-compat-validation-tool", - "time": "2023-10-09T06:28:24+00:00" + "time": "2023-10-11T13:31:00+00:00" }, { "name": "composer/installers", @@ -2984,7 +2985,9 @@ }, "prefer-stable": false, "prefer-lowest": false, - "platform": [], + "platform": { + "php": ">=7.4" + }, "platform-dev": [], "plugin-api-version": "2.1.0" } From 58ec2d94065f6c5cdf2d84e7a36f58e4b1f93a32 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Wed, 11 Oct 2023 19:14:03 +0530 Subject: [PATCH 6/9] update composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1a0892b6..980bbc98 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,8 @@ "minimum-stability": "dev", "config": { "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "composer/installers": true }, "platform-check": false }, From 04931c9c028278859f4997598174a4af531f0f2a Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Wed, 11 Oct 2023 20:04:34 +0530 Subject: [PATCH 7/9] update bootstrap --- tests/php/bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/php/bootstrap.php b/tests/php/bootstrap.php index 8e6d367b..26b50c06 100644 --- a/tests/php/bootstrap.php +++ b/tests/php/bootstrap.php @@ -32,6 +32,7 @@ public function bootstrap() { // Give access to tests_add_filter() function. require_once $_tests_dir . '/includes/functions.php'; + require_once WP_PLUGIN_DIR . '/10up-lib/wp-compat-validation-tool/src/Validator.php'; /** * Manually load the plugin being tested. From 1a19ad4faf3b8afe34d6d366560bb192ad801d18 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Wed, 25 Oct 2023 11:49:47 +0530 Subject: [PATCH 8/9] include wp compat 0.3.0 --- composer.json | 2 +- composer.lock | 45 +++++++++++++++++++------------------- restricted_site_access.php | 26 ++++++++++++++-------- 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/composer.json b/composer.json index 980bbc98..1955ac8e 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "platform-check": false }, "require": { - "10up/wp-compat-validation-tool": "dev-develop", + "10up/wp-compat-validation-tool": "dev-trunk", "mlocati/ip-lib": "dev-master", "php": ">=7.4" }, diff --git a/composer.lock b/composer.lock index 76408f99..f58c345b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,19 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d51cbd68932f91856794081a673b3d22", + "content-hash": "1c8b0edbac56d1b1b7be0c34d8e31eff", "packages": [ { "name": "10up/wp-compat-validation-tool", - "version": "dev-develop", + "version": "dev-trunk", "source": { "type": "git", "url": "https://github.com/10up/wp-compat-validation-tool.git", - "reference": "081a2f04fd4bb147d031462080c119eff2d884a7" + "reference": "4ce23b31bb65a0ce23190139d0099118203948cb" }, "require": { "composer/installers": "^2.2" }, - "default-branch": true, "type": "wordpress-plugin", "extra": { "installer-name": "10up-lib/wp-compat-validation-tool" @@ -40,7 +39,7 @@ ], "description": "Perform PHP and WP version compatibility checks in your plugin.", "homepage": "https://github.com/10up/wp-compat-validation-tool", - "time": "2023-10-11T13:31:00+00:00" + "time": "2023-10-09T06:28:24+00:00" }, { "name": "composer/installers", @@ -194,12 +193,12 @@ "source": { "type": "git", "url": "https://github.com/mlocati/ip-lib.git", - "reference": "eb3656df7e954babbeb7dbffa48210812139a740" + "reference": "a2c0e36416a814ca164d873da77b19f6e7749aef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mlocati/ip-lib/zipball/eb3656df7e954babbeb7dbffa48210812139a740", - "reference": "eb3656df7e954babbeb7dbffa48210812139a740", + "url": "https://api.github.com/repos/mlocati/ip-lib/zipball/a2c0e36416a814ca164d873da77b19f6e7749aef", + "reference": "a2c0e36416a814ca164d873da77b19f6e7749aef", "shasum": "" }, "require": { @@ -258,7 +257,7 @@ "type": "other" } ], - "time": "2023-09-11T20:23:39+00:00" + "time": "2023-10-16T17:11:38+00:00" } ], "packages-dev": [ @@ -1020,12 +1019,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "7b217217725dc991a0ae7b995041cee1d5019561" + "reference": "c86c8d449b863bdaed15861a32dc4c50f8e3a832" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/7b217217725dc991a0ae7b995041cee1d5019561", - "reference": "7b217217725dc991a0ae7b995041cee1d5019561", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/c86c8d449b863bdaed15861a32dc4c50f8e3a832", + "reference": "c86c8d449b863bdaed15861a32dc4c50f8e3a832", "shasum": "" }, "require": { @@ -1076,7 +1075,7 @@ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" }, - "time": "2023-03-12T10:50:44+00:00" + "time": "2023-10-13T06:34:03+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1084,12 +1083,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + "reference": "181f43ae2f4afbbdd9426dc0fd8db0444439a033" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/181f43ae2f4afbbdd9426dc0fd8db0444439a033", + "reference": "181f43ae2f4afbbdd9426dc0fd8db0444439a033", "shasum": "" }, "require": { @@ -1133,9 +1132,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.x" }, - "time": "2023-08-12T11:01:26+00:00" + "time": "2023-10-13T06:37:27+00:00" }, { "name": "phpspec/prophecy", @@ -1260,12 +1259,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "0b6cb84a359426d34e439ce6d1173b41e07cb672" + "reference": "a941554183490e17580945faf64d46bc4faf97e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0b6cb84a359426d34e439ce6d1173b41e07cb672", - "reference": "0b6cb84a359426d34e439ce6d1173b41e07cb672", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a941554183490e17580945faf64d46bc4faf97e2", + "reference": "a941554183490e17580945faf64d46bc4faf97e2", "shasum": "" }, "require": { @@ -1330,7 +1329,7 @@ "type": "github" } ], - "time": "2023-10-06T09:53:04+00:00" + "time": "2023-10-20T08:36:13+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2989,5 +2988,5 @@ "php": ">=7.4" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.6.0" } diff --git a/restricted_site_access.php b/restricted_site_access.php index 3811ec26..d12feda1 100644 --- a/restricted_site_access.php +++ b/restricted_site_access.php @@ -14,18 +14,26 @@ */ // Try and include our autoloader. +if ( ! is_readable( __DIR__ . '/10up-lib/wp-compat-validation-tool/src/Validator.php' ) ) { + return; +} + +require_once '10up-lib/wp-compat-validation-tool/src/Validator.php'; + +$compat_checker = new \RSA_Validator\Validator(); +$compat_checker + ->set_plugin_name( 'Restricted Site Access' ) + ->set_php_min_required_version( '7.4' ); + +if ( ! $compat_checker->is_plugin_compatible() ) { + return; +} + if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) { require_once __DIR__ . '/vendor/autoload.php'; +} - $compat_checker = new \RSA_Validator\Validator(); - $compat_checker - ->set_plugin_name( 'Restricted Site Access' ) - ->set_php_min_required_version( '7.4' ); - - if ( ! $compat_checker->is_plugin_compatible() ) { - return; - } -} elseif ( ! class_exists( 'IPLib\\Factory' ) ) { +if ( ! class_exists( 'IPLib\\Factory' ) ) { add_action( 'admin_notices', function() { From 50f8fd9c85b8a40362c01efe8dfb2e35b3269273 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Wed, 25 Oct 2023 18:43:15 +0530 Subject: [PATCH 9/9] update lock file --- composer.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index f58c345b..85836dbd 100644 --- a/composer.lock +++ b/composer.lock @@ -12,7 +12,7 @@ "source": { "type": "git", "url": "https://github.com/10up/wp-compat-validation-tool.git", - "reference": "4ce23b31bb65a0ce23190139d0099118203948cb" + "reference": "bb0d2a3f0e6c9e3df5f95c366abcaeaf2e1a05d3" }, "require": { "composer/installers": "^2.2" @@ -39,7 +39,7 @@ ], "description": "Perform PHP and WP version compatibility checks in your plugin.", "homepage": "https://github.com/10up/wp-compat-validation-tool", - "time": "2023-10-09T06:28:24+00:00" + "time": "2023-10-25T13:12:17+00:00" }, { "name": "composer/installers",