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

Try implementing interface #320

Merged

Conversation

sofia-doofinder
Copy link
Member

El PR que nos propuso magento2 instanciando cada una de las instancias que necesitamos en vez de usar el constructor no ha funcionado porque no pasa la validación.
image

Tras comentarlo en la issue que le abrimos a magento nos han propuesto que implementemos la interfaz en vez de extender la clase: magento/magento2#38669

He estado haciendo pruebas y la indexación funciona, pero no se si esta forma le va a gustar a magento y no lo podemos saber hasta que subamos la versión al validador.

Copy link
Contributor

@brunovesar brunovesar left a comment

Choose a reason for hiding this comment

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

I'm a bit lost on the php changes, but seems consistent on what you said

@@ -10,12 +10,15 @@
use Magento\Catalog\Helper\Image as ImageHelper;
use Magento\Catalog\Helper\ImageFactory;
use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\ProductRepository as ProductRepositoryBase;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest using a factory instead using a factory instead of the repository itself

Copy link
Contributor

@davidmolinacano davidmolinacano left a comment

Choose a reason for hiding this comment

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

LGTM

@sofia-doofinder sofia-doofinder merged commit f65aec5 into master May 16, 2024
@sofia-doofinder sofia-doofinder deleted the Sofia/issue_backwards_compatibilidy_magento_4_7 branch May 16, 2024 08:19
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.

4 participants