Skip to content

Deleted lib/internal/Magento/Framework/Filesystem/ExtendedDriverInterface.php. getMetadata() method moved to DataInterface #32531

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

Open
wants to merge 5 commits into
base: 2.5-develop
Choose a base branch
from

Conversation

vlmed
Copy link
Contributor

@vlmed vlmed commented Mar 17, 2021

Description (*)

What done:

  • lib/internal/Magento/Framework/Filesystem/ExtendedDriverInterface.php - deleted
  • getMetadata() method was moved to lib/internal/Magento/Framework/Filesystem/DriverInterface.php
  • getMetadata() was implemented in the lib/internal/Magento/Framework/Filesystem/Driver/File.php. To avoid code duplication I use lib/internal/Magento/Framework/Filesystem/Driver/File/Mime.php to get file mime type. I can't instantiate this class using ObjectManager because when lib/internal/Magento/Framework/Filesystem/Driver/File.php instantiating first time the ObjectManager isn't instantiated yet (lib/internal/Magento/Framework/Console/Cli.php::assertCompilerPreparation(). So, I decided to implements static method getMimeInstance() in the lib/internal/Magento/Framework/Filesystem/Driver/File/Mime.php and use it in the lib/internal/Magento/Framework/Filesystem/Driver/File.php to get an instance instead of create object directly using construction new Mime().
  • getMetadata() was implemented in thelib/internal/Magento/Framework/Filesystem/Driver/StatefulFile.php. This class is deprecated so I used method implementation from the lib/internal/Magento/Framework/Filesystem/Driver/File.php.
  • test was implemented on the getMetadata() method in the lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
  • test was implemented on the getMimeInstance() method in the lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/File/MimeTest.php

Fixed Issues (if relevant)

  1. Fixes Remove deprecated framework interfaces #32331

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Mar 17, 2021

Hi @vlmed. Thank you for your contribution
Here are some useful tips 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.5-develop instance - deploy vanilla Magento instance

❗ 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

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Mar 17, 2021
@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Mar 17, 2021
@vlmed
Copy link
Contributor Author

vlmed commented Mar 17, 2021

@magento run all tests

@vlmed vlmed force-pushed the remove_deprecated-framework_interface branch from 6725acb to c01d25d Compare March 18, 2021 12:25
@vlmed
Copy link
Contributor Author

vlmed commented Mar 18, 2021

@magento run Unit Tests

@vlmed
Copy link
Contributor Author

vlmed commented Mar 18, 2021

@magento run all tests

@vlmed
Copy link
Contributor Author

vlmed commented Mar 19, 2021

@magento run Integration Tests

1 similar comment
@eduard13
Copy link
Contributor

@magento run Integration Tests

@eduard13
Copy link
Contributor

@magento run Integration Tests, Functional Tests EE, Functional Tests CE, Functional Tests B2B

@vlmed
Copy link
Contributor Author

vlmed commented Mar 23, 2021

@magento give me test instance

@magento-deployment-service
Copy link

Hi @vlmed. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@eduard13
Copy link
Contributor

@magento run Functional Tests EE, Functional Tests CE, Functional Tests B2B

@eduard13
Copy link
Contributor

@magento run Functional Tests EE, Functional Tests CE, Functional Tests B2B

Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @vlmed, could you please review the functional failed builds, looks like they are related to your changes.
We're getting this on customer account create, when using some remote file storage
image

Thank you.

@eduard13
Copy link
Contributor

eduard13 commented Mar 30, 2021

Hi @gabrieldagama, could you please help us with the logs here, so we could understand what is going wrong?

Thank you.

@gabrieldagama
Copy link
Contributor

@eduard13 couldn't find a clear exception being thrown here, probably the best way to find out what is going on is to try to reproduce the MFTF manually and identify the difference. Probably we can use the `give me test instance for such test.

@vlmed
Copy link
Contributor Author

vlmed commented Mar 30, 2021

@magento run all tests

@vlmed
Copy link
Contributor Author

vlmed commented Mar 30, 2021

@magento run Integration Tests

@vlmed vlmed force-pushed the remove_deprecated-framework_interface branch from 6c994b7 to 6045497 Compare March 31, 2021 08:41
@vlmed
Copy link
Contributor Author

vlmed commented Mar 31, 2021

@magento run Integration Tests, Unit Tests

@vlmed
Copy link
Contributor Author

vlmed commented Mar 31, 2021

@magento run all tests

@vlmed vlmed force-pushed the remove_deprecated-framework_interface branch from abe9728 to fb5bf40 Compare April 2, 2021 14:02
@vlmed
Copy link
Contributor Author

vlmed commented Apr 2, 2021

@magento run all tests

@vlmed vlmed force-pushed the remove_deprecated-framework_interface branch from fb5bf40 to 4efcb13 Compare April 2, 2021 14:08
@vlmed
Copy link
Contributor Author

vlmed commented Apr 2, 2021

@magento run all tests

@vlmed
Copy link
Contributor Author

vlmed commented Apr 5, 2021

@magento run all tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: needs update Project: API Changes Release Line: 2.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants