From c4eeae7bf28c5b381e899049d15002a9a941dfb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:11:48 +0000 Subject: [PATCH 01/19] Bump symfony/string from 5.4.31 to 5.4.32 in /wordpress-plugin Bumps [symfony/string](https://github.com/symfony/string) from 5.4.31 to 5.4.32. - [Release notes](https://github.com/symfony/string/releases) - [Changelog](https://github.com/symfony/string/blob/7.0/CHANGELOG.md) - [Commits](https://github.com/symfony/string/compare/v5.4.31...v5.4.32) --- updated-dependencies: - dependency-name: symfony/string dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- wordpress-plugin/composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wordpress-plugin/composer.lock b/wordpress-plugin/composer.lock index 07ae069..111df4d 100644 --- a/wordpress-plugin/composer.lock +++ b/wordpress-plugin/composer.lock @@ -5756,16 +5756,16 @@ }, { "name": "symfony/string", - "version": "v5.4.31", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b" + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2765096c03f39ddf54f6af532166e42aaa05b24b", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b", + "url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04", + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04", "shasum": "" }, "require": { @@ -5835,7 +5835,7 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:19:44+00:00" + "time": "2023-11-26T13:43:46+00:00" }, { "name": "theseer/tokenizer", From d6787110dac11fab73ded5f2984476b480ea16b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:13:00 +0000 Subject: [PATCH 02/19] Bump phpunit/phpunit from 9.6.13 to 9.6.15 in /wordpress-plugin Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.13 to 9.6.15. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.15/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.13...9.6.15) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- wordpress-plugin/composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wordpress-plugin/composer.lock b/wordpress-plugin/composer.lock index 07ae069..50bd0af 100644 --- a/wordpress-plugin/composer.lock +++ b/wordpress-plugin/composer.lock @@ -3725,16 +3725,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "9.6.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", "shasum": "" }, "require": { @@ -3819,7 +3819,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-12-01T16:55:19+00:00" }, { "name": "psr/event-dispatcher", From 1444dcfcb3c16c197815c419d47e41fbe410ec87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:13:58 +0000 Subject: [PATCH 03/19] Bump friendsofphp/php-cs-fixer in /wordpress-plugin Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.40.0 to 3.40.2. - [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases) - [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.40.0...v3.40.2) --- updated-dependencies: - dependency-name: friendsofphp/php-cs-fixer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- wordpress-plugin/composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/wordpress-plugin/composer.lock b/wordpress-plugin/composer.lock index 07ae069..60775e8 100644 --- a/wordpress-plugin/composer.lock +++ b/wordpress-plugin/composer.lock @@ -2839,16 +2839,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.40.0", + "version": "v3.40.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0" + "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/27d2b3265b5d550ec411b4319967ae7cfddfb2e0", - "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4344562a516b76afe8f2d64b2e52214c30d64ed8", + "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8", "shasum": "" }, "require": { @@ -2924,7 +2924,7 @@ "type": "github" } ], - "time": "2023-11-26T09:25:53+00:00" + "time": "2023-12-03T09:21:33+00:00" }, { "name": "myclabs/deep-copy", @@ -4868,16 +4868,16 @@ }, { "name": "symfony/console", - "version": "v5.4.31", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a" + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/11ac5f154e0e5c4c77af83ad11ead9165280b92a", - "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a", + "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", "shasum": "" }, "require": { @@ -4960,7 +4960,7 @@ "type": "tidelift" } ], - "time": "2023-10-31T07:58:33+00:00" + "time": "2023-11-18T18:23:04+00:00" }, { "name": "symfony/event-dispatcher", @@ -5756,16 +5756,16 @@ }, { "name": "symfony/string", - "version": "v5.4.31", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b" + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2765096c03f39ddf54f6af532166e42aaa05b24b", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b", + "url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04", + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04", "shasum": "" }, "require": { @@ -5835,7 +5835,7 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:19:44+00:00" + "time": "2023-11-26T13:43:46+00:00" }, { "name": "theseer/tokenizer", From 282eb3323e3e3c7101d186509f9a55563ae3baed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:15:35 +0000 Subject: [PATCH 04/19] Bump nesbot/carbon from 2.71.0 to 2.72.0 in /wordpress-plugin Bumps [nesbot/carbon](https://github.com/briannesbitt/Carbon) from 2.71.0 to 2.72.0. - [Release notes](https://github.com/briannesbitt/Carbon/releases) - [Commits](https://github.com/briannesbitt/Carbon/compare/2.71.0...2.72.0) --- updated-dependencies: - dependency-name: nesbot/carbon dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- wordpress-plugin/composer.lock | 80 +++++++++++++++++++++++++++++++--- 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/wordpress-plugin/composer.lock b/wordpress-plugin/composer.lock index 07ae069..dafc039 100644 --- a/wordpress-plugin/composer.lock +++ b/wordpress-plugin/composer.lock @@ -6,6 +6,71 @@ ], "content-hash": "fde47a6b721b01ad09afebdf31e40d05", "packages": [ + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/67a77972b9f398ae7068dabacc39c08aeee170d5", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2023-10-01T14:29:01+00:00" + }, { "name": "composer/installers", "version": "v2.2.0", @@ -1094,19 +1159,20 @@ }, { "name": "nesbot/carbon", - "version": "2.71.0", + "version": "2.72.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "98276233188583f2ff845a0f992a235472d9466a" + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", - "reference": "98276233188583f2ff845a0f992a235472d9466a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -1118,8 +1184,8 @@ "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "ondrejmirtes/better-reflection": "*", @@ -1191,7 +1257,7 @@ "type": "tidelift" } ], - "time": "2023-09-25T11:31:05+00:00" + "time": "2023-11-28T10:13:25+00:00" }, { "name": "psr/clock", From bd5d305a34102b6712a3eb1862e2b516c479326f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:16:08 +0000 Subject: [PATCH 05/19] Bump guzzlehttp/guzzle from 7.8.0 to 7.8.1 in /wordpress-plugin Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.8.0 to 7.8.1. - [Release notes](https://github.com/guzzle/guzzle/releases) - [Changelog](https://github.com/guzzle/guzzle/blob/7.8/CHANGELOG.md) - [Commits](https://github.com/guzzle/guzzle/compare/7.8.0...7.8.1) --- updated-dependencies: - dependency-name: guzzlehttp/guzzle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- wordpress-plugin/composer.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/wordpress-plugin/composer.lock b/wordpress-plugin/composer.lock index 07ae069..b7e7df5 100644 --- a/wordpress-plugin/composer.lock +++ b/wordpress-plugin/composer.lock @@ -372,16 +372,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { @@ -396,11 +396,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -490,28 +490,28 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:20:53+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { @@ -569,7 +569,7 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", From 6ac413efb1ee03bc4f87dd07d97cca4a3affc88e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:16:14 +0000 Subject: [PATCH 06/19] Bump @medusajs/modules-sdk from 1.12.3 to 1.12.4 Bumps [@medusajs/modules-sdk](https://github.com/medusajs/medusa/tree/HEAD/packages/modules-sdk) from 1.12.3 to 1.12.4. - [Release notes](https://github.com/medusajs/medusa/releases) - [Changelog](https://github.com/medusajs/medusa/blob/develop/packages/modules-sdk/CHANGELOG.md) - [Commits](https://github.com/medusajs/medusa/commits/@medusajs/modules-sdk@1.12.4/packages/modules-sdk) --- updated-dependencies: - dependency-name: "@medusajs/modules-sdk" dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fb9f5b..30fb83d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -110,7 +110,7 @@ }, "medusa-plugin": { "name": "medusa-plugin-wordpress", - "version": "0.2.0", + "version": "0.3.3", "license": "MIT", "dependencies": { "axios": "^1.6.0", @@ -6207,21 +6207,32 @@ } }, "node_modules/@medusajs/modules-sdk": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/@medusajs/modules-sdk/-/modules-sdk-1.12.3.tgz", - "integrity": "sha512-r95PKgf+ndRXNCFQtunTb1PBwCuP3AjlS3WHktSprSbsvXIBFiLV9v1WFmLp/yC8W/+z/rMMVA3nm5DMLk30Rw==", + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/@medusajs/modules-sdk/-/modules-sdk-1.12.4.tgz", + "integrity": "sha512-Lh1B2ZECt1PVu7ptsdGpu/4vc0CokIryZSexrOltAAZZlWubH92N45gCn8JpJFM+Pa7uuLWfUN96D/XozTFTBA==", "dependencies": { "@graphql-tools/merge": "^9.0.0", "@graphql-tools/schema": "^10.0.0", - "@medusajs/orchestration": "^0.4.4", - "@medusajs/types": "^1.11.6", - "@medusajs/utils": "^1.10.5", + "@medusajs/orchestration": "^0.5.0", + "@medusajs/types": "^1.11.8", + "@medusajs/utils": "^1.11.1", "awilix": "^8.0.0", "knex": "2.4.2", "pg": "^8.11.2", "resolve-cwd": "^3.0.0" } }, + "node_modules/@medusajs/modules-sdk/node_modules/@medusajs/orchestration": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@medusajs/orchestration/-/orchestration-0.5.0.tgz", + "integrity": "sha512-PXaC4XNrKx88Lde72jkJJ34GY/6vYVapV4a80yOj4mrdB0p+nhBllT3coK6b2sAIxu5gCrBXl73EdAfPN2e/sA==", + "dependencies": { + "@medusajs/types": "^1.11.8", + "@medusajs/utils": "^1.11.1", + "awilix": "^8.0.0", + "graphql": "^16.6.0" + } + }, "node_modules/@medusajs/openapi-typescript-codegen": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@medusajs/openapi-typescript-codegen/-/openapi-typescript-codegen-0.2.1.tgz", @@ -6268,9 +6279,9 @@ } }, "node_modules/@medusajs/types": { - "version": "1.11.7", - "resolved": "https://registry.npmjs.org/@medusajs/types/-/types-1.11.7.tgz", - "integrity": "sha512-KkNJd4pxu5zoiv09nsG2ARtrC17LxsDD941uX35IMfvNeWYRk31kQ59EipYE59SBvGpvatoaBHzTxSAsrebzTQ==" + "version": "1.11.8", + "resolved": "https://registry.npmjs.org/@medusajs/types/-/types-1.11.8.tgz", + "integrity": "sha512-FmcfP6dvdgDYT8hBLdMPlsj7k8WXamrtDkuXmU07qaePLhyUbksLDO0MEmo4oltAyfmgpzKw7U3/DJZJIlEjVg==" }, "node_modules/@medusajs/ui": { "version": "2.2.2", @@ -6324,11 +6335,11 @@ } }, "node_modules/@medusajs/utils": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@medusajs/utils/-/utils-1.11.0.tgz", - "integrity": "sha512-ysMu+NNc/xQmocodWE/KEVUZ/bwtAjXJg9/DmPlfER4gR9kN+G22NVxl3v0jfyhSxPyxQ3OKqFhpsFaGeu/Www==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@medusajs/utils/-/utils-1.11.1.tgz", + "integrity": "sha512-UFkrH9JfUbQ7UGykI9shdOLVtCdpmTuG975KwTEVXMvaLn2udVdUHiU1B7/dLQeyVb6MOvhqlCavSFd8BUsZ0g==", "dependencies": { - "@medusajs/types": "^1.11.7", + "@medusajs/types": "^1.11.8", "@mikro-orm/core": "5.7.12", "@mikro-orm/migrations": "5.7.12", "@mikro-orm/postgresql": "5.7.12", @@ -34998,7 +35009,6 @@ }, "wordpress-plugin": { "name": "medusawp-admin", - "version": "0.1.0", "license": "MIT", "dependencies": { "@fontsource/inter": "^5.0.15", From f645d337c159d4ad947689865d817abacbb4bbd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:18:48 +0000 Subject: [PATCH 07/19] Bump luxon from 3.4.3 to 3.4.4 Bumps [luxon](https://github.com/moment/luxon) from 3.4.3 to 3.4.4. - [Changelog](https://github.com/moment/luxon/blob/master/CHANGELOG.md) - [Commits](https://github.com/moment/luxon/compare/3.4.3...3.4.4) --- updated-dependencies: - dependency-name: luxon dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fb9f5b..3457ccc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -110,7 +110,7 @@ }, "medusa-plugin": { "name": "medusa-plugin-wordpress", - "version": "0.2.0", + "version": "0.3.3", "license": "MIT", "dependencies": { "axios": "^1.6.0", @@ -24418,9 +24418,9 @@ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" }, "node_modules/luxon": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.3.tgz", - "integrity": "sha512-tFWBiv3h7z+T/tDaoxA8rqTxy1CHV6gHS//QdaH4pulbq/JuBSGgQspQQqcgnwdAx6pNI7cmvz5Sv/addzHmUg==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", + "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==", "engines": { "node": ">=12" } @@ -34998,7 +34998,6 @@ }, "wordpress-plugin": { "name": "medusawp-admin", - "version": "0.1.0", "license": "MIT", "dependencies": { "@fontsource/inter": "^5.0.15", From ed6195602226b44e1eb95debbc4cb49b65befde8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:19:39 +0000 Subject: [PATCH 08/19] Bump react-hook-form from 7.47.0 to 7.48.2 Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.47.0 to 7.48.2. - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.47.0...v7.48.2) --- updated-dependencies: - dependency-name: react-hook-form dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 41 +++++++++++++++++------------------ wordpress-plugin/package.json | 2 +- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fb9f5b..a501d8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -110,7 +110,7 @@ }, "medusa-plugin": { "name": "medusa-plugin-wordpress", - "version": "0.2.0", + "version": "0.3.3", "license": "MIT", "dependencies": { "axios": "^1.6.0", @@ -5314,6 +5314,21 @@ "node": ">=6.9.0" } }, + "node_modules/@medusajs/admin-ui/node_modules/react-hook-form": { + "version": "7.38.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.38.0.tgz", + "integrity": "sha512-gxWW1kMeru9xR1GoR+Iw4hA+JBOM3SHfr4DWCUKY0xc7Vv1MLsF109oHtBeWl9shcyPFx67KHru44DheN0XY5A==", + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18" + } + }, "node_modules/@medusajs/admin-ui/node_modules/type-fest": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", @@ -29476,9 +29491,9 @@ } }, "node_modules/react-hook-form": { - "version": "7.38.0", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.38.0.tgz", - "integrity": "sha512-gxWW1kMeru9xR1GoR+Iw4hA+JBOM3SHfr4DWCUKY0xc7Vv1MLsF109oHtBeWl9shcyPFx67KHru44DheN0XY5A==", + "version": "7.48.2", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.48.2.tgz", + "integrity": "sha512-H0T2InFQb1hX7qKtDIZmvpU1Xfn/bdahWBN1fH19gSe4bBEqTfmlr7H3XWTaVtiK4/tpPaI1F3355GPMZYge+A==", "engines": { "node": ">=12.22.0" }, @@ -34998,7 +35013,6 @@ }, "wordpress-plugin": { "name": "medusawp-admin", - "version": "0.1.0", "license": "MIT", "dependencies": { "@fontsource/inter": "^5.0.15", @@ -35009,7 +35023,7 @@ "@tanstack/react-query": "^4.36.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-hook-form": "^7.47.0", + "react-hook-form": "^7.48.2", "react-router-dom": "^6.17.0", "shikiji": "^0.6.10", "tailwind-merge": "^1.14.0", @@ -35159,21 +35173,6 @@ "postcss": "^8.2.14" } }, - "wordpress-plugin/node_modules/react-hook-form": { - "version": "7.47.0", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.47.0.tgz", - "integrity": "sha512-F/TroLjTICipmHeFlMrLtNLceO2xr1jU3CyiNla5zdwsGUGu2UOxxR4UyJgLlhMwLW/Wzp4cpJ7CPfgJIeKdSg==", - "engines": { - "node": ">=12.22.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/react-hook-form" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17 || ^18" - } - }, "wordpress-plugin/node_modules/react-router": { "version": "6.17.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.17.0.tgz", diff --git a/wordpress-plugin/package.json b/wordpress-plugin/package.json index c2ae68d..f991e68 100644 --- a/wordpress-plugin/package.json +++ b/wordpress-plugin/package.json @@ -28,7 +28,7 @@ "@tanstack/react-query": "^4.36.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-hook-form": "^7.47.0", + "react-hook-form": "^7.48.2", "react-router-dom": "^6.17.0", "shikiji": "^0.6.10", "tailwind-merge": "^1.14.0", From d04a47154b610543b44f1ccf6af13f8d66401b79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:22:30 +0000 Subject: [PATCH 09/19] Bump eslint-plugin-react-refresh from 0.4.3 to 0.4.5 Bumps [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) from 0.4.3 to 0.4.5. - [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases) - [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md) - [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.4.3...v0.4.5) --- updated-dependencies: - dependency-name: eslint-plugin-react-refresh dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 11 +++++------ wordpress-plugin/package.json | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fb9f5b..9222918 100644 --- a/package-lock.json +++ b/package-lock.json @@ -110,7 +110,7 @@ }, "medusa-plugin": { "name": "medusa-plugin-wordpress", - "version": "0.2.0", + "version": "0.3.3", "license": "MIT", "dependencies": { "axios": "^1.6.0", @@ -18402,9 +18402,9 @@ } }, "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.3.tgz", - "integrity": "sha512-Hh0wv8bUNY877+sI0BlCUlsS0TYYQqvzEwJsJJPM2WF4RnTStSnSR3zdJYa2nPOJgg3UghXi54lVyMSmpCalzA==", + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", + "integrity": "sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==", "dev": true, "peerDependencies": { "eslint": ">=7" @@ -34998,7 +34998,6 @@ }, "wordpress-plugin": { "name": "medusawp-admin", - "version": "0.1.0", "license": "MIT", "dependencies": { "@fontsource/inter": "^5.0.15", @@ -35025,7 +35024,7 @@ "autoprefixer": "^10.4.16", "eslint": "^8.52.0", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.3", + "eslint-plugin-react-refresh": "^0.4.5", "postcss": "^8.4.31", "postcss-nesting": "^12.0.1", "prettier": "^3.0.3", diff --git a/wordpress-plugin/package.json b/wordpress-plugin/package.json index c2ae68d..a0e78d2 100644 --- a/wordpress-plugin/package.json +++ b/wordpress-plugin/package.json @@ -44,7 +44,7 @@ "autoprefixer": "^10.4.16", "eslint": "^8.52.0", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.3", + "eslint-plugin-react-refresh": "^0.4.5", "postcss": "^8.4.31", "postcss-nesting": "^12.0.1", "prettier": "^3.0.3", From ce36eb39edd0458190550703204defaf7bec72e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:23:07 +0000 Subject: [PATCH 10/19] Bump @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining Bumps [@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining) from 7.22.15 to 7.23.3. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining) --- updated-dependencies: - dependency-name: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fb9f5b..ac6f9f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -110,7 +110,7 @@ }, "medusa-plugin": { "name": "medusa-plugin-wordpress", - "version": "0.2.0", + "version": "0.3.3", "license": "MIT", "dependencies": { "axios": "^1.6.0", @@ -1542,13 +1542,13 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz", - "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz", + "integrity": "sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==", "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.15" + "@babel/plugin-transform-optional-chaining": "^7.23.3" }, "engines": { "node": ">=6.9.0" @@ -2398,9 +2398,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz", - "integrity": "sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", + "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", @@ -34998,7 +34998,6 @@ }, "wordpress-plugin": { "name": "medusawp-admin", - "version": "0.1.0", "license": "MIT", "dependencies": { "@fontsource/inter": "^5.0.15", From 37c7ab0fc4e449854360866c93ecf76a82828817 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 00:18:15 +0000 Subject: [PATCH 11/19] Bump vite from 4.5.0 to 4.5.1 Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.0 to 4.5.1. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v4.5.1/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v4.5.1/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- wordpress-plugin/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index bcfd001..25a262c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34287,9 +34287,9 @@ } }, "node_modules/vite": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz", - "integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz", + "integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==", "dev": true, "dependencies": { "esbuild": "^0.18.10", @@ -35057,7 +35057,7 @@ "prettier-plugin-tailwindcss": "^0.5.6", "tailwindcss": "^3.3.5", "typescript": "^5.2.2", - "vite": "^4.5.0", + "vite": "^4.5.1", "vite-tsconfig-paths": "^4.2.1" } }, diff --git a/wordpress-plugin/package.json b/wordpress-plugin/package.json index 73d4b7e..9b90391 100644 --- a/wordpress-plugin/package.json +++ b/wordpress-plugin/package.json @@ -51,7 +51,7 @@ "prettier-plugin-tailwindcss": "^0.5.6", "tailwindcss": "^3.3.5", "typescript": "^5.2.2", - "vite": "^4.5.0", + "vite": "^4.5.1", "vite-tsconfig-paths": "^4.2.1" }, "prettier": { From e983c18e905cf7dda07f7f63df2e4ddf50988629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Fri, 8 Dec 2023 14:47:32 +0100 Subject: [PATCH 12/19] add phpsyntax check test. - update wordpress-plugin Composer dependencies --- .github/workflows/test.yml | 4 +- wordpress-plugin/composer.json | 8 +- wordpress-plugin/composer.lock | 153 ++++++++++++++++++++++++++------- 3 files changed, 128 insertions(+), 37 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 082a1aa..e47221f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,5 +83,5 @@ jobs: - name: Install composer dependencies run: composer install --prefer-dist --no-progress --no-suggest -d ./wordpress-plugin - - name: Run PHPUnit - run: composer run-script test -d ./wordpress-plugin + - name: Run tests + run: composer run-script test:phpsyntax -d ./wordpress-plugin && composer run-script test:unit -d ./wordpress-plugin diff --git a/wordpress-plugin/composer.json b/wordpress-plugin/composer.json index c20c247..4070b83 100644 --- a/wordpress-plugin/composer.json +++ b/wordpress-plugin/composer.json @@ -32,6 +32,7 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "*", "friendsofphp/php-cs-fixer": "^3.30.0", + "php-parallel-lint/php-parallel-lint": "^1.3", "phpcompatibility/php-compatibility": "*", "phpcompatibility/phpcompatibility-wp": "*", "phpunit/phpunit": "^9.6", @@ -72,8 +73,9 @@ "sort-packages": true }, "scripts": { - "phpcs": "./vendor/bin/phpcs", - "phpcbf": "./vendor/bin/phpcbf", - "test": "./vendor/bin/phpunit tests --testdox" + "test:phpcs": "./vendor/bin/phpcs", + "fix:phpcbf": "./vendor/bin/phpcbf", + "test:unit": "./vendor/bin/phpunit tests --testdox", + "test:phpsyntax": "parallel-lint --exclude node_modules --exclude vendor ." } } diff --git a/wordpress-plugin/composer.lock b/wordpress-plugin/composer.lock index d5c85c3..5426c62 100644 --- a/wordpress-plugin/composer.lock +++ b/wordpress-plugin/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": "fde47a6b721b01ad09afebdf31e40d05", + "content-hash": "09dbaac476a8f551cebb966684ea9573", "packages": [ { "name": "carbonphp/carbon-doctrine-types", @@ -638,16 +638,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { @@ -661,9 +661,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -746,7 +746,7 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "illuminate/collections", @@ -1712,16 +1712,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.31", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "f84fd4fd8311a541ceb2ae3f257841d002450a90" + "reference": "cbcd80a4c36f59772d62860fdb0cb6a38da63fd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f84fd4fd8311a541ceb2ae3f257841d002450a90", - "reference": "f84fd4fd8311a541ceb2ae3f257841d002450a90", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cbcd80a4c36f59772d62860fdb0cb6a38da63fd2", + "reference": "cbcd80a4c36f59772d62860fdb0cb6a38da63fd2", "shasum": "" }, "require": { @@ -1781,7 +1781,7 @@ "type": "tidelift" } ], - "time": "2023-11-06T22:05:57+00:00" + "time": "2023-11-20T15:40:25+00:00" }, { "name": "symfony/mime", @@ -3202,6 +3202,59 @@ "description": "Library for handling version information and constraints", "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "php-parallel-lint/php-parallel-lint", + "version": "v1.3.2", + "source": { + "type": "git", + "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", + "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6483c9832e71973ed29cf71bd6b3f4fde438a9de", + "reference": "6483c9832e71973ed29cf71bd6b3f4fde438a9de", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=5.3.0" + }, + "replace": { + "grogy/php-parallel-lint": "*", + "jakub-onderka/php-parallel-lint": "*" + }, + "require-dev": { + "nette/tester": "^1.3 || ^2.0", + "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", + "squizlabs/php_codesniffer": "^3.6" + }, + "suggest": { + "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" + }, + "bin": [ + "parallel-lint" + ], + "type": "library", + "autoload": { + "classmap": [ + "./src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "ahoj@jakubonderka.cz" + } + ], + "description": "This tool check syntax of PHP files about 20x faster than serial check.", + "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", + "time": "2022-02-21T12:50:22+00:00" + }, { "name": "phpcompatibility/php-compatibility", "version": "9.3.5", @@ -3366,16 +3419,16 @@ }, { "name": "phpcsstandards/phpcsextra", - "version": "1.1.2", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", - "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5" + "reference": "78b2cae1e9de1c05f0416de6f9a658cbb83ac324" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/746c3190ba8eb2f212087c947ba75f4f5b9a58d5", - "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/78b2cae1e9de1c05f0416de6f9a658cbb83ac324", + "reference": "78b2cae1e9de1c05f0416de6f9a658cbb83ac324", "shasum": "" }, "require": { @@ -3421,7 +3474,21 @@ "standards", "static analysis" ], - "time": "2023-09-20T22:06:18+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-02T14:30:12+00:00" }, { "name": "phpcsstandards/phpcsutils", @@ -4882,16 +4949,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.8.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", "shasum": "" }, "require": { @@ -4901,7 +4968,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/phpcs", @@ -4920,17 +4987,39 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T12:32:31+00:00" }, { "name": "symfony/console", @@ -5955,12 +6044,12 @@ "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "fe7895876b6ea344fa87bb82a2fbce73f90e9897" + "reference": "17cc5850f147fbe0a2dd0a5d3c7849911775b542" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/fe7895876b6ea344fa87bb82a2fbce73f90e9897", - "reference": "fe7895876b6ea344fa87bb82a2fbce73f90e9897", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/17cc5850f147fbe0a2dd0a5d3c7849911775b542", + "reference": "17cc5850f147fbe0a2dd0a5d3c7849911775b542", "shasum": "" }, "require": { @@ -5969,7 +6058,7 @@ "ext-tokenizer": "*", "ext-xmlreader": "*", "php": ">=5.4", - "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsextra": "^1.2.0", "phpcsstandards/phpcsutils": "^1.0.8", "squizlabs/php_codesniffer": "^3.7.2" }, @@ -6008,7 +6097,7 @@ "type": "custom" } ], - "time": "2023-11-23T08:44:49+00:00" + "time": "2023-12-03T22:21:24+00:00" } ], "aliases": [], From 93d8780e809f5a9847d5be5f7c558d0addfed6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Fri, 8 Dec 2023 14:50:47 +0100 Subject: [PATCH 13/19] fix PHP syntax error (thrown for PHP 7.4). - using nullsafe operator (?->) introduced in PHP 8, replaced with null coalescing operator (??) --- wordpress-plugin/src/Init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wordpress-plugin/src/Init.php b/wordpress-plugin/src/Init.php index 961051a..806c021 100644 --- a/wordpress-plugin/src/Init.php +++ b/wordpress-plugin/src/Init.php @@ -132,7 +132,7 @@ public function create_cart() { // expose cart data to global scope $GLOBALS['medusawp_cart'] = $cart; - $GLOBALS['medusawp_country_code'] = $cart->getShippingAddress()?->getCountryCode(); + $GLOBALS['medusawp_country_code'] = $cart->getShippingAddress() ? $cart->getShippingAddress()->getCountryCode() : null; $GLOBALS['medusawp_region'] = $cart->getRegion(); if ( ! isset( $_COOKIE['country_code'] ) ) { From a17235db2457709c45be33b3259404b3d270bdfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Fri, 8 Dec 2023 14:51:38 +0100 Subject: [PATCH 14/19] update WP core to 6.4.2 and WP plugins in dev/wp. --- dev/wp/composer.json | 2 +- dev/wp/composer.lock | 293 ++++++++++++++++++++++++++++++++----------- 2 files changed, 224 insertions(+), 71 deletions(-) diff --git a/dev/wp/composer.json b/dev/wp/composer.json index b68c201..5b4cfef 100755 --- a/dev/wp/composer.json +++ b/dev/wp/composer.json @@ -20,7 +20,7 @@ "php": "^7.4 || ^8.0", "agilo/medusawp": "@dev", "drupal-composer/preserve-paths": "^0.1.4", - "johnpbloch/wordpress": "6.4.1", + "johnpbloch/wordpress": "6.4.2", "wpackagist-plugin/wp-crontrol": "*" }, "require-dev": { diff --git a/dev/wp/composer.lock b/dev/wp/composer.lock index 4fbf54b..f057ffe 100644 --- a/dev/wp/composer.lock +++ b/dev/wp/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": "81e7503111e006ec669036a4c09a56c8", + "content-hash": "6c3be297dfbe370e91e34fe4deafda03", "packages": [ { "name": "agilo/medusawp", @@ -12,7 +12,7 @@ "dist": { "type": "path", "url": "./../../wordpress-plugin", - "reference": "77045b3d8905a2e3041593c1177b1e102ff8d177" + "reference": "d3bf9d7b15e48966c778a1cb2849ca72b30b9a32" }, "require": { "composer/installers": "^1.0 || ^2.0", @@ -23,11 +23,13 @@ "guzzlehttp/psr7": "^1.7 || ^2.0", "illuminate/validation": "^8.83", "php": "^7.4 || ^8.0", - "woocommerce/action-scheduler": "^3.7" + "woocommerce/action-scheduler": "^3.7", + "yahnis-elsts/plugin-update-checker": "^5.3" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "*", "friendsofphp/php-cs-fixer": "^3.30.0", + "php-parallel-lint/php-parallel-lint": "^1.3", "phpcompatibility/php-compatibility": "*", "phpcompatibility/phpcompatibility-wp": "*", "phpunit/phpunit": "^9.6", @@ -52,14 +54,17 @@ } }, "scripts": { - "phpcs": [ + "test:phpcs": [ "./vendor/bin/phpcs" ], - "phpcbf": [ + "fix:phpcbf": [ "./vendor/bin/phpcbf" ], - "test": [ + "test:unit": [ "./vendor/bin/phpunit tests --testdox" + ], + "test:phpsyntax": [ + "parallel-lint ./src" ] }, "license": [ @@ -85,6 +90,71 @@ "relative": true } }, + { + "name": "carbonphp/carbon-doctrine-types", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/67a77972b9f398ae7068dabacc39c08aeee170d5", + "reference": "67a77972b9f398ae7068dabacc39c08aeee170d5", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2023-10-01T14:29:01+00:00" + }, { "name": "composer/installers", "version": "v2.2.0", @@ -505,16 +575,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { @@ -529,11 +599,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -623,28 +693,28 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:20:53+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { @@ -702,20 +772,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { @@ -729,9 +799,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -814,7 +884,7 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "illuminate/collections", @@ -1227,20 +1297,20 @@ }, { "name": "johnpbloch/wordpress", - "version": "6.4.1", + "version": "6.4.2", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress.git", - "reference": "e87c9c3db68acf73e918e974e53f63c20291b1f1" + "reference": "cea8e15d973a3dc55ea336cb0ceb7aeee4ebd286" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/e87c9c3db68acf73e918e974e53f63c20291b1f1", - "reference": "e87c9c3db68acf73e918e974e53f63c20291b1f1", + "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/cea8e15d973a3dc55ea336cb0ceb7aeee4ebd286", + "reference": "cea8e15d973a3dc55ea336cb0ceb7aeee4ebd286", "shasum": "" }, "require": { - "johnpbloch/wordpress-core": "6.4.1", + "johnpbloch/wordpress-core": "6.4.2", "johnpbloch/wordpress-core-installer": "^1.0 || ^2.0", "php": ">=7.0.0" }, @@ -1262,20 +1332,20 @@ "cms", "wordpress" ], - "time": "2023-11-09T01:33:31+00:00" + "time": "2023-12-06T16:30:48+00:00" }, { "name": "johnpbloch/wordpress-core", - "version": "6.4.1", + "version": "6.4.2", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress-core.git", - "reference": "bc7bf692e02d9d18c81ab167ef6e9036d0becde0" + "reference": "00ea636cf89fd17daacbc3862f368a2782267825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/bc7bf692e02d9d18c81ab167ef6e9036d0becde0", - "reference": "bc7bf692e02d9d18c81ab167ef6e9036d0becde0", + "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/00ea636cf89fd17daacbc3862f368a2782267825", + "reference": "00ea636cf89fd17daacbc3862f368a2782267825", "shasum": "" }, "require": { @@ -1283,7 +1353,7 @@ "php": ">=7.0.0" }, "provide": { - "wordpress/core-implementation": "6.4.1" + "wordpress/core-implementation": "6.4.2" }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", @@ -1303,7 +1373,7 @@ "cms", "wordpress" ], - "time": "2023-11-09T01:33:28+00:00" + "time": "2023-12-06T16:30:44+00:00" }, { "name": "johnpbloch/wordpress-core-installer", @@ -1357,19 +1427,20 @@ }, { "name": "nesbot/carbon", - "version": "2.71.0", + "version": "2.72.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "98276233188583f2ff845a0f992a235472d9466a" + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/98276233188583f2ff845a0f992a235472d9466a", - "reference": "98276233188583f2ff845a0f992a235472d9466a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", + "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", "psr/clock": "^1.0", @@ -1381,8 +1452,8 @@ "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "ondrejmirtes/better-reflection": "*", @@ -1454,7 +1525,7 @@ "type": "tidelift" } ], - "time": "2023-09-25T11:31:05+00:00" + "time": "2023-11-28T10:13:25+00:00" }, { "name": "psr/clock", @@ -1909,16 +1980,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.31", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "f84fd4fd8311a541ceb2ae3f257841d002450a90" + "reference": "cbcd80a4c36f59772d62860fdb0cb6a38da63fd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f84fd4fd8311a541ceb2ae3f257841d002450a90", - "reference": "f84fd4fd8311a541ceb2ae3f257841d002450a90", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cbcd80a4c36f59772d62860fdb0cb6a38da63fd2", + "reference": "cbcd80a4c36f59772d62860fdb0cb6a38da63fd2", "shasum": "" }, "require": { @@ -1978,7 +2049,7 @@ "type": "tidelift" } ], - "time": "2023-11-06T22:05:57+00:00" + "time": "2023-11-20T15:40:25+00:00" }, { "name": "symfony/mime", @@ -2751,6 +2822,52 @@ }, "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/wp-crontrol/" + }, + { + "name": "yahnis-elsts/plugin-update-checker", + "version": "v5.3", + "source": { + "type": "git", + "url": "https://github.com/YahnisElsts/plugin-update-checker.git", + "reference": "0b6bd7cd3286688ab680201aa6a7d8572c51ae1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/0b6bd7cd3286688ab680201aa6a7d8572c51ae1f", + "reference": "0b6bd7cd3286688ab680201aa6a7d8572c51ae1f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=5.6.20" + }, + "type": "library", + "autoload": { + "files": [ + "load-v5p3.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Yahnis Elsts", + "email": "whiteshadow@w-shadow.com", + "homepage": "https://w-shadow.com/", + "role": "Developer" + } + ], + "description": "A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.", + "homepage": "https://github.com/YahnisElsts/plugin-update-checker/", + "keywords": [ + "automatic updates", + "plugin updates", + "theme updates", + "wordpress" + ], + "time": "2023-11-09T08:34:00+00:00" } ], "packages-dev": [ @@ -2992,16 +3109,16 @@ }, { "name": "phpcsstandards/phpcsextra", - "version": "1.1.2", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", - "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5" + "reference": "78b2cae1e9de1c05f0416de6f9a658cbb83ac324" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/746c3190ba8eb2f212087c947ba75f4f5b9a58d5", - "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/78b2cae1e9de1c05f0416de6f9a658cbb83ac324", + "reference": "78b2cae1e9de1c05f0416de6f9a658cbb83ac324", "shasum": "" }, "require": { @@ -3047,7 +3164,21 @@ "standards", "static analysis" ], - "time": "2023-09-20T22:06:18+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-02T14:30:12+00:00" }, { "name": "phpcsstandards/phpcsutils", @@ -3119,16 +3250,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.8.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", "shasum": "" }, "require": { @@ -3138,7 +3269,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/phpcs", @@ -3157,17 +3288,39 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T12:32:31+00:00" }, { "name": "wp-coding-standards/wpcs", @@ -3175,12 +3328,12 @@ "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7722c0b8a6f4eb615be4ba8ebe22ed92a5fa87d7" + "reference": "17cc5850f147fbe0a2dd0a5d3c7849911775b542" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7722c0b8a6f4eb615be4ba8ebe22ed92a5fa87d7", - "reference": "7722c0b8a6f4eb615be4ba8ebe22ed92a5fa87d7", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/17cc5850f147fbe0a2dd0a5d3c7849911775b542", + "reference": "17cc5850f147fbe0a2dd0a5d3c7849911775b542", "shasum": "" }, "require": { @@ -3189,7 +3342,7 @@ "ext-tokenizer": "*", "ext-xmlreader": "*", "php": ">=5.4", - "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsextra": "^1.2.0", "phpcsstandards/phpcsutils": "^1.0.8", "squizlabs/php_codesniffer": "^3.7.2" }, @@ -3228,7 +3381,7 @@ "type": "custom" } ], - "time": "2023-09-20T23:16:50+00:00" + "time": "2023-12-03T22:21:24+00:00" } ], "aliases": [], From 16d3032e7e4d547659ca927243b834878acc9333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 11 Dec 2023 13:01:08 +0100 Subject: [PATCH 15/19] add phpcs check test. - fixing/ignoring phpcs reported warnings/errors --- .github/workflows/test.yml | 5 +- wordpress-plugin/phpcs.xml | 2 +- wordpress-plugin/src/DB/Table.php | 17 +++- wordpress-plugin/src/Init.php | 2 - wordpress-plugin/src/Models/Model.php | 91 +++++++++++++++++-- wordpress-plugin/src/Models/Product.php | 20 ++-- .../src/Models/ProductCollection.php | 11 ++- .../src/Models/ProductVariant.php | 10 +- wordpress-plugin/src/Models/Region.php | 12 +-- wordpress-plugin/src/Models/SyncProgress.php | 30 +++++- .../src/Routes/Admin/MedusaBulkSync.php | 9 +- wordpress-plugin/src/Routes/Product.php | 1 + wordpress-plugin/src/ScheduledActions.php | 6 ++ wordpress-plugin/src/Utils.php | 49 ++++++++-- 14 files changed, 219 insertions(+), 46 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e47221f..2c8c206 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,5 +83,6 @@ jobs: - name: Install composer dependencies run: composer install --prefer-dist --no-progress --no-suggest -d ./wordpress-plugin - - name: Run tests - run: composer run-script test:phpsyntax -d ./wordpress-plugin && composer run-script test:unit -d ./wordpress-plugin + - run: composer run-script test:phpsyntax -d ./wordpress-plugin + - run: composer run-script test:phpcs -d ./wordpress-plugin + - run: composer run-script test:unit -d ./wordpress-plugin diff --git a/wordpress-plugin/phpcs.xml b/wordpress-plugin/phpcs.xml index 39326a3..8a6ade4 100644 --- a/wordpress-plugin/phpcs.xml +++ b/wordpress-plugin/phpcs.xml @@ -49,6 +49,7 @@ + @@ -68,7 +69,6 @@ - diff --git a/wordpress-plugin/src/DB/Table.php b/wordpress-plugin/src/DB/Table.php index 83599c6..e67e64b 100644 --- a/wordpress-plugin/src/DB/Table.php +++ b/wordpress-plugin/src/DB/Table.php @@ -32,7 +32,13 @@ public static function table_exists() { global $wpdb; $table_name = static::$table_name; - return $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ) ) === $table_name; + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_var( + $wpdb->prepare( + 'SHOW TABLES LIKE %s', + $table_name + ) + ) === $table_name; } /** @@ -59,6 +65,13 @@ public static function delete( $where, $values ) { global $wpdb; $table_name = static::$table_name; - return $wpdb->query( $wpdb->prepare( "DELETE FROM $table_name WHERE $where", array_merge( $values ) ) ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->query( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare + "DELETE FROM $table_name WHERE $where", + array_merge( $values ) + ) + ); } } diff --git a/wordpress-plugin/src/Init.php b/wordpress-plugin/src/Init.php index 806c021..17f5b86 100644 --- a/wordpress-plugin/src/Init.php +++ b/wordpress-plugin/src/Init.php @@ -105,9 +105,7 @@ public function create_cart() { $cart_id = isset( $_COOKIE['cart_id'] ) ? $_COOKIE['cart_id'] : ''; // get user-provided country code - // phpcs:ignore if ( ! empty( $_GET['country_code'] ) ) { - // phpcs:ignore $country_code = $_GET['country_code']; } elseif ( ! empty( $_COOKIE['country_code'] ) ) { $country_code = $_COOKIE['country_code']; diff --git a/wordpress-plugin/src/Models/Model.php b/wordpress-plugin/src/Models/Model.php index 94e5f9d..58a50a0 100644 --- a/wordpress-plugin/src/Models/Model.php +++ b/wordpress-plugin/src/Models/Model.php @@ -75,7 +75,14 @@ public static function exists( $id ) { $table_name = static::$table_name; $primary_key = static::$primary_key; - return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table_name WHERE $primary_key = %s LIMIT 1;", array( $id ) ) ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_row( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT * FROM $table_name WHERE $primary_key = %s LIMIT 1;", + array( $id ) + ) + ); } /** @@ -98,7 +105,14 @@ public static function get_column( $column, $id ) { $table_name = static::$table_name; $primary_key = static::$primary_key; - return $wpdb->get_var( $wpdb->prepare( "SELECT $column FROM $table_name WHERE $primary_key = %s LIMIT 1;", array( $id ) ) ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_var( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT $column FROM $table_name WHERE $primary_key = %s LIMIT 1;", + array( $id ) + ) + ); } /** @@ -120,6 +134,7 @@ public static function delete( $id ) { $table_name = static::$table_name; $primary_key = static::$primary_key; + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->delete( $table_name, array( $primary_key => $id ) ); } @@ -138,7 +153,15 @@ public static function find_by( $column, $value ) { $format = static::$columns_format[ $column ]; $table_name = static::$table_name; - return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table_name WHERE $column = $format;", array( $value ) ), 'ARRAY_A' ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_row( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare + "SELECT * FROM $table_name WHERE $column = $format;", + array( $value ) + ), + 'ARRAY_A' + ); } /** @@ -163,8 +186,13 @@ public static function find_all_by( $column, $value, $options = array() ) { $table_name = static::$table_name; if ( empty( $options ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return $wpdb->get_results( - $wpdb->prepare( "SELECT * FROM $table_name WHERE $column = $format;", array( $value ) ), + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare + "SELECT * FROM $table_name WHERE $column = $format;", + array( $value ) + ), 'ARRAY_A' ); } @@ -189,8 +217,11 @@ public static function find_all_by( $column, $value, $options = array() ) { $offset = ( $options['page'] - 1 ) * $options['per_page']; + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return $wpdb->get_results( + // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared "SELECT * FROM $table_name WHERE $column = $format LIMIT %d OFFSET %d;", array( $value, $options['per_page'], $offset ) ), @@ -212,7 +243,15 @@ public static function find( $value ) { $table_name = static::$table_name; $primary_key = static::$primary_key; - return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table_name WHERE $primary_key = %s LIMIT 1;", array( $value ) ), ARRAY_A ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_row( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT * FROM $table_name WHERE $primary_key = %s LIMIT 1;", + array( $value ) + ), + ARRAY_A + ); } /** @@ -240,6 +279,7 @@ function ( $key ) use ( $columns_format ) { $where_format = array( $columns_format[ $primary_key ] ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $update = $wpdb->update( $table_name, $data, array( $primary_key => $id ), $format, $where_format ); if ( $update === false ) { @@ -270,6 +310,7 @@ function ( $key ) use ( $columns_format ) { array_keys( $data ) ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $insert = $wpdb->insert( $table_name, $data, $format ); if ( ! $insert ) { @@ -308,12 +349,14 @@ public static function validate_data( $data ) { foreach ( $errors->all() as $message ) { static::$errors[] = $message; + // phpcs:ignore error_log( '[MedusaWP] Validation error for ' . static::$table_name . ':' . $message ); } return false; } } catch ( \Exception $e ) { + // phpcs:ignore error_log( $e ); static::$errors[] = __( 'Data validation failed.', 'medusawp' ); @@ -351,7 +394,14 @@ public static function all( $options = array() ) { $table_name = static::$table_name; if ( empty( $options ) ) { - return $wpdb->get_results( "SELECT * FROM $table_name", ARRAY_A ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_results( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT * FROM $table_name" + ), + ARRAY_A + ); } $default_options = array( @@ -374,7 +424,15 @@ public static function all( $options = array() ) { $offset = ( $options['page'] - 1 ) * $options['per_page']; - return $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $table_name LIMIT %d OFFSET %d", array( $options['per_page'], $offset ) ), ARRAY_A ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_results( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT * FROM $table_name LIMIT %d OFFSET %d", + array( $options['per_page'], $offset ) + ), + ARRAY_A + ); } /** @@ -389,7 +447,13 @@ public static function count_all() { global $wpdb; $table_name = static::$table_name; - return intval( $wpdb->get_var( "SELECT COUNT(*) FROM $table_name" ) ); + return intval( + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->get_var( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $wpdb->prepare( "SELECT COUNT(*) FROM $table_name" ) + ) + ); } /** @@ -405,6 +469,15 @@ public static function count_all_by( $column, $value ) { $format = static::$columns_format[ $column ]; $table_name = static::$table_name; - return intval( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $table_name WHERE $column = $format;", array( $value ) ) ) ); + return intval( + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->get_var( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare + "SELECT COUNT(*) FROM $table_name WHERE $column = $format;", + array( $value ) + ) + ) + ); } } diff --git a/wordpress-plugin/src/Models/Product.php b/wordpress-plugin/src/Models/Product.php index 090c1b0..9a2bda6 100644 --- a/wordpress-plugin/src/Models/Product.php +++ b/wordpress-plugin/src/Models/Product.php @@ -23,7 +23,7 @@ class Product extends Model { 'subtitle' => '%s', 'description' => '%s', 'handle' => '%s', - 'is_giftcard' => '%d', // bool,tinyint(1) + 'is_giftcard' => '%d', 'thumbnail' => '%s', 'shipping_profile_name' => '%s', 'weight' => '%d', @@ -33,11 +33,11 @@ class Product extends Model { 'origin_country' => '%s', 'mid_code' => '%s', 'material' => '%s', - 'created_at' => '%s', // datetime - 'updated_at' => '%s', // datetime - 'deleted_at' => '%s', // datetime + 'created_at' => '%s', + 'updated_at' => '%s', + 'deleted_at' => '%s', 'type_name' => '%s', - 'discountable' => '%d', // bool,tinyint(1) + 'discountable' => '%d', 'external_id' => '%s', 'status' => '%s', 'synced_at' => '%d', @@ -154,6 +154,14 @@ public static function count_all_thumbnails() { global $wpdb; $table_name = static::$table_name; - return intval( $wpdb->get_var( "SELECT COUNT(*) FROM $table_name WHERE thumbnail != ''" ) ); + return intval( + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->get_var( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT COUNT(*) FROM $table_name WHERE thumbnail != ''" + ) + ) + ); } } diff --git a/wordpress-plugin/src/Models/ProductCollection.php b/wordpress-plugin/src/Models/ProductCollection.php index b48d4ce..b3d9268 100644 --- a/wordpress-plugin/src/Models/ProductCollection.php +++ b/wordpress-plugin/src/Models/ProductCollection.php @@ -19,8 +19,8 @@ class ProductCollection extends Model { 'id' => '%s', 'post_id' => '%d', 'title' => '%s', - 'created_at' => '%s', // datetime - 'updated_at' => '%s', // datetime + 'created_at' => '%s', + 'updated_at' => '%s', 'deleted_at' => '%s', 'synced_at' => '%d', 'sync_status' => '%s', @@ -136,8 +136,13 @@ public static function get_products_post_ids( int $collection_post_id ) { $products_table = MEDUSAWP_TABLE_PRODUCTS; $table_name = static::$table_name; + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return $wpdb->get_col( - $wpdb->prepare( 'SELECT product.post_id FROM %i product INNER JOIN %i pcol ON pcol.id = product.collection_id WHERE pcol.post_id = %d;', array( $products_table, $table_name, $collection_post_id ) ) + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT product.post_id FROM $products_table product INNER JOIN $table_name pcol ON pcol.id = product.collection_id WHERE pcol.post_id = %d;", + array( $collection_post_id ) + ) ); } } diff --git a/wordpress-plugin/src/Models/ProductVariant.php b/wordpress-plugin/src/Models/ProductVariant.php index 5050374..bd8b8ed 100644 --- a/wordpress-plugin/src/Models/ProductVariant.php +++ b/wordpress-plugin/src/Models/ProductVariant.php @@ -24,8 +24,8 @@ class ProductVariant extends Model { 'ean' => '%s', 'upc' => '%s', 'inventory_quantity' => '%d', - 'allow_backorder' => '%d', // bool,tinyint(1) - 'manage_inventory' => '%d', // bool,tinyint(1) + 'allow_backorder' => '%d', + 'manage_inventory' => '%d', 'hs_code' => '%s', 'origin_country' => '%s', 'mid_code' => '%s', @@ -33,9 +33,9 @@ class ProductVariant extends Model { 'width' => '%d', 'length' => '%d', 'height' => '%d', - 'created_at' => '%s', // datetime - 'updated_at' => '%s', // datetime - 'deleted_at' => '%s', // datetime + 'created_at' => '%s', + 'updated_at' => '%s', + 'deleted_at' => '%s', 'type_name' => '%s', 'metadata' => '%s', 'variant_rank' => '%d', diff --git a/wordpress-plugin/src/Models/Region.php b/wordpress-plugin/src/Models/Region.php index c1a2985..110405f 100644 --- a/wordpress-plugin/src/Models/Region.php +++ b/wordpress-plugin/src/Models/Region.php @@ -20,13 +20,13 @@ class Region extends Model { 'currency_code' => '%s', 'tax_rate' => '%d', 'tax_code' => '%s', - 'created_at' => '%s', // datetime - 'updated_at' => '%s', // datetime - 'deleted_at' => '%s', // datetime + 'created_at' => '%s', + 'updated_at' => '%s', + 'deleted_at' => '%s', 'metadata' => '%s', - 'gift_cards_taxable' => '%d', // bool,tinyint(1) - 'automatic_taxes' => '%d', // bool,tinyint(1) - 'includes_tax' => '%d', // bool,tinyint(1) + 'gift_cards_taxable' => '%d', + 'automatic_taxes' => '%d', + 'includes_tax' => '%d', 'tax_provider_id' => '%s', 'sync_status' => '%s', 'synced_at' => '%d', diff --git a/wordpress-plugin/src/Models/SyncProgress.php b/wordpress-plugin/src/Models/SyncProgress.php index 9acd88e..19d5721 100644 --- a/wordpress-plugin/src/Models/SyncProgress.php +++ b/wordpress-plugin/src/Models/SyncProgress.php @@ -84,7 +84,17 @@ public static function count_synced( string $model, int $sync_timestamp ) { global $wpdb; $table_name = static::$table_name; - return intval( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $table_name WHERE model = %s AND sync_timestamp = %d", $model, $sync_timestamp ) ) ); + return intval( + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->get_var( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT COUNT(*) FROM $table_name WHERE model = %s AND sync_timestamp = %d", + $model, + $sync_timestamp + ) + ) + ); } /** @@ -99,7 +109,16 @@ public static function count_all_synced( int $sync_timestamp ) { global $wpdb; $table_name = static::$table_name; - return intval( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $table_name WHERE sync_timestamp = %d", $sync_timestamp ) ) ); + return intval( + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->get_var( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT COUNT(*) FROM $table_name WHERE sync_timestamp = %d", + $sync_timestamp + ) + ) + ); } public static function get_sync_progress_troubleshoot_messages( int $sync_timestamp ) { @@ -109,8 +128,13 @@ public static function get_sync_progress_troubleshoot_messages( int $sync_timest global $wpdb; $table_name = static::$table_name; + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return $wpdb->get_results( - $wpdb->prepare( "SELECT * FROM $table_name WHERE sync_timestamp = %d AND status = 'error' ORDER BY started_at DESC;", array( $sync_timestamp ) ), + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT * FROM $table_name WHERE sync_timestamp = %d AND status = 'error' ORDER BY started_at DESC;", + array( $sync_timestamp ) + ), 'ARRAY_A' ); } diff --git a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php index e2ebd1b..f4c3f91 100644 --- a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php +++ b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php @@ -624,15 +624,20 @@ public function remove_synced_data() { ); foreach ( $tables as $table ) { - $truncate = $wpdb->query( "TRUNCATE TABLE $table" ); + $truncate = $wpdb->query( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $wpdb->prepare( "TRUNCATE TABLE $table" ) + ); if ( ! $truncate ) { $errors[] = $wpdb->last_error; } } // Delete product posts from wp_posts and product posts meta from wp_postmeta + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $posts_delete = $wpdb->query( $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared "DELETE post, postmeta FROM $wpdb->posts post LEFT JOIN $wpdb->postmeta postmeta ON post.id = postmeta.post_id LEFT JOIN $tables[0] product ON post.id = product.post_id WHERE post.post_type = 'medusa-product' AND product.post_id IS NULL", ) ); @@ -642,8 +647,10 @@ public function remove_synced_data() { } // Delete collections posts from wp_posts + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $collections_delete = $wpdb->query( $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared "DELETE post FROM $wpdb->posts post LEFT JOIN $tables[2] collection ON post.id = collection.post_id WHERE post.post_type = 'medusa-collection' AND collection.post_id IS NULL" ) ); diff --git a/wordpress-plugin/src/Routes/Product.php b/wordpress-plugin/src/Routes/Product.php index 3d47caa..3c0fef1 100644 --- a/wordpress-plugin/src/Routes/Product.php +++ b/wordpress-plugin/src/Routes/Product.php @@ -132,6 +132,7 @@ private function db_cleanup() { $delete_posts = Utils::delete_posts_without_related_product(); if ( $delete_products === false || $delete_posts === false ) { + // phpcs:ignore error_log( '[MedusaWP] Cleanup of products failed. Please delete old data manaully.', 'medusawp' ); return false; } diff --git a/wordpress-plugin/src/ScheduledActions.php b/wordpress-plugin/src/ScheduledActions.php index 0018b77..39676e0 100644 --- a/wordpress-plugin/src/ScheduledActions.php +++ b/wordpress-plugin/src/ScheduledActions.php @@ -20,8 +20,10 @@ public static function schedule_import_product_thumbnail_batch( int $previous_po $product_table = MEDUSAWP_TABLE_PRODUCTS; + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $products = $wpdb->get_results( $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared "SELECT id, post_id FROM $product_table WHERE thumbnail IS NOT NULL AND post_id > %d ORDER BY post_id ASC LIMIT 100", array( $previous_post_id ?? 0 ) ), @@ -88,6 +90,7 @@ public static function import_product_thumbnail( string $product_id, ?int $sync_ Utils::update_is_sync_finished( $sync_timestamp ); + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped throw new \Exception( "Product $product_id thumbnail import failed because product was not found in the DB." ); } @@ -110,6 +113,7 @@ public static function import_product_thumbnail( string $product_id, ?int $sync_ Utils::update_is_sync_finished( $sync_timestamp ); + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped throw new \Exception( "Product $product_id thumbnail import failed because product don't have thumbnail." ); } @@ -153,6 +157,7 @@ public static function import_product_thumbnail( string $product_id, ?int $sync_ Utils::update_is_sync_finished( $sync_timestamp ); + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped throw new \Exception( "Product $product_id thumbnail import failed." ); } @@ -178,6 +183,7 @@ public static function import_product_thumbnail( string $product_id, ?int $sync_ Utils::update_is_sync_finished( $sync_timestamp ); + // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped throw new \Exception( 'Failed to set post ' . $product['post_id'] . ' thumbnail.' ); } diff --git a/wordpress-plugin/src/Utils.php b/wordpress-plugin/src/Utils.php index 3f2fd77..79f1133 100644 --- a/wordpress-plugin/src/Utils.php +++ b/wordpress-plugin/src/Utils.php @@ -38,7 +38,13 @@ public static function delete_posts_without_related_product() { global $wpdb; $products_table = MEDUSAWP_TABLE_PRODUCTS; - return $wpdb->query( "DELETE post FROM $wpdb->posts post LEFT JOIN $products_table product ON post.id = product.post_id WHERE post.post_type = 'medusa-product' AND product.post_id IS NULL" ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->query( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "DELETE post FROM $wpdb->posts post LEFT JOIN $products_table product ON post.id = product.post_id WHERE post.post_type = 'medusa-product' AND product.post_id IS NULL" + ) + ); } /** @@ -50,7 +56,13 @@ public static function delete_posts_without_related_collection() { global $wpdb; $collections_table = MEDUSAWP_TABLE_PRODUCT_COLLECTIONS; - return $wpdb->query( "DELETE post FROM $wpdb->posts post LEFT JOIN $collections_table pcol ON post.id = pcol.post_id WHERE post.post_type = 'medusa-collection' AND pcol.post_id IS NULL" ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->query( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "DELETE post FROM $wpdb->posts post LEFT JOIN $collections_table pcol ON post.id = pcol.post_id WHERE post.post_type = 'medusa-collection' AND pcol.post_id IS NULL" + ) + ); } /** @@ -63,7 +75,13 @@ public static function delete_prices_without_related_variant() { $variants_table = MEDUSAWP_TABLE_PRODUCT_VARIANTS; $prices_table = MEDUSAWP_TABLE_MONEY_AMOUNT; - return $wpdb->query( "DELETE price FROM $prices_table price LEFT JOIN $variants_table variant ON price.variant_id = variant.id WHERE variant.id IS NULL" ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->query( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "DELETE price FROM $prices_table price LEFT JOIN $variants_table variant ON price.variant_id = variant.id WHERE variant.id IS NULL" + ) + ); } /** @@ -76,7 +94,15 @@ public static function get_collection_name( $collection_id ) { global $wpdb; $collections_table = MEDUSAWP_TABLE_PRODUCT_COLLECTIONS; - return $wpdb->get_row( $wpdb->prepare( "SELECT title FROM $collections_table WHERE id = %s LIMIT 1;", array( $collection_id ) ), 'ARRAY_A' ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_row( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT title FROM $collections_table WHERE id = %s LIMIT 1;", + array( $collection_id ) + ), + 'ARRAY_A' + ); } /** @@ -88,7 +114,11 @@ public static function get_regions() { global $wpdb; $table = MEDUSAWP_TABLE_REGIONS; - return $wpdb->get_results( "SELECT * FROM $table" ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_results( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + $wpdb->prepare( "SELECT * FROM $table" ) + ); } /** @@ -101,7 +131,14 @@ public static function get_variant_prices( $variant_id ) { global $wpdb; $prices_table = MEDUSAWP_TABLE_MONEY_AMOUNT; - return $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $prices_table WHERE variant_id = %s;", array( $variant_id ) ) ); + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_results( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT * FROM $prices_table WHERE variant_id = %s;", + array( $variant_id ) + ) + ); } /** From 40e8c36d6bb3b73789224281eeb547a481415299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 11 Dec 2023 13:02:19 +0100 Subject: [PATCH 16/19] add PHP 8.3 to test php-version. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c8c206..62fd808 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,7 +52,7 @@ jobs: strategy: matrix: - php-version: ['7.4', '8.0', '8.1', '8.2'] + php-version: ['7.4', '8.0', '8.1', '8.2', '8.3'] composer-version: ['v1', 'v2'] steps: From 9f9acc95750db4a2449d2b16acb3a9757ee7f881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 11 Dec 2023 13:15:54 +0100 Subject: [PATCH 17/19] attempt to fix #31. Plugin could not be activated because it triggered a fatal error. - woocommerce/action-scheduler supports Composer, no need to define it by using a package repository --- wordpress-plugin/composer.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/wordpress-plugin/composer.json b/wordpress-plugin/composer.json index 4070b83..d40fab4 100644 --- a/wordpress-plugin/composer.json +++ b/wordpress-plugin/composer.json @@ -55,20 +55,6 @@ "MedusaWP\\MedusaClient\\Admin\\Test\\": "oas-clients/admin/test/" } }, - "repositories": [ - { - "type": "package", - "package": { - "name": "woocommerce/action-scheduler", - "version": "3.7.0", - "source": { - "url": "https://github.com/woocommerce/action-scheduler.git", - "type": "git", - "reference": "3.7.0" - } - } - } - ], "config": { "sort-packages": true }, From c4c0de880989804f5c79f3a7a405c09bac02e50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 11 Dec 2023 13:32:38 +0100 Subject: [PATCH 18/19] Revert "attempt to fix #31." This reverts commit 9f9acc95750db4a2449d2b16acb3a9757ee7f881. --- wordpress-plugin/composer.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wordpress-plugin/composer.json b/wordpress-plugin/composer.json index d40fab4..4070b83 100644 --- a/wordpress-plugin/composer.json +++ b/wordpress-plugin/composer.json @@ -55,6 +55,20 @@ "MedusaWP\\MedusaClient\\Admin\\Test\\": "oas-clients/admin/test/" } }, + "repositories": [ + { + "type": "package", + "package": { + "name": "woocommerce/action-scheduler", + "version": "3.7.0", + "source": { + "url": "https://github.com/woocommerce/action-scheduler.git", + "type": "git", + "reference": "3.7.0" + } + } + } + ], "config": { "sort-packages": true }, From 85cb7fbe984c915a09172ef15b73031764127098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 11 Dec 2023 15:33:45 +0100 Subject: [PATCH 19/19] fix #31 - autoload `woocommerce/action-scheduler` the proper AS way. - else throws PHP Fatal error: Uncaught Error: Failed opening required ... --- wordpress-plugin/composer.json | 5 +- wordpress-plugin/composer.lock | 92 +++++++++++++++++++--------------- wordpress-plugin/medusawp.php | 1 + 3 files changed, 54 insertions(+), 44 deletions(-) diff --git a/wordpress-plugin/composer.json b/wordpress-plugin/composer.json index 4070b83..512b28a 100644 --- a/wordpress-plugin/composer.json +++ b/wordpress-plugin/composer.json @@ -44,10 +44,7 @@ "MedusaWP\\": "src/", "MedusaWP\\MedusaClient\\Store\\": "oas-clients/store/lib/", "MedusaWP\\MedusaClient\\Admin\\": "oas-clients/admin/lib/" - }, - "files": [ - "vendor/woocommerce/action-scheduler/action-scheduler.php" - ] + } }, "autoload-dev": { "psr-4": { diff --git a/wordpress-plugin/composer.lock b/wordpress-plugin/composer.lock index 5426c62..c07465a 100644 --- a/wordpress-plugin/composer.lock +++ b/wordpress-plugin/composer.lock @@ -1159,16 +1159,16 @@ }, { "name": "nesbot/carbon", - "version": "2.72.0", + "version": "2.72.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b" + "reference": "2b3b3db0a2d0556a177392ff1a3bf5608fa09f78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", - "reference": "a6885fcbad2ec4360b0e200ee0da7d9b7c90786b", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2b3b3db0a2d0556a177392ff1a3bf5608fa09f78", + "reference": "2b3b3db0a2d0556a177392ff1a3bf5608fa09f78", "shasum": "" }, "require": { @@ -1257,7 +1257,7 @@ "type": "tidelift" } ], - "time": "2023-11-28T10:13:25+00:00" + "time": "2023-12-08T23:47:49+00:00" }, { "name": "psr/clock", @@ -2905,16 +2905,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.40.2", + "version": "v3.41.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8" + "reference": "8b6ae8dcbaf23f09680643ab832a4a3a260265f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4344562a516b76afe8f2d64b2e52214c30d64ed8", - "reference": "4344562a516b76afe8f2d64b2e52214c30d64ed8", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/8b6ae8dcbaf23f09680643ab832a4a3a260265f6", + "reference": "8b6ae8dcbaf23f09680643ab832a4a3a260265f6", "shasum": "" }, "require": { @@ -2944,8 +2944,6 @@ "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", - "phpspec/prophecy": "^1.17", - "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.6", "symfony/phpunit-bridge": "^6.3.8 || ^7.0", "symfony/yaml": "^5.4 || ^6.0 || ^7.0" @@ -2990,7 +2988,7 @@ "type": "github" } ], - "time": "2023-12-03T09:21:33+00:00" + "time": "2023-12-10T19:59:27+00:00" }, { "name": "myclabs/deep-copy", @@ -3049,16 +3047,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" }, "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/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "shasum": "" }, "require": { @@ -3097,7 +3095,7 @@ "parser", "php" ], - "time": "2023-08-13T19:53:39+00:00" + "time": "2023-12-10T21:03:43+00:00" }, { "name": "phar-io/manifest", @@ -3419,29 +3417,29 @@ }, { "name": "phpcsstandards/phpcsextra", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", - "reference": "78b2cae1e9de1c05f0416de6f9a658cbb83ac324" + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/78b2cae1e9de1c05f0416de6f9a658cbb83ac324", - "reference": "78b2cae1e9de1c05f0416de6f9a658cbb83ac324", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", "shasum": "" }, "require": { "php": ">=5.4", - "phpcsstandards/phpcsutils": "^1.0.8", - "squizlabs/php_codesniffer": "^3.7.1" + "phpcsstandards/phpcsutils": "^1.0.9", + "squizlabs/php_codesniffer": "^3.8.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcsstandards/phpcsdevcs": "^1.1.6", "phpcsstandards/phpcsdevtools": "^1.2.1", - "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "type": "phpcodesniffer-standard", "extra": { @@ -3488,33 +3486,33 @@ "type": "open_collective" } ], - "time": "2023-12-02T14:30:12+00:00" + "time": "2023-12-08T16:49:07+00:00" }, { "name": "phpcsstandards/phpcsutils", - "version": "1.0.8", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", - "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7" + "reference": "908247bc65010c7b7541a9551e002db12e9dae70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/69465cab9d12454e5e7767b9041af0cd8cd13be7", - "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/908247bc65010c7b7541a9551e002db12e9dae70", + "reference": "908247bc65010c7b7541a9551e002db12e9dae70", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.7.1 || 4.0.x-dev@dev" + "squizlabs/php_codesniffer": "^3.8.0 || 4.0.x-dev@dev" }, "require-dev": { "ext-filter": "*", "php-parallel-lint/php-console-highlighter": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcsstandards/phpcsdevcs": "^1.1.6", - "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0" }, "type": "phpcodesniffer-standard", "extra": { @@ -3556,7 +3554,21 @@ "tokens", "utility" ], - "time": "2023-07-16T21:39:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T14:50:00+00:00" }, { "name": "phpunit/php-code-coverage", @@ -6044,12 +6056,12 @@ "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "17cc5850f147fbe0a2dd0a5d3c7849911775b542" + "reference": "15c3037c35b2867ad87c81e5d87d2d92ecee59b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/17cc5850f147fbe0a2dd0a5d3c7849911775b542", - "reference": "17cc5850f147fbe0a2dd0a5d3c7849911775b542", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/15c3037c35b2867ad87c81e5d87d2d92ecee59b5", + "reference": "15c3037c35b2867ad87c81e5d87d2d92ecee59b5", "shasum": "" }, "require": { @@ -6058,9 +6070,9 @@ "ext-tokenizer": "*", "ext-xmlreader": "*", "php": ">=5.4", - "phpcsstandards/phpcsextra": "^1.2.0", - "phpcsstandards/phpcsutils": "^1.0.8", - "squizlabs/php_codesniffer": "^3.7.2" + "phpcsstandards/phpcsextra": "^1.2.1", + "phpcsstandards/phpcsutils": "^1.0.9", + "squizlabs/php_codesniffer": "^3.8.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", @@ -6093,11 +6105,11 @@ ], "funding": [ { - "url": "https://opencollective.com/thewpcc/contribute/wp-php-63406", + "url": "https://opencollective.com/php_codesniffer", "type": "custom" } ], - "time": "2023-12-03T22:21:24+00:00" + "time": "2023-12-11T12:57:13+00:00" } ], "aliases": [], diff --git a/wordpress-plugin/medusawp.php b/wordpress-plugin/medusawp.php index 487a3c2..0934857 100755 --- a/wordpress-plugin/medusawp.php +++ b/wordpress-plugin/medusawp.php @@ -40,6 +40,7 @@ die; } +require_once plugin_dir_path( __FILE__ ) . '/vendor/woocommerce/action-scheduler/action-scheduler.php'; require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php'; require_once plugin_dir_path( __FILE__ ) . '/functions.php';