magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Add FTP to composer.json

Open rafaelstz opened this issue 1 year ago • 4 comments

Description (*)

PHP 8.2.15 removed the FTP extension, so I created this PR to add it as part of the dependencies.

Related Pull Requests

  1. https://github.com/magento/magento-cloud-docker/pull/367

Fixed Issues (if relevant)

  1. Fixes magento/magento2#39083

Manual testing scenarios (*)

  1. Try to use CSV import via FTP on PHP 8.2.15 or greater

Contribution checklist (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [ ] All new or changed code is covered with unit/integration tests (if applicable)
  • [ ] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [ ] All automated tests passed successfully (all builds are green)

rafaelstz avatar Aug 21 '24 18:08 rafaelstz

Hi @rafaelstz. Thank you for your contribution! Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

:exclamation: Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s) For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here :information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.

m2-assistant[bot] avatar Aug 21 '24 18:08 m2-assistant[bot]

@rafaelstz where is this funtionality is used?

ihor-sviziev avatar Aug 22 '24 16:08 ihor-sviziev

@ihor-sviziev, only in 2 classes as far as I can see:

  • https://github.com/magento/magento2/blob/2.4.7-p2/lib/internal/Magento/Framework/System/Ftp.php
  • https://github.com/magento/magento2/blob/2.4.7-p2/lib/internal/Magento/Framework/Filesystem/Io/Ftp.php

So yeah, it's indeed missing in the dependency declaration of the framework and the global composer.json files. So @rafaelstz, you should add it as well in this file: https://github.com/magento/magento2/blob/2.4.7-p2/lib/internal/Magento/Framework/composer.json

(the statement PHP 8.2.15 removed FTP extension however makes not much sense, it's not being mentioned in https://www.php.net/ChangeLog-8.php#8.2.15, it's probably the vendor from where you get php that removed it, which might be different depending on operating system and package supplier, anyway, it doesn't make the issue invalid update: it seems like it got removed from the docker image indeed)

hostep avatar Aug 22 '24 18:08 hostep

@ihor-sviziev @hostep Ext added to the /lib/internal/Magento/Framework/composer.json

rafaelstz avatar Aug 24 '24 17:08 rafaelstz

Hello,

Internal team has started to work on it

Thanks.

engcom-Bravo avatar Sep 12 '24 10:09 engcom-Bravo

As per this moving this to On Hold until further updates.

engcom-Charlie avatar Sep 13 '24 11:09 engcom-Charlie

@engcom-Charlie, @glo60612, it was merged and then reverted again, so it didn't made it in the codebase, is there an explanation for this?

hostep avatar Oct 19 '24 09:10 hostep

@hostep Thanks for your Contribution!!!.

Hi @rafaelstz

There are no changes to composer.lock, it should be updated. We excluded these changes because we need to evaluate if the new dependency that you are adding to the env is really needed. Also, please add test scenario for this issue, currently it's not clear what use cases has a bug.

Thank you!

engcom-Bravo avatar Oct 29 '24 06:10 engcom-Bravo

Hi @rafaelstz,

Thank you for your contribution!

The Magento core engineering team is working on the issue which you have addressed in this PR. There are no changes to composer.lock, it should be updated. We excluded these changes from previous PR because we need to evaluate if the new dependency that you are adding to the env is really needed. Team will cherry pick the commits from your PR and may do further implementation to cover few more scenarios as needed. We will reach out to you if we need more information. For now, you can pause work on this PR.

Thank you once again!

engcom-Bravo avatar Dec 16 '24 03:12 engcom-Bravo

Hello,

As I can see this issue got fixed in the scope of the internal Jira ticket AC-12857 by the internal team Related commits: https://github.com/search?q=repo%3Amagento%2Fmagento2+AC-12857-v2.0&type=commits

Based on the Jira ticket, the target version is 2.4.8-beta2.

Thanks

engcom-Bravo avatar Dec 26 '24 05:12 engcom-Bravo