diff --git a/bin/composer/wp/composer.lock b/bin/composer/wp/composer.lock index 9d610856bc0f2..d1cea76fbfc9c 100644 --- a/bin/composer/wp/composer.lock +++ b/bin/composer/wp/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "gettext/gettext", - "version": "v4.8.2", + "version": "v4.8.3", "source": { "type": "git", "url": "https://github.com/php-gettext/Gettext.git", - "reference": "e474f872f2c8636cf53fd283ec4ce1218f3d236a" + "reference": "57ff4fb16647e78e80a5909fe3c190f1c3110321" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/e474f872f2c8636cf53fd283ec4ce1218f3d236a", - "reference": "e474f872f2c8636cf53fd283ec4ce1218f3d236a", + "url": "https://api.github.com/repos/php-gettext/Gettext/zipball/57ff4fb16647e78e80a5909fe3c190f1c3110321", + "reference": "57ff4fb16647e78e80a5909fe3c190f1c3110321", "shasum": "" }, "require": { @@ -70,9 +70,9 @@ "support": { "email": "oom@oscarotero.com", "issues": "https://github.com/oscarotero/Gettext/issues", - "source": "https://github.com/php-gettext/Gettext/tree/v4.8.2" + "source": "https://github.com/php-gettext/Gettext/tree/v4.8.3" }, - "time": "2019-12-02T10:21:14+00:00" + "time": "2020-11-18T22:35:49+00:00" }, { "name": "gettext/languages", diff --git a/composer.json b/composer.json index 96f8467e83bb6..118a12762b22c 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,7 @@ "psr/container": "1.0.0", "woocommerce/action-scheduler": "3.1.6", "woocommerce/woocommerce-admin": "1.7.0", - "woocommerce/woocommerce-blocks": "3.8.0", - "woocommerce/woocommerce-lib": "@dev" + "woocommerce/woocommerce-blocks": "3.8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4" @@ -54,7 +53,11 @@ "autoload-dev": { "psr-4": { "Automattic\\WooCommerce\\Tests\\": "tests/php/src/", - "Automattic\\WooCommerce\\Testing\\Tools\\": "tests/Tools/" + "Automattic\\WooCommerce\\Testing\\Tools\\": "tests/Tools/", + "Automattic\\WooCommerce\\Vendor\\": "lib/packages/" + }, + "psr-0": { + "Automattic\\WooCommerce\\Vendor\\": "lib/packages/" }, "classmap": [ "tests/legacy/unit-tests/rest-api/Helpers" diff --git a/composer.lock b/composer.lock index cdba0b3a91759..cc7487aaa3492 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": "cf86e77a0dae2549e3e8060ae85f8af7", + "content-hash": "ddeda3843bbb8fd35abf1cea951c47df", "packages": [ { "name": "automattic/jetpack-autoloader", @@ -609,60 +609,6 @@ "source": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/tree/v3.8.0" }, "time": "2020-11-10T15:07:11+00:00" - }, - { - "name": "woocommerce/woocommerce-lib", - "version": "dev-use-mozart-to-renamespace-dependencies", - "dist": { - "type": "path", - "url": "lib", - "reference": "d9d4733f0ed94289ad50fdf98cb4bc028384f482" - }, - "require": { - "php": ">=7.0", - "psr/container": "^1.0" - }, - "require-dev": { - "league/container": "3.3.3" - }, - "type": "library", - "extra": { - "mozart": { - "dep_namespace": "Automattic\\WooCommerce\\Vendor\\", - "dep_directory": "/packages/", - "packages": [ - "league/container" - ], - "excluded_packages": [ - "psr/container" - ], - "classmap_directory": "/classes/", - "classmap_prefix": "WC_", - "delete_vendor_directories": false - } - }, - "autoload": { - "psr-4": { - "Automattic\\WooCommerce\\Vendor\\": "packages/" - }, - "psr-0": { - "Automattic\\WooCommerce\\Vendor\\": "packages/" - } - }, - "scripts": { - "post-install-cmd": [ - "\"../vendor/bin/mozart\" compose", - "composer dump-autoload" - ], - "post-update-cmd": [ - "\"../vendor/bin/mozart\" compose", - "composer dump-autoload" - ] - }, - "description": "A package for hiding re-namespaced dependencies and executing them", - "transport-options": { - "relative": true - } } ], "packages-dev": [ @@ -719,9 +665,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "woocommerce/woocommerce-lib": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/lib/README.md b/lib/README.md index 543b5e4bd9658..7119d5574bdc2 100644 --- a/lib/README.md +++ b/lib/README.md @@ -26,6 +26,6 @@ Updating a package is as easy as changing the version in `composer.json` and the If you would like to add a package which does not undergo conflict avoidance you must take steps to ensure it appears in the root autoloader. -1. Add package to `require` instead of `require-dev` (This allows it to be pulled transitively) +1. Add package to the `require` section of both the `lib/composer.json` and root `composer.json` file instead of `require-dev` 2. Add package slug to `extra/mozart/excluded-packages` section of `composer.json` 3. Run `composer run-script build-lib` from the root directory (You **should not** see the package in `packages/VendorName/PackageName` or `classes`) diff --git a/lib/composer.json b/lib/composer.json index 2970eb74f9206..7e9e4481f95dc 100644 --- a/lib/composer.json +++ b/lib/composer.json @@ -10,14 +10,6 @@ "require-dev": { "league/container": "3.3.3" }, - "autoload": { - "psr-4": { - "Automattic\\WooCommerce\\Vendor\\": "packages/" - }, - "psr-0": { - "Automattic\\WooCommerce\\Vendor\\": "packages/" - } - }, "config": { "platform": { "php": "7.0" @@ -25,12 +17,10 @@ }, "scripts": { "post-install-cmd": [ - "\"../vendor/bin/mozart\" compose", - "composer dump-autoload" + "\"../vendor/bin/mozart\" compose" ], "post-update-cmd": [ - "\"../vendor/bin/mozart\" compose", - "composer dump-autoload" + "\"../vendor/bin/mozart\" compose" ] }, "extra": { @@ -45,7 +35,7 @@ ], "classmap_directory": "/classes/", "classmap_prefix": "WC_Vendor_", - "delete_vendor_directories": false + "delete_vendor_directories": true } } } diff --git a/lib/composer.lock b/lib/composer.lock index f24c69c33eda2..7484f6c2635ba 100644 --- a/lib/composer.lock +++ b/lib/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": "998898140bfcf00b7d3a9b793ecfba72", + "content-hash": "df548645b5c00d585705cd10c6ffd3f7", "packages": [ { "name": "psr/container",