diff --git a/README.md b/README.md index d07b4fa81..882281d54 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Tap into leading cloud-based services like [OpenAI](https://openai.com/), [Micro ## Requirements * PHP 7.4+ -* [WordPress](http://wordpress.org) 6.1+ +* [WordPress](http://wordpress.org) 6.5+ * To utilize the NLU Language Processing functionality, you will need an active [IBM Watson](https://cloud.ibm.com/registration) account. * To utilize the ChatGPT, Embeddings, Text to Speech or Whisper Language Processing functionality or DALLĀ·E Image Processing functionality, you will need an active [OpenAI](https://platform.openai.com/signup) account. * To utilize the Azure AI Vision Image Processing functionality or Text to Speech Language Processing functionality, you will need an active [Microsoft Azure](https://signup.azure.com/signup) account. diff --git a/composer.json b/composer.json index cfdfe46f9..840541ace 100644 --- a/composer.json +++ b/composer.json @@ -29,11 +29,11 @@ "require-dev": { "10up/phpcs-composer": "^3.0", "yoast/phpunit-polyfills": "^1.0.0", - "szepeviktor/phpstan-wordpress": "dev-master", + "szepeviktor/phpstan-wordpress": "^2.0.1", "phpstan/extension-installer": "1.4.x-dev", "php-stubs/wp-cli-stubs": "dev-master", - "johnbillion/wp-compat": "^0.3.0", - "phpstan/phpstan-deprecation-rules": "1.2.x-dev" + "johnbillion/wp-compat": "^1.1.0", + "phpstan/phpstan-deprecation-rules": "^2.0.1" }, "scripts": { "lint": "phpcs -s . --runtime-set testVersion 7.4-", diff --git a/composer.lock b/composer.lock index 8d1191e08..f22e32e2f 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": "b44b3587fbfe15fe794fcd4ce2a6f180", + "content-hash": "2b14dd33b91ce3c91bc58f05a5e618b1", "packages": [ { "name": "aws/aws-crt-php", @@ -62,16 +62,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.330.2", + "version": "3.334.2", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "4ac43cc8356fb16a494c3631c8f39f6e7555f00a" + "reference": "b19afc076bb1cc2617bdef76efd41587596109e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4ac43cc8356fb16a494c3631c8f39f6e7555f00a", - "reference": "4ac43cc8356fb16a494c3631c8f39f6e7555f00a", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b19afc076bb1cc2617bdef76efd41587596109e7", + "reference": "b19afc076bb1cc2617bdef76efd41587596109e7", "shasum": "" }, "require": { @@ -100,7 +100,7 @@ "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", - "psr/cache": "^1.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/simple-cache": "^1.0 || ^2.0 || ^3.0", "sebastian/comparator": "^1.2.3 || ^4.0", "yoast/phpunit-polyfills": "^1.0" @@ -154,9 +154,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.330.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.334.2" }, - "time": "2024-11-26T19:07:56+00:00" + "time": "2024-12-09T19:30:23+00:00" }, { "name": "composer/ca-bundle", @@ -164,12 +164,12 @@ "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2" + "reference": "bc0593537a463e55cadf45fd938d23b75095b7e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/3b1fc3f0be055baa7c6258b1467849c3e8204eb2", - "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/bc0593537a463e55cadf45fd938d23b75095b7e1", + "reference": "bc0593537a463e55cadf45fd938d23b75095b7e1", "shasum": "" }, "require": { @@ -217,7 +217,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.3" + "source": "https://github.com/composer/ca-bundle/tree/1.5.4" }, "funding": [ { @@ -233,7 +233,7 @@ "type": "tidelift" } ], - "time": "2024-11-04T10:15:26+00:00" + "time": "2024-11-27T15:35:25+00:00" }, { "name": "guzzlehttp/guzzle", @@ -930,8 +930,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -1387,47 +1387,48 @@ }, { "name": "johnbillion/wp-compat", - "version": "0.3.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/johnbillion/wp-compat.git", - "reference": "a72d20bb98f07088d602d1e412f908cd6901abf9" + "reference": "c86aa3c71b560817689723f41bd551f5c10e2a22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnbillion/wp-compat/zipball/a72d20bb98f07088d602d1e412f908cd6901abf9", - "reference": "a72d20bb98f07088d602d1e412f908cd6901abf9", + "url": "https://api.github.com/repos/johnbillion/wp-compat/zipball/c86aa3c71b560817689723f41bd551f5c10e2a22", + "reference": "c86aa3c71b560817689723f41bd551f5c10e2a22", "shasum": "" }, "require": { "php": ">= 7.4", - "phpstan/phpstan": "^1.12" + "phpstan/phpstan": "^2.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "johnbillion/plugin-infrastructure": "dev-trunk", "nikic/php-parser": "^5.1", "php-stubs/wordpress-stubs": "^6.6", - "phpstan/phpstan-deprecation-rules": "1.2.0", - "phpstan/phpstan-phpunit": "1.3.15", - "phpstan/phpstan-strict-rules": "1.6.0", + "phpstan/phpstan-deprecation-rules": "2.0.0", + "phpstan/phpstan-phpunit": "2.0.1", + "phpstan/phpstan-strict-rules": "2.0.0", "phpunit/phpunit": "^9.0", "roots/wordpress-core-installer": "1.100.0", - "roots/wordpress-full": "6.7-RC1", + "roots/wordpress-full": "^6.7.0", "wp-coding-standards/wpcs": "3.1.0" }, "suggest": { "phpstan/phpstan-deprecation-rules": "PHPStan rules for detecting usage of deprecated symbols", + "swissspidy/phpstan-no-private": "PHPStan rules for detecting usage of pseudo-private functions, classes, and methods", "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" }, "type": "phpstan-extension", "extra": { - "wordpress-install-dir": "vendor/wordpress/wordpress", "phpstan": { "includes": [ "extension.neon" ] - } + }, + "wordpress-install-dir": "vendor/wordpress/wordpress" }, "autoload": { "psr-4": { @@ -1459,7 +1460,7 @@ "type": "github" } ], - "time": "2024-10-30T16:37:08+00:00" + "time": "2024-11-30T19:24:46+00:00" }, { "name": "myclabs/deep-copy", @@ -2215,24 +2216,25 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.x-dev", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "970117e7efeaafc9351796473f6fa75295f71914" + "reference": "65dc199c3c137db0ee1b05cf94c8fe65d53fedbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/970117e7efeaafc9351796473f6fa75295f71914", - "reference": "970117e7efeaafc9351796473f6fa75295f71914", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/65dc199c3c137db0ee1b05cf94c8fe65d53fedbd", + "reference": "65dc199c3c137db0ee1b05cf94c8fe65d53fedbd", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" }, + "default-branch": true, "bin": [ "phpstan", "phpstan.phar" @@ -2269,31 +2271,32 @@ "type": "github" } ], - "time": "2024-11-25T16:21:52+00:00" + "time": "2024-12-10T13:04:19+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.2.x-dev", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "0ccccb19bfe6fa72f0129b903fd468dd566fc050" + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/0ccccb19bfe6fa72f0129b903fd468dd566fc050", - "reference": "0ccccb19bfe6fa72f0129b903fd468dd566fc050", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.12.5" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6" }, + "default-branch": true, "type": "phpstan-extension", "extra": { "phpstan": { @@ -2314,9 +2317,9 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.x" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.1" }, - "time": "2024-09-26T12:32:25+00:00" + "time": "2024-11-28T21:56:36+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2643,12 +2646,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "5e58fee65c32a3eb5df82b1f5bc3a711cf7fa96f" + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5e58fee65c32a3eb5df82b1f5bc3a711cf7fa96f", - "reference": "5e58fee65c32a3eb5df82b1f5bc3a711cf7fa96f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c", "shasum": "" }, "require": { @@ -2738,7 +2741,7 @@ "type": "tidelift" } ], - "time": "2024-11-25T11:16:31+00:00" + "time": "2024-12-05T13:48:26+00:00" }, { "name": "sebastian/cli-parser", @@ -3710,12 +3713,12 @@ "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "e9dae1311e8fc8d84ec33a4cc531f51777fa33ae" + "reference": "6a0023c9ad614d7a3b5230825d1c9a6a7e104996" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/e9dae1311e8fc8d84ec33a4cc531f51777fa33ae", - "reference": "e9dae1311e8fc8d84ec33a4cc531f51777fa33ae", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/6a0023c9ad614d7a3b5230825d1c9a6a7e104996", + "reference": "6a0023c9ad614d7a3b5230825d1c9a6a7e104996", "shasum": "" }, "require": { @@ -3761,7 +3764,7 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2024-11-23T21:14:27+00:00" + "time": "2024-12-09T01:45:11+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -3769,12 +3772,12 @@ "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "392446832e44d74d85d3b7fc02193d8074831784" + "reference": "0d969c927165b61ae7c211a047652aa36a481328" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/392446832e44d74d85d3b7fc02193d8074831784", - "reference": "392446832e44d74d85d3b7fc02193d8074831784", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0d969c927165b61ae7c211a047652aa36a481328", + "reference": "0d969c927165b61ae7c211a047652aa36a481328", "shasum": "" }, "require": { @@ -3842,111 +3845,33 @@ "type": "open_collective" } ], - "time": "2024-11-26T16:19:03+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "default-branch": true, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-07T11:28:44+00:00" }, { "name": "szepeviktor/phpstan-wordpress", - "version": "dev-master", + "version": "2.x-dev", "source": { "type": "git", "url": "https://github.com/szepeviktor/phpstan-wordpress.git", - "reference": "079942af95124e7e3bf95ab6ef2e006eba02e4e1" + "reference": "6686dc2412cdf544556d428e67aa8f0b645164ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/079942af95124e7e3bf95ab6ef2e006eba02e4e1", - "reference": "079942af95124e7e3bf95ab6ef2e006eba02e4e1", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/6686dc2412cdf544556d428e67aa8f0b645164ca", + "reference": "6686dc2412cdf544556d428e67aa8f0b645164ca", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", - "phpstan/phpstan": "^1.11.0", - "symfony/polyfill-php73": "^1.12.0" + "php": "^7.4 || ^8.0", + "php-stubs/wordpress-stubs": "^6.6.2", + "phpstan/phpstan": "^2.0" }, "require-dev": { "composer/composer": "^2.1.14", "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpstan/phpstan-strict-rules": "^1.2", - "phpunit/phpunit": "^8.0 || ^9.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.0", "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.0", "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" }, @@ -3981,15 +3906,9 @@ ], "support": { "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", - "source": "https://github.com/szepeviktor/phpstan-wordpress" + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/2.x" }, - "funding": [ - { - "url": "https://github.com/sponsors/szepeviktor", - "type": "github" - } - ], - "time": "2024-11-12T18:48:28+00:00" + "time": "2024-12-02T21:31:37+00:00" }, { "name": "theseer/tokenizer", @@ -4113,12 +4032,12 @@ "source": { "type": "git", "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", - "reference": "36f2d3fe72766d45a2319eece04dce099cb72f37" + "reference": "91f339102ac0ae159d0f81201414a3e1857df158" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/36f2d3fe72766d45a2319eece04dce099cb72f37", - "reference": "36f2d3fe72766d45a2319eece04dce099cb72f37", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/91f339102ac0ae159d0f81201414a3e1857df158", + "reference": "91f339102ac0ae159d0f81201414a3e1857df158", "shasum": "" }, "require": { @@ -4168,7 +4087,7 @@ "security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy", "source": "https://github.com/Yoast/PHPUnit-Polyfills" }, - "time": "2024-11-18T19:20:35+00:00" + "time": "2024-12-08T06:51:54+00:00" } ], "aliases": [], @@ -4176,8 +4095,6 @@ "stability-flags": { "php-stubs/wp-cli-stubs": 20, "phpstan/extension-installer": 20, - "phpstan/phpstan-deprecation-rules": 20, - "szepeviktor/phpstan-wordpress": 20, "ua-parser/uap-php": 20 }, "prefer-stable": false, diff --git a/includes/Classifai/Admin/Notifications.php b/includes/Classifai/Admin/Notifications.php index 51493f3d2..60f51ebc2 100644 --- a/includes/Classifai/Admin/Notifications.php +++ b/includes/Classifai/Admin/Notifications.php @@ -1,4 +1,5 @@

diff --git a/includes/Classifai/Features/ImageGeneration.php b/includes/Classifai/Features/ImageGeneration.php index 0db56fe52..3046e9729 100644 --- a/includes/Classifai/Features/ImageGeneration.php +++ b/includes/Classifai/Features/ImageGeneration.php @@ -331,7 +331,7 @@ public function print_media_templates() {