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

Compatible with Magento 2.4.7 - Backward compatibility has been lost in the Magento\Catalog\Model\ProductRepository class #317

Closed
wants to merge 2 commits into from

Conversation

TuVanDev
Copy link
Contributor

@TuVanDev TuVanDev commented May 9, 2024

As of Magento 2.4.7, backward compatibility has been lost in the Magento\Catalog\Model\ProductRepository class. This pull request aims to fix this issue.

Check the issue page in the Magento repo for reference: magento/magento2#38669.

Backward compatibility has been lost in the Magento\Catalog\Model\ProductRepository class

Check the issue page in the Magento repo for reference: magento/magento2#38669
@TuVanDev
Copy link
Contributor Author

TuVanDev commented May 9, 2024

It is worth saying that there is no need to check if the instance of theProductMetadataInterface interface contains the getVersion method, as this method always exists in Magento 2. You can refer to the code in the following links for confirmation:
https://github.com/magento/magento2/blob/2.0/lib/internal/Magento/Framework/App/ProductMetadataInterface.php#L17
https://github.com/magento/magento2/blob/2.4.7/lib/internal/Magento/Framework/App/ProductMetadataInterface.php#L21

@ihor-sviziev
Copy link

Can you try removing constructor override and try something like this instead?
magento/magento2#30684 (comment)

@TuVanDev TuVanDev closed this May 10, 2024
@TuVanDev TuVanDev deleted the magento247-compatible branch May 10, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants