magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.45k stars 9.29k forks source link

Add PHP 8.1 Intersection Types Support for tests in the codebase #34933

Open karyna-tsymbal-atwix opened 2 years ago

karyna-tsymbal-atwix commented 2 years ago

In PHP 8.1, new Intersection types feature was introduced. (see details https://wiki.php.net/rfc/pure-intersection-types)

In the scope of this ticket, we need to add Intersection Types support for the places where we're using an information about parameter/return type class - for Tests:

Expected result (*)

Magento should not break when Intersection types are used. Tests should properly check all dependencies and so on.

Actual result (*)

Right now Magento can't handle Intersection types introduced in php 8.1

Related issues:

https://github.com/magento/magento2/issues/34931 https://github.com/magento/magento2/issues/34932

Note: There is a Union type feature that should also be implemented. Need to make sure that 2 people do not work on these features in parallel, as this will lead to a conflict! https://github.com/magento/magento2/issues/34265

m2-assistant[bot] commented 2 years ago

Hi @karyna-tsymbal-atwix. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

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

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

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

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

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. 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:

engcom-Bravo commented 1 year ago

Hi @karyna-tsymbal-atwix,

We have gone through the main description and found that this is not related to any bug of Magento but it can be a good feature to have in Magento. Hence marking this ticket as a feature request to process further.

Thank you.