Skip to content
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

Mark Factories classes as API #32080

Conversation

vlmed
Copy link
Contributor

@vlmed vlmed commented Feb 10, 2021

Description (*)

The following factories marked as AP:

  1. app/code/Magento/Catalog/Block/Product/ImageFactory.php
  2. app/code/Magento/Catalog/Model/Product/Type/Price/Factory.php
  3. app/code/Magento/Config/Block/System/Config/Form/Field/Factory.php
  4. app/code/Magento/Config/Block/System/Config/Form/Fieldset/Factory.php
  5. app/code/Magento/Customer/Model/Metadata/FormFactory.php
  6. app/code/Magento/ImportExport/Model/Export/Factory.php
  7. app/code/Magento/Quote/Model/Quote/Address/RateCollectorInterfaceFactory.php
  8. app/code/Magento/Quote/Model/Quote/Address/TotalFactory.php
  9. app/code/Magento/Sales/Model/Order/CreditmemoFactory.php
  10. app/code/Magento/Sales/Model/ResourceModel/Order/Collection/Factory.php
  11. app/code/Magento/Ui/Component/Form/Fieldset/Factory.php
  12. lib/internal/Magento/Framework/Acl/AclResourceFactory.php
  13. lib/internal/Magento/Framework/AclFactory.php
  14. lib/internal/Magento/Framework/Amqp/ConfigFactory.php
  15. lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinDataInterfaceFactory.php
  16. lib/internal/Magento/Framework/Api/Search/DocumentFactory.php
  17. lib/internal/Magento/Framework/Api/Search/SearchCriteriaFactory.php
  18. lib/internal/Magento/Framework/App/Config/ValueFactory.php
  19. lib/internal/Magento/Framework/Config/Data/ConfigDataFactory.php
  20. lib/internal/Magento/Framework/Config/ViewFactory.php
  21. lib/internal/Magento/Framework/Controller/Result/JsonFactory.php
  22. lib/internal/Magento/Framework/DB/Adapter/Pdo/MysqlFactory.php
  23. lib/internal/Magento/Framework/DB/Ddl/TriggerFactory.php
  24. lib/internal/Magento/Framework/Data/FormFactory.php
  25. lib/internal/Magento/Framework/Data/Tree/NodeFactory.php
  26. lib/internal/Magento/Framework/Data/TreeFactory.php
  27. lib/internal/Magento/Framework/DataObject/Factory.php
  28. lib/internal/Magento/Framework/Event/ObserverFactory.php
  29. lib/internal/Magento/Framework/EventFactory.php
  30. lib/internal/Magento/Framework/File/UploaderFactory.php
  31. lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php
  32. lib/internal/Magento/Framework/Mail/TransportInterfaceFactory.php
  33. lib/internal/Magento/Framework/Message/CollectionFactory.php
  34. lib/internal/Magento/Framework/Module/Setup/MigrationFactory.php
  35. lib/internal/Magento/Framework/Setup/Declaration/Schema/Diff/DiffFactory.php
  36. lib/internal/Magento/Framework/ValidatorFactory.php
  37. lib/internal/Magento/Framework/View/Asset/File/FallbackContextFactory.php
  38. lib/internal/Magento/Framework/View/Asset/FileFactory.php
  39. lib/internal/Magento/Framework/View/Layout/Generator/ContextFactory.php
  40. lib/internal/Magento/Framework/View/Layout/Reader/ContextFactory.php
  41. lib/internal/Magento/Framework/View/Page/ConfigFactory.php

Marked as API to fix static test
42. lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinData.php
43. lib/internal/Magento/Framework/DB/LoggerInterface.php

Dependent Pull Requests

#32156

Fixed Issues (if relevant)

  1. Fixes Factories for API classes/interfaces should be marked as API #32041

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 Feb 10, 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 Feb 10, 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 Feb 10, 2021
@vlmed vlmed changed the title Mark interfaces and classes as api factories Mark Factories classes as API Feb 10, 2021
@coderimus coderimus self-assigned this Feb 10, 2021
Copy link
Contributor

@coderimus coderimus left a comment

Choose a reason for hiding this comment

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

@vlmed thank you for the adjustments. There is one point explained to me: the @SInCE will be set automatically during the merge. So, please, remove it :)

@vlmed vlmed force-pushed the mark_interfaces_and_clases_as_api_factories branch from 5c82f2d to 8d8e3a4 Compare February 11, 2021 08:50
@vlmed
Copy link
Contributor Author

vlmed commented Feb 11, 2021

@coderimus Thanks for the explanation. @since sections removed

@coderimus coderimus added the Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests label Feb 12, 2021
@coderimus coderimus added this to the 2.5 milestone Feb 12, 2021
Copy link
Contributor

@coderimus coderimus left a comment

Choose a reason for hiding this comment

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

Thank you @vlmed for the adjustments. Approve 👍

@magento-engcom-team
Copy link
Contributor

Hi @coderimus, thank you for the review.
ENGCOM-8759 has been created to process this Pull Request

@coderimus coderimus added Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests and removed Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Feb 17, 2021
@vlmed
Copy link
Contributor Author

vlmed commented Feb 24, 2021

@magento run Static Tests

@vlmed
Copy link
Contributor Author

vlmed commented Feb 24, 2021

@magento run Static Tests

@vlmed
Copy link
Contributor Author

vlmed commented Feb 24, 2021

Hi @sivaschenko. To fix static tests, I also need to mark it as Api lib/internal/Magento/Framework/DB/LoggerInterface.php.
But this interface is marked as API in #32156.
What to do in this case?

@mrtuvn
Copy link
Contributor

mrtuvn commented Feb 24, 2021

I'm not sure but i got same case as your experiences. One maintainer tell me need to update PR related in description section
But results still fails

@vlmed
Copy link
Contributor Author

vlmed commented Feb 24, 2021

@magento run Static Tests

@vlmed
Copy link
Contributor Author

vlmed commented Feb 24, 2021

@magento run Static Tests

@vlmed
Copy link
Contributor Author

vlmed commented Feb 24, 2021

@magento run all tests

@gabrieldagama
Copy link
Contributor

Closed in favour of #32661

@m2-assistant
Copy link

m2-assistant bot commented Apr 6, 2021

Hi @vlmed, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

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 Component: multiple 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. Release Line: 2.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants