sonata-project / sandbox

[Abandoned] Sonata Project's sandbox
https://sonata-project.org
MIT License
268 stars 198 forks source link

SeoProductIterator could not be registered, SourceIteratorInterface not found #823

Closed tambait closed 3 years ago

tambait commented 3 years ago

Subject

During execution of vendor/bin/phing multiple times I get warning that SeoProductIterator couldn't be registered. Also in IDE I get Undefined type Exporter\Source\* for all classes imported in SeoProductIterator.

If I prefix import of those classes with Sonata as in 'Sonata\Exporter\Source\SourceIteratorInterface' IDE message disappears.

Steps to reproduce

Run vendor/bin/phing

Expected results

No warning messages.

Actual results

[WARNING] Some commands could not be registered:                                                                       
In SeoProductIterator.php line 25:

  Interface 'Exporter\Source\SourceIteratorInterface' not found  
wbloszyk commented 3 years ago

@tambait Thank you for reporting this.

Change sonata-project/exporter vertsion in composer.json to:

"sonata-project/exporter": "^1.8",
wbloszyk commented 3 years ago

@OskarStark Can you revert it of fix it? https://github.com/sonata-project/sandbox/pull/648

tambait commented 3 years ago

I also receive multiple errors like below, during execution of vendor/bin/phing

00:05:36 CRITICAL [app] [FormatterBundle::transform] markdown - Error while parsing twig template : Unknown "gist" tag in "__string_template__a510690fe22758d789dcd5416aecf17a48bd54f49f607dd1cf335060288f7104" at line 5. ["text" => """ <h3>Gist Formatter</h3>\n \n <p>Now a specific gist from github</p>\n \n <p><% gist '1552362', 'gistfile1.txt'

wbloszyk commented 3 years ago

I know about this errors. It is depends on twig extension (tag) which should replace text to gihtub gist. It is use in post example so you can ignore it.

VincentLanglet commented 3 years ago

Where is the SeoProductIterator class ? Instead of change the version of exporter, the import should just be fixed.

I found one in ecommerce, but the exporter dependency is not required. (it should be) https://github.com/sonata-project/ecommerce/blob/3.x/composer.json

tambait commented 3 years ago

The one I found was in ecommerce, vendor/sonata-project/ecommerce/src/Component/Product/SeoProductIterator.php

VincentLanglet commented 3 years ago

It was fixed but never released https://github.com/sonata-project/ecommerce/commit/e021e9c8e07703acc3a33dbccedab9f455d3c149

But, IMHO the exporter version should be set in the sonata-project/ecommerce bundle. If previously we had sonata-exporter: ^1.8 on ecommerce this issue wouldn't happen.

Do you agree @wbloszyk @tambait ?

If so,

tambait commented 3 years ago

Fixed by sonata-project/ecommerce#726