-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Keep project composer.json clean #21565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To avoid future upgrade issues like the 2.2.x to 2.3.0 upgrade we should aim to keep the project composer.json file as small as possible. See https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html A better place for it would likely be the composer.json of `magento/magento2-base`.
Hi @fooman. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
The last commit should take care of the hash error in the static test (error 1) - however as error 2 is pre-existing I don't think this is within the scope of this PR to address.
|
@fooman what was the problem with this particular package? To me current situation seems fine as cloned from GitHub is dev version of Magento. And |
Consider the following steps: Install Magento 2.2.6
Note your current composer.json
Try to upgrade with
Note that you can't due the following error messages:
You are now required to manually look up version numbers of the related dev packages and manually remove some packages - see here under "Specify additional packages" . This is not a great process. It's also not deterministic (ie no chance of easily automating M2 upgrades). This pull request is not attempting to fix this, but it's also making sure we are not making this worse in the future by adding an additional package to the require-dev section (there is nothing wrong with this particular package it's just the latest that got added). In summary I consider this PR a starting point on a discussion how we can improve. Adding the dev package "magento/magento2-functional-testing-framework" currently aims to help the very small percentage that develop Magento 2 at the cost of making it harder to upgrade in the future for 100% of Magento users. My suggestion:
Better options:
|
@fooman thanks for detailed steps, will try them in action this weekend. Is it possible to expand constraint for |
@orlangur having a wider constraint would certainly help, but would still add a dev tool for all installs. |
Just to confirm a comment I came across in EngCom Slack channel why I think it's a bad idea to add the magento functional testing framework at this stage
Seeing that there is no stability in the testing framework I still believe it's a bad idea to pin installations of Magento 2.3.1 users to "2.3.x of the testing framework" |
I have merged the latest 2.3-develop to keep this PR up-to-date but I have a sneaky suspicion it's going to be too late for 2.3.1. In which case the boat has sailed and there is no further point in this particular PR. The discussion on how to handle this better in the future would remain. |
2.3.1 dropped so it's too late |
Hi @fooman, thank you for your contribution! |
Cross posting here as an example of impact on upgrading 2.3.0 to 2.3.1 https://magento.stackexchange.com/a/272883/9 |
This seems to be a real root cause. How is packages set different between Composer-based and not Composer-based versions? |
@orlangur: remember those core bundled extensions (Klarna, Vertex, Amazon, Dotmailer, ...)? These aren't included in the github repo for example. But they get included using the Here's what that package looks like (from a Magento 2.3.1 installation using composer): {
"name": "magento/product-community-edition",
"version": "2.3.1",
"dist": {
"type": "zip",
"url": "https://repo.magento.com/archives/magento/product-community-edition/magento-product-community-edition-2.3.1.0.zip",
"shasum": "885fe249e465ad491446670ce2fb10de1d1a572e"
},
"require": {
"amzn/amazon-pay-and-login-magento-2-module": "3.1.4",
"braintree/braintree_php": "3.35.0",
"colinmollenhour/cache-backend-file": "~1.4.1",
"colinmollenhour/cache-backend-redis": "1.10.6",
"colinmollenhour/credis": "1.10.0",
"colinmollenhour/php-redis-session-abstract": "~1.4.0",
"composer/composer": "^1.6",
"dotmailer/dotmailer-magento2-extension": "3.1.1",
"elasticsearch/elasticsearch": "~2.0|~5.1|~6.1",
"ext-bcmath": "*",
"ext-ctype": "*",
"ext-curl": "*",
"ext-dom": "*",
"ext-gd": "*",
"ext-hash": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-pdo_mysql": "*",
"ext-simplexml": "*",
"ext-soap": "*",
"ext-spl": "*",
"ext-xsl": "*",
"ext-zip": "*",
"klarna/m2-payments": "7.1.0",
"lib-libxml": "*",
"magento/composer": "~1.4.0",
"magento/framework": "102.0.1",
"magento/framework-amqp": "100.3.1",
"magento/framework-bulk": "100.3.1",
"magento/framework-message-queue": "100.3.1",
"magento/inventory-composer-metapackage": "1.1.1",
"magento/language-de_de": "100.3.1",
"magento/language-en_us": "100.3.1",
"magento/language-es_es": "100.3.1",
"magento/language-fr_fr": "100.3.1",
"magento/language-nl_nl": "100.3.1",
"magento/language-pt_br": "100.3.1",
"magento/language-zh_hans_cn": "100.3.1",
"magento/magento-composer-installer": ">=0.1.11",
"magento/magento2-base": "2.3.1",
"magento/module-admin-notification": "100.3.1",
"magento/module-advanced-pricing-import-export": "100.3.1",
"magento/module-advanced-search": "100.3.1",
"magento/module-amqp": "100.3.1",
"magento/module-analytics": "100.3.1",
"magento/module-asynchronous-operations": "100.3.1",
"magento/module-authorization": "100.3.1",
"magento/module-authorizenet": "100.3.1",
"magento/module-authorizenet-acceptjs": "100.3.0",
"magento/module-backend": "101.0.1",
"magento/module-backup": "100.3.1",
"magento/module-braintree": "100.3.1",
"magento/module-bundle": "100.3.1",
"magento/module-bundle-graph-ql": "100.3.1",
"magento/module-bundle-import-export": "100.3.1",
"magento/module-cache-invalidate": "100.3.1",
"magento/module-captcha": "100.3.1",
"magento/module-catalog": "103.0.1",
"magento/module-catalog-analytics": "100.3.1",
"magento/module-catalog-graph-ql": "100.3.1",
"magento/module-catalog-import-export": "101.0.1",
"magento/module-catalog-inventory": "100.3.1",
"magento/module-catalog-inventory-graph-ql": "100.3.1",
"magento/module-catalog-rule": "101.1.1",
"magento/module-catalog-rule-configurable": "100.3.1",
"magento/module-catalog-search": "101.0.1",
"magento/module-catalog-url-rewrite": "100.3.1",
"magento/module-catalog-url-rewrite-graph-ql": "100.3.1",
"magento/module-catalog-widget": "100.3.1",
"magento/module-checkout": "100.3.1",
"magento/module-checkout-agreements": "100.3.1",
"magento/module-cms": "103.0.1",
"magento/module-cms-graph-ql": "100.3.1",
"magento/module-cms-url-rewrite": "100.3.1",
"magento/module-cms-url-rewrite-graph-ql": "100.3.1",
"magento/module-config": "101.1.1",
"magento/module-configurable-import-export": "100.3.1",
"magento/module-configurable-product": "100.3.1",
"magento/module-configurable-product-graph-ql": "100.3.1",
"magento/module-configurable-product-sales": "100.3.1",
"magento/module-contact": "100.3.1",
"magento/module-cookie": "100.3.1",
"magento/module-cron": "100.3.1",
"magento/module-currency-symbol": "100.3.1",
"magento/module-customer": "102.0.1",
"magento/module-customer-analytics": "100.3.1",
"magento/module-customer-graph-ql": "100.3.1",
"magento/module-customer-import-export": "100.3.1",
"magento/module-deploy": "100.3.1",
"magento/module-developer": "100.3.1",
"magento/module-dhl": "100.3.1",
"magento/module-directory": "100.3.1",
"magento/module-directory-graph-ql": "100.3.0",
"magento/module-downloadable": "100.3.1",
"magento/module-downloadable-graph-ql": "100.3.1",
"magento/module-downloadable-import-export": "100.3.1",
"magento/module-eav": "102.0.1",
"magento/module-eav-graph-ql": "100.3.1",
"magento/module-elasticsearch": "100.3.1",
"magento/module-elasticsearch-6": "100.3.0",
"magento/module-email": "101.0.1",
"magento/module-encryption-key": "100.3.1",
"magento/module-fedex": "100.3.1",
"magento/module-gift-message": "100.3.1",
"magento/module-google-adwords": "100.3.1",
"magento/module-google-analytics": "100.3.1",
"magento/module-google-optimizer": "100.3.1",
"magento/module-graph-ql": "100.3.1",
"magento/module-grouped-catalog-inventory": "100.3.0",
"magento/module-grouped-import-export": "100.3.1",
"magento/module-grouped-product": "100.3.1",
"magento/module-grouped-product-graph-ql": "100.3.1",
"magento/module-import-export": "100.3.1",
"magento/module-indexer": "100.3.1",
"magento/module-instant-purchase": "100.3.1",
"magento/module-integration": "100.3.1",
"magento/module-layered-navigation": "100.3.1",
"magento/module-marketplace": "100.3.1",
"magento/module-media-storage": "100.3.1",
"magento/module-message-queue": "100.3.1",
"magento/module-msrp": "100.3.1",
"magento/module-msrp-configurable-product": "100.3.0",
"magento/module-msrp-grouped-product": "100.3.0",
"magento/module-multishipping": "100.3.1",
"magento/module-mysql-mq": "100.3.1",
"magento/module-new-relic-reporting": "100.3.1",
"magento/module-newsletter": "100.3.1",
"magento/module-offline-payments": "100.3.1",
"magento/module-offline-shipping": "100.3.1",
"magento/module-page-cache": "100.3.1",
"magento/module-payment": "100.3.1",
"magento/module-paypal": "100.3.1",
"magento/module-persistent": "100.3.1",
"magento/module-product-alert": "100.3.1",
"magento/module-product-video": "100.3.1",
"magento/module-quote": "101.1.1",
"magento/module-quote-analytics": "100.3.1",
"magento/module-quote-graph-ql": "100.3.1",
"magento/module-release-notification": "100.3.1",
"magento/module-reports": "100.3.1",
"magento/module-require-js": "100.3.1",
"magento/module-review": "100.3.1",
"magento/module-review-analytics": "100.3.1",
"magento/module-robots": "101.0.1",
"magento/module-rss": "100.3.1",
"magento/module-rule": "100.3.1",
"magento/module-sales": "102.0.1",
"magento/module-sales-analytics": "100.3.1",
"magento/module-sales-graph-ql": "100.3.0",
"magento/module-sales-inventory": "100.3.1",
"magento/module-sales-rule": "101.1.1",
"magento/module-sales-sequence": "100.3.1",
"magento/module-sample-data": "100.3.1",
"magento/module-search": "101.0.1",
"magento/module-security": "100.3.1",
"magento/module-send-friend": "100.3.1",
"magento/module-send-friend-graph-ql": "100.3.0",
"magento/module-shipping": "100.3.1",
"magento/module-signifyd": "100.3.1",
"magento/module-sitemap": "100.3.1",
"magento/module-store": "101.0.1",
"magento/module-store-graph-ql": "100.3.1",
"magento/module-swagger": "100.3.1",
"magento/module-swagger-webapi": "100.3.1",
"magento/module-swagger-webapi-async": "100.3.1",
"magento/module-swatches": "100.3.1",
"magento/module-swatches-graph-ql": "100.3.1",
"magento/module-swatches-layered-navigation": "100.3.1",
"magento/module-tax": "100.3.1",
"magento/module-tax-graph-ql": "100.3.1",
"magento/module-tax-import-export": "100.3.1",
"magento/module-theme": "101.0.1",
"magento/module-theme-graph-ql": "100.3.0",
"magento/module-tinymce-3": "100.3.1",
"magento/module-translation": "100.3.1",
"magento/module-ui": "101.1.1",
"magento/module-ups": "100.3.1",
"magento/module-url-rewrite": "101.1.1",
"magento/module-url-rewrite-graph-ql": "100.3.1",
"magento/module-user": "101.1.1",
"magento/module-usps": "100.3.1",
"magento/module-variable": "100.3.1",
"magento/module-vault": "101.1.1",
"magento/module-version": "100.3.1",
"magento/module-webapi": "100.3.1",
"magento/module-webapi-async": "100.3.1",
"magento/module-webapi-security": "100.3.1",
"magento/module-weee": "100.3.1",
"magento/module-weee-graph-ql": "100.3.1",
"magento/module-widget": "101.1.1",
"magento/module-wishlist": "101.1.1",
"magento/module-wishlist-analytics": "100.3.1",
"magento/module-wishlist-graph-ql": "100.3.0",
"magento/theme-adminhtml-backend": "100.3.1",
"magento/theme-frontend-blank": "100.3.1",
"magento/theme-frontend-luma": "100.3.1",
"magento/zendframework1": "~1.14.1",
"monolog/monolog": "^1.17",
"msp/recaptcha": "2.0.2",
"msp/twofactorauth": "3.0.0",
"oyejorge/less.php": "~1.7.0",
"paragonie/sodium_compat": "^1.6",
"pelago/emogrifier": "^2.0.0",
"php": "~7.1.3||~7.2.0",
"php-amqplib/php-amqplib": "~2.7.0",
"phpseclib/mcrypt_compat": "1.0.8",
"phpseclib/phpseclib": "2.0.*",
"ramsey/uuid": "~3.8.0",
"symfony/console": "~4.1.0",
"symfony/event-dispatcher": "~4.1.0",
"symfony/process": "~4.1.0",
"tedivm/jshrink": "~1.3.0",
"temando/module-shipping-m2": "1.5.1",
"tubalmartin/cssmin": "4.1.1",
"vertex/product-magento-module": "3.1.0",
"webonyx/graphql-php": "^0.12.6",
"zendframework/zend-captcha": "^2.7.1",
"zendframework/zend-code": "~3.3.0",
"zendframework/zend-config": "^2.6.0",
"zendframework/zend-console": "^2.6.0",
"zendframework/zend-crypt": "^2.6.0",
"zendframework/zend-db": "^2.8.2",
"zendframework/zend-di": "^2.6.1",
"zendframework/zend-eventmanager": "^2.6.3",
"zendframework/zend-feed": "^2.9.0",
"zendframework/zend-form": "^2.10.0",
"zendframework/zend-http": "^2.6.0",
"zendframework/zend-i18n": "^2.7.3",
"zendframework/zend-json": "^2.6.1",
"zendframework/zend-log": "^2.9.1",
"zendframework/zend-mail": "^2.9.0",
"zendframework/zend-modulemanager": "^2.7",
"zendframework/zend-mvc": "~2.7.0",
"zendframework/zend-serializer": "^2.7.2",
"zendframework/zend-server": "^2.6.1",
"zendframework/zend-servicemanager": "^2.7.8",
"zendframework/zend-session": "^2.7.3",
"zendframework/zend-soap": "^2.7.0",
"zendframework/zend-stdlib": "^2.7.7",
"zendframework/zend-text": "^2.6.0",
"zendframework/zend-uri": "^2.5.1",
"zendframework/zend-validator": "^2.6.0",
"zendframework/zend-view": "~2.10.0"
},
"type": "metapackage",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"description": "eCommerce Platform for Growth (Community Edition)"
} Btw: I'm in favor of removing all |
What's the problem in removing, let's say, MFTF package if it is nonworking / not needed? This seems to be the same problem again: no builds are run for Composer-based Magento installation prior to release. Cc: @sidolov |
Description (*)
To avoid future upgrade issues like the 2.2.x to 2.3.0 upgrade we should aim to keep the project composer.json file as small as possible. See https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html
A better place for it would likely be the composer.json of
magento/magento2-base
.Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)