From 6c1788849b22ec567a46a1be8877d41a3d5b1e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 30 Nov 2024 10:54:29 +0000 Subject: [PATCH 1/4] Fix Composer configuration --- composer.json | 43 ++++++++++++++++++++++--------------------- composer.lock | 4 ++-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index 617867c74..ba8420ddc 100644 --- a/composer.json +++ b/composer.json @@ -1,32 +1,25 @@ { "name": "myparcelnl/woocommerce", - "version": "5.0.0", + "description": "Export your WooCommerce orders to MyParcel and print labels", + "license": "MIT", "require": { - "myparcelnl/pdk": "^2.0.0", "guzzlehttp/guzzle": "^7.5.0", - "psr/log": "*" - }, - "scripts": { - "analyse": "php -dmemory_limit=-1 vendor/bin/phpstan analyse", - "analyse:generate": "composer run analyse -- --generate-baseline phpstan-baseline.php --allow-empty-baseline", - "analyze": "composer run analyse", - "analyze:generate": "composer run analyse:generate", - "test": "vendor/bin/pest", - "test:coverage": "php -dpcov.enabled=1 vendor/bin/pest --coverage-clover=coverage.xml" + "myparcelnl/pdk": "^2.0.0", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "humbug/php-scoper": "^0.17.5", - "pestphp/pest": ">= 1", + "pestphp/pest": ">= 1.0", "php-stubs/woocommerce-stubs": "^8.0", "phpstan/phpstan": "^1.10", - "spatie/pest-plugin-snapshots": ">= 1", + "spatie/pest-plugin-snapshots": ">= 1.0", "szepeviktor/phpstan-wordpress": "^1.3" }, "minimum-stability": "dev", "prefer-stable": true, "autoload": { "psr-4": { - "MyParcelNL\\WooCommerce\\": "src" + "MyParcelNL\\WooCommerce\\": "src/" }, "files": [ "src/functions.php" @@ -34,11 +27,11 @@ }, "autoload-dev": { "psr-4": { - "": "tests/factories", - "MyParcelNL\\Pdk\\": "vendor/myparcelnl/pdk/tests/factories", - "MyParcelNL\\Pdk\\Tests\\": "vendor/myparcelnl/pdk/tests", - "MyParcelNL\\WooCommerce\\": "tests/Unit", - "MyParcelNL\\WooCommerce\\Tests\\": "tests" + "": "tests/factories/", + "MyParcelNL\\Pdk\\": "vendor/myparcelnl/pdk/tests/factories/", + "MyParcelNL\\Pdk\\Tests\\": "vendor/myparcelnl/pdk/tests/", + "MyParcelNL\\WooCommerce\\": "tests/Unit/", + "MyParcelNL\\WooCommerce\\Tests\\": "tests/" }, "files": [ "vendor/myparcelnl/pdk/tests/functions.php", @@ -47,9 +40,17 @@ ] }, "config": { - "prepend-autoloader": false, "allow-plugins": { "pestphp/pest-plugin": true - } + }, + "prepend-autoloader": false + }, + "scripts": { + "analyse": "phpstan analyse --memory-limit=2G", + "analyse:generate": "@analyse --generate-baseline phpstan-baseline.php --allow-empty-baseline", + "analyze": "@analyse", + "analyze:generate": "@analyse:generate", + "test": "vendor/bin/pest", + "test:coverage": "php -dpcov.enabled=1 vendor/bin/pest --coverage-clover=coverage.xml" } } diff --git a/composer.lock b/composer.lock index f9011a081..77998c11d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e101617cc9219947be6ee6f129258617", + "content-hash": "a6ddea8732f3487559b4f04a3e11cc5b", "packages": [ { "name": "guzzlehttp/guzzle", @@ -5509,5 +5509,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From ed88a8e67fb1d7da92b5fee56ee7de24cce36667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 30 Nov 2024 10:57:27 +0000 Subject: [PATCH 2/4] Fix scripts --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ba8420ddc..30e5e706a 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "analyse:generate": "@analyse --generate-baseline phpstan-baseline.php --allow-empty-baseline", "analyze": "@analyse", "analyze:generate": "@analyse:generate", - "test": "vendor/bin/pest", + "test": "pest", "test:coverage": "php -dpcov.enabled=1 vendor/bin/pest --coverage-clover=coverage.xml" } } From bce42f3e5cd1dcbcadc5c68ecd03f802e870e065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 30 Nov 2024 11:01:27 +0000 Subject: [PATCH 3/4] Add type --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 30e5e706a..ad741aa8f 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "name": "myparcelnl/woocommerce", + "type": "wordpress-plugin", "description": "Export your WooCommerce orders to MyParcel and print labels", "license": "MIT", "require": { From d0a1e1c8174aa14ef1d01a9d44ecce642aa25071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 30 Nov 2024 13:24:09 +0000 Subject: [PATCH 4/4] Require PHP --- composer.json | 1 + composer.lock | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ad741aa8f..795b84eb0 100644 --- a/composer.json +++ b/composer.json @@ -4,6 +4,7 @@ "description": "Export your WooCommerce orders to MyParcel and print labels", "license": "MIT", "require": { + "php": ">= 7.1", "guzzlehttp/guzzle": "^7.5.0", "myparcelnl/pdk": "^2.0.0", "psr/log": "^1.1 || ^2.0 || ^3.0" diff --git a/composer.lock b/composer.lock index 77998c11d..3a46ae3f4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a6ddea8732f3487559b4f04a3e11cc5b", + "content-hash": "f2687a7185d6d8db81ade338ef76817b", "packages": [ { "name": "guzzlehttp/guzzle", @@ -5507,7 +5507,9 @@ "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, - "platform": [], + "platform": { + "php": ">= 7.1" + }, "platform-dev": [], "plugin-api-version": "2.6.0" }