BitBagCommerce / SyliusVueStorefrontPlugin

Sylius plugin integrating Sylius with Vue Storefront
45 stars 24 forks source link

Cannot install SyliusVueStorefrontPlugin in a fresh Sylius installation #116

Closed theriseofendymion closed 1 year ago

theriseofendymion commented 3 years ago

Hi, using Sylius 1.8 I can't install VueStorefrontPlugin with composer require bitbag/vuestorefront-plugin:v2.1.0 cause a failure because bitbag/vuestorefront-plugin requires symfony/property-info ^4.4

Forcing installation of symfony/property-info ^4.4 before installing the plugin results in a failure of Sylius:

Compile Error: Declaration of Sylius\Bundle\ApiBundle\PropertyInfo\Extractor\EmptyPropertyListExtractor::getProperties(string $class, array $context = Array): ?array must be compatible with Symfony\Component\PropertyInfo\PropertyListExtractorInterface::getProperties($class, array $context = Array)

gregoire-jianda commented 3 years ago

Same here, on sylius-standard using the 1.8 branch, I get this error with composer require bitbag/vuestorefront-plugin:v2.1.0 :

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for bitbag/vuestorefront-plugin v2.1.0 -> satisfiable by bitbag/vuestorefront-plugin[v2.1.0].
    - Conclusion: remove symfony/property-info v5.1.5
    - Conclusion: don't install symfony/property-info v5.1.5
    - bitbag/vuestorefront-plugin v2.1.0 requires symfony/property-info ^4.4 -> satisfiable by symfony/property-info[v4.4.0, v4.4.1, v4.4.10, v4.4.11, v4.4.12, v4.4.13, v4.4.14, v4.4.15, v4.4.16, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9].
    - Can only install one of: symfony/property-info[v4.4.0, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.1, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.10, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.11, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.12, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.13, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.14, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.15, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.16, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.2, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.3, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.4, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.5, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.6, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.7, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.8, v5.1.5].
    - Can only install one of: symfony/property-info[v4.4.9, v5.1.5].
    - Installation request for symfony/property-info (locked at v5.1.5) -> satisfiable by symfony/property-info[v5.1.5].
Damtan commented 3 years ago

Same here, on fresh Sylius 1.8 project, I get this error when cache clear is call

Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! In FileLoader.php line 180: !! !! There is no extension able to load the configuration for "fos_elastica" (in !! "/var/www/sylius.stage.dige.com.pl/vendor/bitbag/vuestorefront-plugin/src/ !! Resources/config/indexes/attribute.yaml"). Looked for namespace "fos_elasti !! ca", found ""framework", "monolog", "security", "swiftmailer", "twig", "doc !! trine", "doctrine_cache", "sylius_order", "sylius_money", "sylius_currency" !! , "sylius_locale", "sylius_product", "sylius_channel", "sylius_attribute", !! "sylius_taxation", "sylius_shipping", "sylius_payment", "sylius_mailer", "s !! ylius_promotion", "sylius_addressing", "sylius_inventory", "sylius_taxonomy !! ", "sylius_user", "sylius_customer", "sylius_ui", "sylius_review", "sylius_ !! core", "sylius_resource", "sylius_grid", "winzou_state_machine", "sonata_bl !! ock", "bazinga_hateoas", "jms_serializer", "fos_rest", "knp_gaufrette", "kn !! p_menu", "liip_imagine", "payum", "stof_doctrine_extensions", "white_octobe !! r_pagerfanta", "doctrine_migrations", "sylius_fixtures", "sylius_payum", "s !! ylius_theme", "sylius_admin", "fos_oauth_server", "sylius_admin_api", "debu !! g", "web_profiler", "fidry_alice_data_fixtures", "nelmio_alice", "api_platf !! orm", "lexik_jwt_authentication", "sylius_api", "sylius_labs_doctrine_migra !! tions_extra", "sylius_vue_storefront", "console_color_diff", "gesdinet_jwt_ !! refresh_token", "nelmio_cors"" in /var/www/sylius.stage.dige.com.pl/vendor/ !! bitbag/vuestorefront-plugin/src/Resources/config/indexes/attribute.yaml (wh !! ich is being imported from "/var/www/sylius.stage.dige.com.pl/vendor/bitbag !! /vuestorefront-plugin/src/Resources/config/indexes/vue_storefront_catalog.y !! aml").

Codeweld commented 3 years ago

It's should be fixed in a new release

3kynox commented 3 years ago

Hello, just a note, facing the same error as @Damtan. Any explanation about this? Any expectation of an correction date?

Thanks anyway!

Codeweld commented 3 years ago

@3kynox do you have FOS\ElasticaBundle\FOSElasticaBundle::class => ['all' => true], line somewhere it your config/bundles.php file? And have you installed all necessary dependencies?

3kynox commented 3 years ago

Nope, this line wasn't there. I've added it. Looking at composer.json, there's no elastica bundle.

I've just simply followed what's explained on the README.md at the very first step: It says just to run composer require bitbag/vuestorefront-plugin:v2.1.1 and afterwards to update the bundle file.

Otherwise, all dependencies (composer install) have been installed as the project was working well in local / and in production before trying to add BitBag bridge. PHP version is 7.4. Every versions have been checked accordingly what's indicated in the readme. I used a fresh Sylius-Standard 1.8.6 install.

Apparently, elastica-bundle is ignored in the process:

Symfony operations: 4 recipes (4425b75d22bc0c213f505f9944d49b1a)
  - Configuring nelmio/cors-bundle (>=1.5): From github.com/symfony/recipes:master
  - Configuring gesdinet/jwt-refresh-token-bundle (>=v0.8.3): From auto-generated recipe
  **-  IGNORING  friendsofsymfony/elastica-bundle (>=5.0): From github.com/symfony/recipes-contrib:master**
  - Configuring bitbag/vuestorefront-plugin (>=v2.1.1): From auto-generated recipe
Synchronizing package.json with PHP packages
Don't forget to run npm install --force or yarn install --force to refresh your Javascript dependencies!
Executing script cache:clear [KO]

!!
!!  In FileLoader.php line 180:
!!
!!    There is no extension able to load the configuration for "fos_elastica" (in
!!     "C:\Users\NoX\Projects\EscalNatura_Back\vendor\bitbag\vuestorefront-plugin
!!    \src/Resources/config\indexes/vue_storefront_catalog.yaml"). Looked for nam
!!    espace "fos_elastica", found ""framework", "monolog", "security", "swiftmai
!!    ler", "twig", "doctrine", "doctrine_cache", "sylius_order", "sylius_money",
!!     "sylius_currency", "sylius_locale", "sylius_product", "sylius_channel", "s
!!    ylius_attribute", "sylius_taxation", "sylius_shipping", "sylius_payment", "
!!    sylius_mailer", "sylius_promotion", "sylius_addressing", "sylius_inventory"
!!    , "sylius_taxonomy", "sylius_user", "sylius_customer", "sylius_ui", "sylius
!!    _review", "sylius_core", "sylius_resource", "sylius_grid", "winzou_state_ma
!!    chine", "sonata_block", "bazinga_hateoas", "jms_serializer", "fos_rest", "k
!!    np_gaufrette", "knp_menu", "liip_imagine", "payum", "stof_doctrine_extensio
!!    ns", "white_october_pagerfanta", "doctrine_migrations", "sylius_fixtures",
!!    "sylius_payum", "sylius_theme", "sylius_admin", "sylius_shop", "fos_oauth_s
!!    erver", "sylius_admin_api", "debug", "web_profiler", "fidry_alice_data_fixt
!!    ures", "nelmio_alice", "api_platform", "lexik_jwt_authentication", "sylius_
!!    api", "sylius_labs_doctrine_migrations_extra", "console_color_diff", "syliu
!!    s_pay_pal", "nelmio_cors", "gesdinet_jwt_refresh_token", "sylius_vue_storef
!!    ront"" in C:\Users\NoX\Projects\EscalNatura_Back\vendor\bitbag\vuestorefron
!!    t-plugin\src/Resources/config\indexes/vue_storefront_catalog.yaml (which is
!!     being imported from "C:\Users\NoX\Projects\EscalNatura_Back\vendor\bitbag\
!!    vuestorefront-plugin\src/Resources/config/config.yaml").
!!
!!
!!  In YamlFileLoader.php line 721:
!!
!!    There is no extension able to load the configuration for "fos_elastica" (in
!!     "C:\Users\NoX\Projects\EscalNatura_Back\vendor\bitbag\vuestorefront-plugin
!!    \src/Resources/config\indexes/vue_storefront_catalog.yaml"). Looked for nam
!!    espace "fos_elastica", found ""framework", "monolog", "security", "swiftmai
!!    ler", "twig", "doctrine", "doctrine_cache", "sylius_order", "sylius_money",
!!     "sylius_currency", "sylius_locale", "sylius_product", "sylius_channel", "s
!!    ylius_attribute", "sylius_taxation", "sylius_shipping", "sylius_payment", "
!!    sylius_mailer", "sylius_promotion", "sylius_addressing", "sylius_inventory"
!!    , "sylius_taxonomy", "sylius_user", "sylius_customer", "sylius_ui", "sylius
!!    _review", "sylius_core", "sylius_resource", "sylius_grid", "winzou_state_ma
!!    chine", "sonata_block", "bazinga_hateoas", "jms_serializer", "fos_rest", "k
!!    np_gaufrette", "knp_menu", "liip_imagine", "payum", "stof_doctrine_extensio
!!    ns", "white_october_pagerfanta", "doctrine_migrations", "sylius_fixtures",
!!    "sylius_payum", "sylius_theme", "sylius_admin", "sylius_shop", "fos_oauth_s
!!    erver", "sylius_admin_api", "debug", "web_profiler", "fidry_alice_data_fixt
!!    ures", "nelmio_alice", "api_platform", "lexik_jwt_authentication", "sylius_
!!    api", "sylius_labs_doctrine_migrations_extra", "console_color_diff", "syliu
!!    s_pay_pal", "nelmio_cors", "gesdinet_jwt_refresh_token", "sylius_vue_storef
!!    ront"".
!!
!!
!!
Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Codeweld commented 3 years ago

Please add our plugin as a dependency to your composer.json (if it's not there) and run the composer update command. This should do the trick.

3kynox commented 3 years ago

Looks like to work again and these bundles are now installed.

Thanks for fast and efficient answers @Codeweld ^^