diff --git a/composer.json b/composer.json index 24c5091..b8fd014 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,8 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, - "composer/installers": false + "composer/installers": false, + "typisttech/imposter-plugin": true } }, "autoload": { @@ -41,6 +42,12 @@ }, "minimum-stability": "dev", "require": { - "opis/json-schema": "^2.0@dev" + "opis/json-schema": "^2.0@dev", + "typisttech/imposter-plugin": "^0.6.0@dev" + }, + "extra": { + "imposter": { + "namespace": "NineteenEightyFour\\NinteenEightyWoo" + } } } diff --git a/composer.lock b/composer.lock index 33b5ffd..f81db66 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": "d830ae7ed092c8c7a2756ace1d118cd3", + "content-hash": "78a719f99a72d465c1a23d0c75c35dc6", "packages": [ { "name": "opis/json-schema", @@ -198,6 +198,166 @@ "source": "https://github.com/opis/uri/tree/1.1.0" }, "time": "2021-05-22T15:57:08+00:00" + }, + { + "name": "typisttech/imposter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/TypistTech/imposter.git", + "reference": "0282df368b1862594f7ad09e50dbb264dbb146ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TypistTech/imposter/zipball/0282df368b1862594f7ad09e50dbb264dbb146ec", + "reference": "0282df368b1862594f7ad09e50dbb264dbb146ec", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "codeception/codeception": "^4.1", + "codeception/mockery-module": "^0.4.0", + "codeception/module-asserts": "^1.3", + "codeception/module-filesystem": "^1.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "typisttech/imposter-plugin": "Composer plugin to integrate composer and imposter" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "TypistTech\\Imposter\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Typist Tech", + "email": "imposter@typist.tech", + "homepage": "https://typist.tech" + }, + { + "name": "Tang Rufus", + "email": "tangrufus@gmail.com", + "homepage": "https://typist.tech", + "role": "Developer" + } + ], + "description": "Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.", + "homepage": "https://github.com/TypistTech/imposter", + "keywords": [ + "composer", + "dependency", + "monkey-patching", + "namespace", + "wordpress" + ], + "support": { + "email": "imposter@typist.tech", + "issues": "https://github.com/TypistTech/imposter/issues", + "source": "https://github.com/TypistTech/imposter" + }, + "funding": [ + { + "url": "https://typist.tech/donation/", + "type": "custom" + } + ], + "time": "2021-04-29T16:44:34+00:00" + }, + { + "name": "typisttech/imposter-plugin", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/TypistTech/imposter-plugin.git", + "reference": "11d16a7af76dc08e47b05c3baca93036404b4f93" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TypistTech/imposter-plugin/zipball/11d16a7af76dc08e47b05c3baca93036404b4f93", + "reference": "11d16a7af76dc08e47b05c3baca93036404b4f93", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1 || ^2.0", + "php": "^7.3 || ^8.0", + "typisttech/imposter": "^0.6.1" + }, + "require-dev": { + "codeception/codeception": "^4.1", + "codeception/module-asserts": "^1.3", + "codeception/module-cli": "^1.1", + "codeception/module-filesystem": "^1.0", + "composer/composer": "^1.10.19 || ^2.0", + "squizlabs/php_codesniffer": "^3.5", + "typisttech/codeception-composer-project-module": "^0.1.1" + }, + "default-branch": true, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-master": "0.6.x-dev" + }, + "class": "TypistTech\\Imposter\\Plugin\\ImposterPlugin" + }, + "autoload": { + "psr-4": { + "TypistTech\\Imposter\\Plugin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Typist Tech", + "email": "imposter-plugin@typist.tech", + "homepage": "https://www.typist.tech" + }, + { + "name": "Tang Rufus", + "email": "tangrufus@gmail.com", + "homepage": "https://www.typist.tech", + "role": "Developer" + } + ], + "description": "Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.", + "homepage": "https://github.com/TypistTech/imposter-plugin", + "keywords": [ + "composer", + "composer-plugin", + "dependency", + "monkey-patching", + "namespace", + "wordpress" + ], + "support": { + "email": "imposter-plugin@typist.tech", + "issues": "https://github.com/TypistTech/imposter-plugin/issues", + "source": "https://github.com/TypistTech/imposter-plugin" + }, + "funding": [ + { + "url": "https://typist.tech/donation/", + "type": "custom" + } + ], + "time": "2021-04-29T16:42:35+00:00" } ], "packages-dev": [ @@ -404,12 +564,12 @@ "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "70c96493b4caa5514b45429ec5fe6f412ea6cde6" + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/70c96493b4caa5514b45429ec5fe6f412ea6cde6", - "reference": "70c96493b4caa5514b45429ec5fe6f412ea6cde6", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { @@ -453,9 +613,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/master" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, - "time": "2024-03-02T17:59:44+00:00" + "time": "2024-03-05T20:51:40+00:00" }, { "name": "phar-io/manifest", @@ -1182,12 +1342,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6a42e5eb7fee7a3f98ca010650ae32ec5957b6cc" + "reference": "0cef856509bab2512dc1595af6776d455b0c5ea7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6a42e5eb7fee7a3f98ca010650ae32ec5957b6cc", - "reference": "6a42e5eb7fee7a3f98ca010650ae32ec5957b6cc", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0cef856509bab2512dc1595af6776d455b0c5ea7", + "reference": "0cef856509bab2512dc1595af6776d455b0c5ea7", "shasum": "" }, "require": { @@ -1275,7 +1435,7 @@ "type": "tidelift" } ], - "time": "2024-03-03T12:44:00+00:00" + "time": "2024-03-05T16:04:03+00:00" }, { "name": "psr/container", @@ -2456,12 +2616,12 @@ "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "0f90d833ac41a30a9f645e81c01c94169303f5fb" + "reference": "811f138210c7ece81b3a23ab400a6291ea7449f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0f90d833ac41a30a9f645e81c01c94169303f5fb", - "reference": "0f90d833ac41a30a9f645e81c01c94169303f5fb", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/811f138210c7ece81b3a23ab400a6291ea7449f2", + "reference": "811f138210c7ece81b3a23ab400a6291ea7449f2", "shasum": "" }, "require": { @@ -2529,7 +2689,7 @@ "type": "open_collective" } ], - "time": "2024-03-04T20:15:33+00:00" + "time": "2024-03-05T09:30:17+00:00" }, { "name": "symfony/console", @@ -3388,6 +3548,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { + "opis/json-schema": 20, "aldavigdis/wp-tests-strapon": 20 }, "prefer-stable": false, diff --git a/src/Rest/Settings.php b/src/Rest/Settings.php index 90cb1e9..a4582ed 100644 --- a/src/Rest/Settings.php +++ b/src/Rest/Settings.php @@ -7,7 +7,7 @@ use WP_Error; use WP_REST_Request; use WP_REST_Response; -use Opis\JsonSchema\Validator; +use NineteenEightyFour\NinteenEightyWoo\Opis\JsonSchema\Validator; /** * The REST API Settings endpoint class