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

Circular reference detected for service "import_app_simple.simple" #170

Open
David-Magebinary opened this issue Feb 20, 2020 · 9 comments
Open

Comments

@David-Magebinary
Copy link

** Exception that I got **
[Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException] Circular reference detected for service "import_app_simple.simple", path: "import_app_simple.simple -> import.modules -> import.module.plugin".

How to reproduce the issue:
After generating the ok file, was trying to import the stock information.

./vendor/bin/import-simple import:products:inventory:msi --magento-edition CE --magento-version 2.3.3 --db-pdo-dsn mysql:host=172.17.0.1\;port=3306\;dbname=biv_m2 --db-username root --db-password xxxxx --source-dir /xx/xxxx

** Dirty fix solution:**

  1. Comment <argument type="service" id="import_app_simple.simple"/> in the file /vendor/techdivision/import/symfony/Resources/config/services.xml
  2. Remove all the application related code in the TechDivision\Import\Modules\PluginModule class

I did not use Symfony before, not really sure what the error is related to. Looks like it is a looping injecting issue. eg. parent -> child -> child -> parent

@wagnert wagnert self-assigned this Feb 21, 2020
@wagnert
Copy link
Member

wagnert commented Feb 21, 2020

Hi @David-Magebinary I'll check this issue and keep you updated. Thanks for reporting.

@wagnert wagnert added the bug label Feb 21, 2020
@wagnert
Copy link
Member

wagnert commented Feb 21, 2020

@David-Magebinary I've tested it with version 3.8.7 with the following command

~/workspace/techdivision/import-cli-simple/bin/import-simple import:create:ok-file \
  && ~/workspace/techdivision/import-cli-simple/bin/import-simple \
    import:products:inventory:msi \
    --magento-edition=EE \
    --magento-version=2.3.4 \
    --db-pdo-dsn="mysql:host=127.0.0.1;dbname=magento_ee_234;charset=utf8" \
    --db-username=root \
    --db-password=xxxx \
    --source-dir=var/importexport

from within the Magento installation directory, and it works without any problem. So I've some questions:

  • Which PHP version are you using
  • Which M2IF version are you using
  • From which directory do you invoke the commands (inside or outside the Magento installation directory)

Hope your answers will help me to allow me to reproduce the issue.

Thanks for supporting
Tim

@David-Magebinary
Copy link
Author

@wagnert
PHP version: 7.4.2
M2IF version:
"require": { "php": ">=7.1.0", "techdivision/import": "15.0.3", "techdivision/import-cli": "9.0.2", "techdivision/import-app-simple": "16.0.0", "techdivision/import-configuration-jms": "15.0.3", "techdivision/import-ee": "14.0.0", "techdivision/import-attribute": "17.0.1", "techdivision/import-attribute-set": "12.0.0", "techdivision/import-customer": "14.0.0", "techdivision/import-customer-address": "14.0.1", "techdivision/import-category": "17.0.2", "techdivision/import-category-ee": "18.0.1", "techdivision/import-product": "19.0.1", "techdivision/import-product-msi": "14.0.0", "techdivision/import-product-tier-price": "12.0.0", "techdivision/import-product-url-rewrite": "18.0.2", "techdivision/import-product-link": "19.0.0", "techdivision/import-product-media": "19.0.0", "techdivision/import-product-bundle": "19.0.0", "techdivision/import-product-variant": "19.0.0", "techdivision/import-product-grouped": "13.0.0", "techdivision/import-product-ee": "19.0.0", "techdivision/import-product-link-ee": "20.0.0", "techdivision/import-product-media-ee": "19.0.0", "techdivision/import-product-bundle-ee": "20.0.0", "techdivision/import-product-variant-ee": "20.0.0", "techdivision/import-product-grouped-ee": "14.0.0", "techdivision/import-converter": "9.0.0", "techdivision/import-converter-ee": "9.0.0", "techdivision/import-converter-product-category": "1.0.0", "techdivision/import-converter-product-attribute": "1.0.0" }

Outside of the Magento installation directory

@wagnert
Copy link
Member

wagnert commented Mar 10, 2020

@David-Magebinary As M2IF was usually optimized within the Magento PHP environment, it has not been ready for PHP 7.4, as Magento itself, yet. We're working on this, but it'll take some time to make it work.

@David-Magebinary
Copy link
Author

@wagnert Do you have a solution or the cause of the issue in your mind? I can submit a pull request but I have to know what is your preferred solution for fixing this issue.

@wagnert
Copy link
Member

wagnert commented Mar 15, 2020

@David-Magebinary I need to investigate more into the PHP 7.4 problems (there are several others). Did you try the PHAR file?

@wagnert
Copy link
Member

wagnert commented Mar 20, 2020

@David-Magebinary Did you found the time to test the PHAR file meanwhile? :-)

@wagnert wagnert removed their assignment Apr 8, 2020
@Adel-Magebinary
Copy link

Hello @wagnert ,

David is away for a few months. I can test it for you or provide you with the docker container if that's helpful.

Thanks,
Adel.

@wagnert
Copy link
Member

wagnert commented May 5, 2020

@Adel-Magebinary This would be awesome 🙂 Thanks

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

No branches or pull requests

3 participants