FriendsOfShopware / FroshProfiler

This plugin allows you to profile your Shopware 5 application
MIT License
157 stars 41 forks source link

Can't install with composer #47

Closed emilas44 closed 7 years ago

emilas44 commented 7 years ago

I have a fresh shopware install and work on a MAC with MAMP

If i run composer require shyim/shopware-profiler i get this error:

Warning: Ambiguous class resolution, "Doctrine\ORM\Persisters\Entity\BasicEntityPersister" was found in both "$baseDir . '/engine/Library/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php" and "/Users/Mac/Documents/Projects/SHOPWARE/shopware/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php", the first will be used. Warning: Ambiguous class resolution, "Doctrine\Common\Proxy\AbstractProxyFactory" was found in both "$baseDir . '/engine/Library/Doctrine/Common/Proxy/AbstractProxyFactory.php" and "/Users/Mac/Documents/Projects/SHOPWARE/shopware/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php", the first will be used.

and then my shopware is broken, can't open it anymore in browser

If I run composer install I also get the same error message and Shopware is broken after it.

shyim commented 7 years ago

Hey @emilas44 , are you using git version of shopware or a release from a zip? Could you try after installation with composer require. composer install -o --no-dev ?

emilas44 commented 7 years ago

I tried with both.... But now i will try the --no-dev option

emilas44 commented 7 years ago

I get the same error with --no-dev also....there is something wrong with composer.json from shopware!

any command with composer doesn't work clean... always some errors in release from zip i get these also

Skipped installation of bin bin/doctrine-dbal for package doctrine/dbal: file not found in package Skipped installation of bin bin/doctrine for package doctrine/orm: file not found in package Skipped installation of bin bin/doctrine.php for package doctrine/orm: file not found in package

emilas44 commented 7 years ago

maybe I am doing something wrong? this was my workflow

zip version:

  1. download and extract
  2. make vhost in MAMP
  3. create DB and user
  4. open in browser and follow the install process
  5. open frontend/backend in chrome (all works fine)
  6. run composer install --no-dev --- all breaks....can't open in browser (missing some files)

git version almost all same except i run ant configure ant build-unit

and in this build-unit I also get same errors and shopware breaks because of missing some files

shyim commented 7 years ago

Could you install normal shopware and try again with the release zip (https://github.com/shyim/shopware-profiler/releases/download/1.1.1/ShyimProfiler-1.1.1.zip). Just upload it in the plugin manager. Its the easist way.

emilas44 commented 7 years ago

Yes it works like that.... but never the less have you tried to run composer install with shopware or composer require with any version (zip/git) it is not possible to run them so that nothing breaks...i don't get it why....this is suposed to work without any errors.

emilas44 commented 7 years ago

OK i have learned now that you can't use composer commands with .zip version of Shopware from website! So your plugin needs to be downloaded and extracted to /custom/plugins/ folder and then installed with plugin manager in backend. If you want to be able to use composer commands then you MUST have a git cloned version of shopware

source: https://forum.shopware.com/discussion/comment/201824#Comment_201824