community-features icon indicating copy to clipboard operation
community-features copied to clipboard

Remove braintree/braintree_php from magento/magento2-base

Open andparsons opened this issue 6 years ago • 16 comments

Summary (*)

braintree/braintree_php is required in magento/magento2-base when the only module that relies on that dependancy is magento/module-braintree, which also has braintree/braintree_php as a dependancy

I am not composer requiring magento/product-community-edition but instead magento/magento2-base with a subset of Magento modules, which I believe is a better practice than using composer's replace property to remove unused dependancies.

I don't want braintree/braintree_php to be installed as none of the modules I'm using make use of it.

Examples (*)

N/A

Proposed solution

I am suggesting removing braintree/braintree_php from magento/magento2-base, but not from magento/product-community-edition or magento/product-enterprise-edition

This should allow for braintree/braintree_php to only be installed via composer if magento/module-braintree is part of the resolved dependancies, and will keep braintree/braintree_php in the root composer.json if composer requiring magento/product-*-edition or cloning from git.

Other dependancies like msp/recaptcha have the ideal setup, where they get removed from magento/magento2-base when the composer.json package is created.

I don't believe I can create a pull request for this from the public GitHub repo.

andparsons avatar Oct 21 '19 11:10 andparsons

Hi @andparsons. Thank you for your report. To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@andparsons do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

m2-assistant[bot] avatar Oct 21 '19 11:10 m2-assistant[bot]

Hi @andparsons. Thank you for your report. To help us process this issue please make sure that you provided the following information:

  • [x] Summary of the issue
  • [x] Information on your environment
  • [x] Steps to reproduce
  • [x] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@andparsons do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

I confirm that I am able to reproduce the issue on vanilla Magento. It's just composer bundle changes after all.

andparsons avatar Oct 22 '19 09:10 andparsons

Hi @andparsons. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team avatar Oct 22 '19 09:10 magento-engcom-team

Hi @andparsons, here is your Magento instance. Admin access: https://i-25189-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

magento-engcom-team avatar Oct 22 '19 09:10 magento-engcom-team

Hi @andparsons, here is your Magento instance. Admin access: https://i-25189-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

Not needed for this type of issue but that was nice and quick.

andparsons avatar Oct 22 '19 10:10 andparsons

Hi @BrentRobert. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [x] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!


m2-assistant[bot] avatar Oct 22 '19 14:10 m2-assistant[bot]

Hi @andparsons, I created a pull request as I agree with your proposal.

BrentRobert avatar Oct 22 '19 14:10 BrentRobert

@andparsons and @BrentRobert, please, don't forget that Magento can be installed from the Git, how in this case Braintree SDK will be loaded if you remove it from the root composer json?

YevSent avatar Oct 22 '19 18:10 YevSent

I kinda forgot about that, my bad

BrentRobert avatar Oct 22 '19 18:10 BrentRobert

@joni-jones and @BrentRobert, thanks for your input guys, but as I said this is a change needed when bundling for magento/magento2-base, which I believe the process for that is not public.

Hopefully someone from the core team is still going to look at this issue.

andparsons avatar Oct 23 '19 11:10 andparsons

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

m2-assistant[bot] avatar Oct 28 '19 08:10 m2-assistant[bot]

There is definitely no possibility to make pull request for this from the public GitHub repo. Marked as Feature Request cc @sdzhepa

engcom-Delta avatar Oct 28 '19 08:10 engcom-Delta

@sdzhepa: can we somehow open up the script/repo to the public for the magento2-base package and/or composer metapackage? There are a bunch of tiny little tweaks the community wants to accomplish (https://github.com/magento/magento2/issues/22359 comes to mind and there are some others I think). These aren't very high priority. But if the community can not help out, it will probably never happen if only the core team will pick it up when they feel like it. Thanks!

hostep avatar Oct 28 '19 09:10 hostep

Hello @hostep

Unfortunately, after so long delay and multiple times raising this question internally, I did not receive a clear answer for

"can we somehow open up the script/repo to the public for the magento2-base package and/or composer metapackage?".

In general, as I understood there are a couple of difficulties and policies that do not allow us to do it.

I will move this ticket into the community-feature repository to be considering one more time there

sdzhepa avatar Feb 25 '20 02:02 sdzhepa

Thanks for trying to pursue this @sdzhepa!

hostep avatar Feb 25 '20 08:02 hostep

Seems like it has been handled in https://github.com/magento/magento2/commit/7400615 :+1:

nj avatar Jan 28 '21 01:01 nj