aimeos / aimeos-symfony

Symfony e-commerce bundle for professional, ultra fast online shops, complex B2B applications and #gigacommerce
https://aimeos.org/Symfony
MIT License
231 stars 52 forks source link

error in 'php composer update' symfony4 #51

Closed gentooza closed 4 years ago

gentooza commented 4 years ago

Hi!

I can't get my shop running, I follow steps provided in symfony4 setup but when I execute:

php composer update

I get:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Nothing to install or update
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
86 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> Aimeos\ShopBundle\Composer\ScriptHandler::installBundle
Installing the Aimeos shop bundle
> Aimeos\ShopBundle\Composer\ScriptHandler::updateConfig
Ensure existing config and routing for the shop bundle
> Aimeos\ShopBundle\Composer\ScriptHandler::setupDatabase

In FileLoader.php line 180:

  There is no extension able to load the configuration for "aimeos_shop" (in   
  "/home/joa/dev/sumak/sumak/config/packages/aimeos_shop.yaml"). Looked for n  
  amespace "aimeos_shop", found ""framework", "twig", "twig_extra", "sensio_f  
  ramework_extra", "doctrine", "doctrine_migrations", "security", "web_profil  
  er", "monolog", "debug", "maker"" in /home/joa/dev/sumak/sumak/config/packa  
  ges/aimeos_shop.yaml (which is loaded in resource "/home/joa/dev/sumak/suma  
  k/config/packages/aimeos_shop.yaml").                                        

In YamlFileLoader.php line 721:

  There is no extension able to load the configuration for "aimeos_shop" (in   
  "/home/joa/dev/sumak/sumak/config/packages/aimeos_shop.yaml"). Looked for n  
  amespace "aimeos_shop", found ""framework", "twig", "twig_extra", "sensio_f  
  ramework_extra", "doctrine", "doctrine_migrations", "security", "web_profil  
  er", "monolog", "debug", "maker"".                                           

Script Aimeos\ShopBundle\Composer\ScriptHandler::setupDatabase handling the post-update-cmd event terminated with an exception

  [RuntimeException]                                                     
  An error occurred when executing the "''\''aimeos:setup'\'''" command 

I've duckduckgoed over the internet searching for info and get nothing, so I don't know what do I need to check. thanks! and sorry also, a total newbie here

cheers

aimeos commented 4 years ago

Haven't seen that problem yet. It seems like Aimeos isn't loaded. Can you please post the output of composer show?

gentooza commented 4 years ago

Hi!

thanks for the answer, this is my compose show:

aimeos/ai-admin-jqadm                2020.07.2 Aimeos Vue.js+Bootstrap admin interface
aimeos/ai-admin-jsonadm              2020.07.1 Aimeos ai-admin-jsonadm extension
aimeos/ai-client-html                2020.07.2 Aimeos ai-client-html extension
aimeos/ai-client-jsonapi             2020.07.1 Aimeos JSON API extension
aimeos/ai-controller-frontend        2020.07.1 Aimeos ai-controller-frontend extension
aimeos/ai-controller-jobs            2020.07.1 Aimeos ai-controller-jobs extension
aimeos/ai-fosuser                    2020.07.1 Aimeos ai-fosuser extension
aimeos/ai-gettext                    2020.07.1 Aimeos Gettext extension
aimeos/ai-monolog                    2020.07.1 Monolog adapter for Aimeos web shops and e-commerce solutions
aimeos/ai-swiftmailer                2020.07.1 SwiftMailer adapter for Aimeos web shops and e-commerce solutions
aimeos/ai-symfony                    2020.07.1 Symfony 2 adapter for Aimeos web shops and e-commerce solutions
aimeos/ai-twig                       2020.07.1 Twig template engine adapter for Aimeos e-commerce components
aimeos/aimeos-core                   2020.07.2 Full-featured e-commerce components for high performance online shops
aimeos/aimeos-symfony                2020.07.1 Professional, full-featured and high performance Symfony e-commerce bundle for online shops and co...
aimeos/map                           1.6.0     Easy and elegant handling of PHP arrays as array-like map objects similar to jQuery and Laravel Co...
composer/installers                  v1.9.0    A multi-framework Composer library installer
composer/package-versions-deprecated 1.10.99.1 Composer plugin that provides efficient querying for installed package versions (no runtime IO)
doctrine/annotations                 1.10.4    Docblock Annotations Parser
doctrine/cache                       1.10.2    PHP Doctrine Cache library is a popular cache implementation that supports many different drivers ...
doctrine/collections                 1.6.7     PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common                      2.13.3    PHP Doctrine Common project is a library that provides additional functionality that other Doctrin...
doctrine/dbal                        2.10.2    Powerful PHP database abstraction layer (DBAL) with many features for database schema introspectio...
doctrine/doctrine-bundle             2.1.0     Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle  3.0.1     Symfony DoctrineMigrationsBundle
doctrine/event-manager               1.1.1     The Doctrine Event Manager is a simple PHP event system that was built to be used with the various...
doctrine/inflector                   1.4.3     PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upp...
doctrine/instantiator                1.3.1     A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                       1.2.1     PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                  3.0.1     PHP Doctrine Migrations project offer additional functionality on top of the database abstraction ...
doctrine/orm                         v2.7.3    Object-Relational-Mapper for PHP
doctrine/persistence                 1.3.8     The Doctrine Persistence project is a set of shared interfaces and functionality that the differen...
doctrine/reflection                  1.2.1     The Doctrine Reflection project is a simple library used by the various Doctrine projects which ad...
doctrine/sql-formatter               1.1.1     a PHP SQL highlighting library
egulias/email-validator              2.1.19    A library for validating emails against several RFCs
friendsofsymfony/user-bundle         v2.1.2    Symfony FOSUserBundle
laminas/laminas-code                 3.4.1     Extensions to the PHP Reflection API, static code scanning, and code generation
laminas/laminas-eventmanager         3.2.1     Trigger and listen to events within a PHP application
laminas/laminas-zendframework-bridge 1.0.4     Alias legacy ZF class names to Laminas Project equivalents.
monolog/monolog                      1.25.5    Sends your logs to files, sockets, inboxes, databases and various web services
nikic/php-parser                     v4.8.0    A PHP parser written in PHP
nyholm/psr7                          1.3.0     A fast PHP7 implementation of PSR-7
ocramius/proxy-manager               2.7.1     A library providing utilities to generate, instantiate and generally operate with Object Proxies
php-http/message-factory             v1.0.2    Factory interfaces for PSR-7 HTTP Message
phpdocumentor/reflection-common      2.2.0     Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock    5.2.1     With this component, a library can provide support for annotations via DocBlocks or otherwise retr...
phpdocumentor/type-resolver          1.3.0     A PSR-5 based resolver of Class names, Types and Structural Element Names
psr/cache                            1.0.1     Common interface for caching libraries
psr/container                        1.0.0     Common Container Interface (PHP FIG PSR-11)
psr/http-factory                     1.0.1     Common interfaces for PSR-7 HTTP message factories
psr/http-message                     1.0.1     Common interface for HTTP messages
psr/link                             1.0.0     Common interfaces for HTTP links
psr/log                              1.1.3     Common interface for logging libraries
sensio/framework-extra-bundle        v5.5.6    This bundle provides a way to configure your controllers with annotations
swiftmailer/swiftmailer              v6.2.3    Swiftmailer, free feature-rich PHP mailer
symfony/asset                        v4.4.11   Symfony Asset Component
symfony/browser-kit                  v4.4.11   Symfony BrowserKit Component
symfony/cache                        v4.4.11   Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts              v2.1.3    Generic abstractions related to caching
symfony/config                       v4.4.11   Symfony Config Component
symfony/console                      v4.4.11   Symfony Console Component
symfony/css-selector                 v4.4.11   Symfony CssSelector Component
symfony/debug                        v4.4.11   Symfony Debug Component
symfony/debug-bundle                 v4.4.11   Symfony DebugBundle
symfony/dependency-injection         v4.4.11   Symfony DependencyInjection Component
symfony/doctrine-bridge              v4.4.11   Symfony Doctrine Bridge
symfony/dom-crawler                  v4.4.11   Symfony DomCrawler Component
symfony/dotenv                       v4.4.11   Registers environment variables from a .env file
symfony/error-handler                v4.4.11   Symfony ErrorHandler Component
symfony/event-dispatcher             v4.4.11   Symfony EventDispatcher Component
symfony/event-dispatcher-contracts   v1.1.9    Generic abstractions related to dispatching event
symfony/expression-language          v4.4.11   Symfony ExpressionLanguage Component
symfony/filesystem                   v4.4.11   Symfony Filesystem Component
symfony/finder                       v4.4.11   Symfony Finder Component
symfony/flex                         v1.9.1    Composer plugin for Symfony
symfony/form                         v4.4.11   Symfony Form Component
symfony/framework-bundle             v4.4.11   Symfony FrameworkBundle
symfony/http-client                  v4.4.11   Symfony HttpClient component
symfony/http-client-contracts        v2.1.3    Generic abstractions related to HTTP clients
symfony/http-foundation              v4.4.11   Symfony HttpFoundation Component
symfony/http-kernel                  v4.4.11   Symfony HttpKernel Component
symfony/inflector                    v4.4.11   Symfony Inflector Component
symfony/intl                         v4.4.11   A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/mailer                       v4.4.11   Symfony Mailer Component
symfony/maker-bundle                 v1.20.0   Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you ca...
symfony/mime                         v4.4.11   A library to manipulate MIME messages
symfony/monolog-bridge               v4.4.11   Symfony Monolog Bridge
symfony/monolog-bundle               v3.5.0    Symfony MonologBundle
symfony/options-resolver             v4.4.11   Symfony OptionsResolver Component
symfony/phpunit-bridge               v5.1.3    Symfony PHPUnit Bridge
symfony/polyfill-intl-icu            v1.18.1   Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn            v1.18.1   Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer     v1.18.1   Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring            v1.18.1   Symfony polyfill for the Mbstring extension
symfony/polyfill-php72               v1.18.1   Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73               v1.18.1   Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80               v1.18.1   Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/process                      v4.4.11   Symfony Process Component
symfony/property-access              v4.4.11   Symfony PropertyAccess Component
symfony/property-info                v4.4.11   Symfony Property Info Component
symfony/psr-http-message-bridge      v1.3.0    PSR HTTP message bridge
symfony/routing                      v4.4.11   Symfony Routing Component
symfony/security-bundle              v4.4.11   Symfony SecurityBundle
symfony/security-core                v4.4.11   Symfony Security Component - Core Library
symfony/security-csrf                v4.4.11   Symfony Security Component - CSRF Library
symfony/security-guard               v4.4.11   Symfony Security Component - Guard
symfony/security-http                v4.4.11   Symfony Security Component - HTTP Integration
symfony/serializer                   v4.4.11   Symfony Serializer Component
symfony/service-contracts            v2.1.3    Generic abstractions related to writing services
symfony/stopwatch                    v4.4.11   Symfony Stopwatch Component
symfony/swiftmailer-bundle           v3.4.0    Symfony SwiftmailerBundle
symfony/templating                   v4.4.11   Symfony Templating Component
symfony/translation                  v4.4.11   Symfony Translation Component
symfony/translation-contracts        v2.1.3    Generic abstractions related to translation
symfony/twig-bridge                  v4.4.11   Symfony Twig Bridge
symfony/twig-bundle                  v4.4.11   Symfony TwigBundle
symfony/validator                    v4.4.11   Symfony Validator Component
symfony/var-dumper                   v4.4.11   Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter                 v4.4.11   A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-link                     v4.4.11   Symfony WebLink Component
symfony/web-profiler-bundle          v4.4.11   Symfony WebProfilerBundle
symfony/yaml                         v4.4.11   Symfony Yaml Component
tecnickcom/tcpdf                     6.3.5     TCPDF is a PHP class for generating PDF documents and barcodes.
twig/extra-bundle                    v3.0.5    A Symfony bundle for extra Twig extensions
twig/twig                            v2.13.1   Twig, the flexible, fast, and secure template language for PHP
voku/portable-ascii                  1.5.3     Portable ASCII library - performance optimized (ascii) string functions for php.
webimpress/safe-writer               2.0.1     Tool to write files safely, to avoid race conditions
webmozart/assert                     1.9.1     Assertions to validate method input/output with nice error messages.

cheers!

aimeos commented 4 years ago

Seems OK. Maybe the bundle hasn't been registered in config/bundles.php automatically:

    // ...
    FOS\UserBundle\FOSUserBundle::class => ['all' => true],
    Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
    Aimeos\ShopBundle\AimeosShopBundle::class => ['all' => true],
gentooza commented 4 years ago

hi!

I've added this, and now it seems to reach further, but I get a new error, should I open a new issue?

also, in a fresh install I reach here directly, so I had to do something wrong.

also!! I thought, following symfony documentation, that templating option in ./config/packages/framework.yaml was deprecated so no more used, but I was wrong, I needed it to make installation to progress. (https://symfony.com/doc/4.4/reference/configuration/framework.html#templating)

My new fail, is with the maximum column size in database.

joa@joa-HP-Pavilion-15-Notebook-PC:~/dev/sumak/sumak$ php7.4 ../composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Nothing to install or update
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
86 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> Aimeos\ShopBundle\Composer\ScriptHandler::installBundle
Installing the Aimeos shop bundle
> Aimeos\ShopBundle\Composer\ScriptHandler::updateConfig
Ensure existing config and routing for the shop bundle
> Aimeos\ShopBundle\Composer\ScriptHandler::setupDatabase
Initializing or updating the Aimeos database tables for site default
Rename "prodid" to "parentid" in table "mshop_product_stock"          
  Checking column "prodid"                                            OK
Clear property "key" columns                                          
  Checking table mshop_attribute_property                             OK
  Checking table mshop_customer_property                              OK
  Checking table mshop_media_property                                 OK
  Checking table mshop_price_property                                 OK
  Checking table mshop_product_property                               OK
Remove foreign key "fk_macac_tid_tsid" from "madmin_cache_tag"        OK
Creating admin tables                                                 
  Using schema from cache.php                                         
    Checking table "madmin_cache":                                    
In Simple.php line 75:

  SQLSTATE[HY000]: General error: 1709 Index column size too large. The maxim  
  um column size is 767 bytes.: CREATE TABLE madmin_cache (id VARCHAR(255) NO  
  T NULL, expire DATETIME DEFAULT NULL, value MEDIUMTEXT NOT NULL, INDEX idx_  
  majob_expire (expire), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLA  
  TE `utf8mb4_unicode_ci` ENGINE = InnoDB                                      

aimeos:setup [--option OPTION] [--action ACTION] [--task TASK] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<site> [<tplsite>]]

Script Aimeos\ShopBundle\Composer\ScriptHandler::setupDatabase handling the post-update-cmd event terminated with an exception

  [RuntimeException]                                                     
  An error occurred when executing the "''\''aimeos:setup'\'''" command  

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

as I see id VARCHAR(255) I tried to set the database charset to utf8, but I already get this error!

thanks a lot

MariaDB [sumakdb]> SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "sumakdb";
+----------------------------+
| default_character_set_name |
+----------------------------+
| utf8                       |
+----------------------------+
1 row in set (0.00 sec)

cheers!

aimeos commented 4 years ago

You need at least MySQL 5.7.8 because of DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

gentooza commented 4 years ago

wow!

switching from mariadb-10.1.44 to mysql-5.7.31 did the trick, now it's fully installed

we can close

thanks again for your time, and sorry!