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

API changes in Magento 2.5 #473

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

API changes in Magento 2.5 #473

wants to merge 6 commits into from

Conversation

paliarush
Copy link
Contributor

@paliarush paliarush commented Dec 21, 2020

AC:
Compile a list of classes/interfaces that should be marked as @api in 2.5. The main goal is to reduce "grey area" when community cannot avoid using classes/interfaces that are not officially marked as @api

See https://github.com/magento-commerce/development-guild/issues/47

PR Scope:

  • Compiled a list of interfaces that need to be marked as @api, removed or deprecated in 2.5
  • Described auto-generated code that needs to be marked as @api in 2.5
  • Added sections about exceptions and extension attribute classes
  • Compiled a list of factories that need to be marked as @api in 2.5
  • Analyzed non-API usages by extensions on Marketplace and proposed to "legalize" most of the top ones by marking them as @api
  • Compiled a list of blocks that need to be marked as @api

- Compiled a list of interfaces that need to be marked as @api, removed or deprecated in 2.5
@paliarush paliarush changed the title Introduce HLD for missing API declaration #47 API changes in Magento 2.5 Dec 22, 2020
- Described auto-generated code that needs to be marked as @api in 2.5
- Added sections about exceptions and extension attribute classes
- Compiled a list of factories that need to be marked as @api in 2.5
@navarr
Copy link
Member

navarr commented Jan 4, 2021

I would like to see CartItemOptionsProcessor in the API. PR and reasoning here: magento/magento2#30819

@hostep
Copy link
Contributor

hostep commented Jan 12, 2021

Maybe Sales Pdf Models could be considered as well to avoid BiC problems (like what happened in 2.3.6): magento/magento2#30684 & magento/devdocs#8299 & distrimedia/magento2-distrimedia-connector#1

- Compiled a list of classes/interfaces that need to be marked as @api or deprecated in 2.5 based on Marketplace extension usage
- Compiled a list of Blocks that need to be marked as @api in 2.5 (credit to Andrii Kasian)
- Requests from Magento community members for additional @api in 2.5
@paliarush
Copy link
Contributor Author

@hostep, please provide the exact list of classes that should be marked as @api to prevent future issues with backward compatibility of PDF generation.

@sivaschenko
Copy link
Member

sivaschenko commented Feb 9, 2021

Tasks

Just marking interfaces as API

Core modules:
magento/magento2#32011
magento/magento2#32013
magento/magento2#32014
magento/magento2#32015
magento/magento2#32017
magento/magento2#32018
magento/magento2#32020
magento/magento2#32021
magento/magento2#32022
magento/magento2#32023

Framework:
magento/magento2#32024
magento/magento2#32025
magento/magento2#32026
magento/magento2#32027
magento/magento2#32028
magento/magento2#32029
magento/magento2#32030
magento/magento2#32031
magento/magento2#32032
magento/magento2#32033
magento/magento2#32034
magento/magento2#32035
magento/magento2#32036

Extensions:
magento/adobe-ims#9
magento/adobe-stock-integration#1858
https://github.com/magento/inventory/issues/3273
magento/magento2-page-builder#732
https://github.com/magento/partners-magento2b2b/issues/544
https://github.com/magento/partners-magento2ee/issues/477
magento/security-package#290

Marking interfaces as API and additional changes

magento/magento2#32037
magento/magento2#32038
https://github.com/magento/partners-magento2b2b/issues/545
https://github.com/magento/partners-magento2ee/issues/478
magento/magento2#32039

Deprecation/updates in 2.4

magento/magento2#32040
https://github.com/magento/partners-magento2b2b/issues/546
magento/magento2#32060
magento/magento2#32063

Factories

https://github.com/magento/partners-magento2ee/issues/479
magento/magento2#32041

Blocks

magento/magento2#32043
magento/magento2#32044
magento/magento2#32045
magento/magento2#32046
magento/magento2#32047
magento/magento2#32048
magento/magento2#32049
magento/magento2#32050
magento/magento2#32051
magento/magento2-page-builder#733
https://github.com/magento/partners-magento2ee/issues/480
https://github.com/magento/partners-magento2b2b/issues/547
https://github.com/magento/partners-magento2ee/issues/481
https://github.com/magento/partners-magento2ee/issues/482
https://github.com/magento/partners-magento2b2b/issues/548
https://github.com/magento/partners-magento2ee/issues/483
magento/magento2#32052
https://github.com/magento/partners-magento2b2b/issues/549
https://github.com/magento/partners-magento2b2b/issues/550
https://github.com/magento/partners-magento2ee/issues/484
magento/magento2#32053

API candidates based on Marketplace extensions usage analysis

magento/magento2#32054
magento/magento2#32055
magento/magento2#32056
magento/magento2#32057
magento/magento2#32058
magento/magento2#32059

Removal of deprecated classes/interfaces

magento/magento2#32061
magento/magento2#32062
https://github.com/magento/partners-magento2ee/issues/485
magento/magento2#32064

Removal of extension attribute classes/interfaces

magento/magento2#32089
https://github.com/magento/partners-magento2b2b/issues/551
magento/magento2-page-builder#734

1. Magento\Support\Block\Adminhtml\Report\View\Tabs
1. Magento\Support\Block\Adminhtml\Backup\Log
1. Fastly\Cdn\Block\System\Config\Form\Modal\UploadVcl
1. Fastly\Cdn\Block\Cache\Additional
Copy link
Member

Choose a reason for hiding this comment

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

I believe Fastly\Cdn is not a VBE, is that extension added by mistake or we can influence it's vendor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it was added by mistake. @kandy pleas confirm

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, it's 3party extension, bundled with cloud meta package


# Blocks to be marked as API

1. Magento\Catalog\Block\Navigation
Copy link
Member

@sivaschenko sivaschenko Feb 11, 2021

Choose a reason for hiding this comment

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

Most of these blocks are already marked as API (long time ago)

@paliarush can you please recheck the list

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kandy could you please re-check the script used for collecting the list of blocks?

@thomas-kl1
Copy link
Member

That's really sad to deprecate the entityManager, it actually works great, and I've seen some project/modules using it. It provides good extensibility and allows to perform action over CRUD operation. FYI the current AbstractModel and resourceModel does not allow such extensibility for after/before create/update/delete/read operations, and the versionControlResource only allows after save operation.. With deprecated entityManager we will have to use plugins which are not SOLID and does not provide clean view of architecture/dependencies

@navarr
Copy link
Member

navarr commented May 4, 2021

Anything that Magento Coding Standard points towards as an alternative for a discouraged function should be API annotated.

The first one that comes to mind is Magento\Framework\Filesystem\Io\File

That list is here: https://github.com/magento/magento-coding-standard/blob/887ecba8edaff155951094051822995cff3bca1c/Magento2/Sniffs/Functions/DiscouragedFunctionSniff.php#L34-L231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants