Comments (17)
Hey, thanks for understanding and for waiting. I haven't done a full deep dive yet, but git init
and then composer recipes:update --no-scripts
definitely works.
I only had minor errors, for example that special recipes could not be updated. However, the CLI already suggests the correct solution there: Reinstall with --force
flag:
(example) composer recipes:install shopware/storefront --force -v
After doing so, my local environment seems to be running fine 👍
from shopware.
We found the following existing issues which may help or are related to your topic:
- Shopware 6 installation on local environment issue
- Shopware is only PHP 8.1 compatible starting from v6.4.6.0
- Shopware 6 Update crashes
from shopware.
I can't reproduce this, the HttpKernel
class is not used inside the bin/console
anymore. Can you give a more complete reproducer? If you are not using Symfony flex you will need to adapt your bin/console
script like the one in the recipe: https://github.com/shopware/recipes/blob/main/shopware/core/6.6/bin/console
from shopware.
@alberto-wallee maybe I gave some wrong info. You should use the --no-scripts
flag when doing composer update/require so that the assets:install
is not executed. Then you need to update the recipes and that will fix the bin/console
issue. Use composer recipes:update
for that.
from shopware.
I am able to reproduce it with Symfony Flex on MacOS:
- Have a local installed ~v6.5 (used
composer create-project shopware/production
for that) - run
bin/console system:update:prepare
- Bump version in composer.json up to "v6.6.0.0-rc3"
- run
composer update --no-scripts
- run
bin/console system:update:finish
Results in
Stack trace:
#0 /Users/myMachine/project/path/shopware-flex/vendor/autoload_runtime.php(24): {closure}(Array)
#1 /Users/myMachine/project/path/shopware-flex/bin/console(15): require_once('/Users/myMachine...')
#2 {main}
thrown in /Users/myMachine/project/path/shopware-flex/bin/console on line 47
Fatal error: Uncaught Error: Class "Shopware\Core\HttpKernel" not found in /Users/myMachine/project/path/shopware-flex/bin/console:47
Stack trace:
#0 /Users/myMachine/project/path/shopware-flex/vendor/autoload_runtime.php(24): {closure}(Array)
#1 /Users/myMachine/project/path/shopware-flex/bin/console(15): require_once('/Users/myMachine...')
#2 {main}
thrown in /Users/myMachine/project/path/shopware-flex/bin/console on line 47
The command composer recipes:update
claims, that my directory is not a git repository, which is true, since I use Symfony Flex
from shopware.
@littleAmused this is mostly unrelated and not a bug, composer recipes:update
needs git. You must commit before running that. What makes you think you cannot use git with Symfony flex?.
from shopware.
You said you can't reproduce it, I told you how to reproduce it. Sometimes knowledge is required that not every developer has. The documentation does not indicate that git init
needs to be run additionally - so I don't do it unless there is a need. Obviously, an update must now be reason enough.
from shopware.
@littleAmused got it and thanks. I guess sometimes we are in a tricky place where we don't document things because they come directly from Symfony and are documented there, but of course with that we assume that everyone knows what is possible with Symfony and knows what is a a part of Shopware and what is Symfony. Probably we can improve something there. Were you able to update after committing?
from shopware.
Hi @AydinHassan!
I have tried your solution. It "seems" to work, but my question goes beyond that. Those instructions you provided work well for local testing and such, but they are not suitable for automating the installation in a script. This is the part I'm interested in as I maintain automated installation scripts for shops within my company.
So far, the installation steps for shopware 6.5 can be summarized in:
composer create shopware/production:^v6.5
console system:install --basic-setup
My question is, will this installation steps still be valid once 6.6 is available? So we only need to require v6.6 and continue as always... or do we have to do extra changes?
I can see that this update in the console is causing some troubles, but will them be solved before 6.6.0.0 is out?
from shopware.
@alberto-wallee it should be the same but you will have to consult the documentation closer to the release, it's still being prepared.
What trouble exactly do you see?
from shopware.
Hi @AydinHassan , thanks for your reply.
For me is OK to wait until final launch. I wanted to try out 6.6 to test our plugin against it, hoping to be able to use the script we have for installing from the shopware/production repository.
So the error I get is because I install shopware 6.5 from shopware/production, and then I update key packages (shopware/core, shopware/frontend, shopware/administration, shopware/elasticsearch) to v6.6.0.0-rc4 (using composer require).
The error I get is localized in bin/console, which is not updated to the v6.6.0.0-rc4 version and introduces the error I described earlier (HttpKernel...). So the installation scripts triggered by composer fail and the error arises.
However this may not be the "official" way of installing the upcoming 6.6 version, and this is why I am seeing this error.
Do you have any official guide for installing dev shopware versions so we can try out? As far as I have checked, the official way is using shopware/production repository, but that's for stable releases. There's a guide for local installation, but only for Detenv or Dockware, which I don't want to use (I use DDEV for all the shops).
If not, it's OK. I'll wait until 6.6 is available in shopware/production repository.
from shopware.
@alberto-wallee you have to use the --no-scripts
flag with composer when you do the package updates. It is documented now in the update guide here: https://developer.shopware.com/docs/guides/installation/template.html#update-shopware (it wasn't at the time you reported the issue).
from shopware.
Thanks for the suggestion, @AydinHassan .
I tried those instructions but unfortunately they are not enough for trying out upcoming 6.6.
So, from a working 6.5.8.7 installation, I can run those commands listed in the guide, but composer will say that there's nothing to update. In particular, this command.
composer update --no-scripts
And that's how composer works. I can, instead, run this command:
composer require shopware/core:v6.6.0.0-rc4 shopware/storefront:v6.6.0.0-rc4 shopware/administration:v6.6.0.0-rc4 shopware/elasticsearch:v6.6.0.0-rc4 -W --no-scripts
This command runs fine, and shopware's code gets updated. However, the console is now giving the error I reported.
Also, going to the dashboard through the browser, I get this similar error:
Attempted to load class "HttpKernel" from namespace "Shopware\Core".
Did you forget a "use" statement for e.g. "Symfony\Component\HttpKernel\HttpKernel" or "Shopware\Core\Framework\Adapter\Kernel\HttpKernel"
This error happens in /var/www/html/public/index.php (line 53)
So, it's not possible to install directly the upcoming 6.6 version, neither to update to it from a working previous version.
from shopware.
@alberto-wallee you would use composer update --no-scripts
if you manually update the composer.json file. But since you use require then use --no-scripts
as you did. That fixes the original issue that the assets:install
command is run as a post update script. You still need to update the recipes to actually apply the changes to the files, eg bin/console
and so on. That's what the composer recipes:update
step is about.
from shopware.
Hi @AydinHassan ,
I can confirm that running composer recipes:update
solves the problem.
Thanks!
from shopware.
nice, I would close the issue now then :)
from shopware.
I just like to mention that the issue is still present.
Maybe the documentation should be updated here to use composer update --no-scripts
instead of composer update
and to run composer update
again after the updating of the recipes to trigger the scripts.
https://docs.shopware.com/en/shopware-6-en/update-guides/updating-shopware
also, there are some issues with the updating of the recipes, but this is another issue, not directly related to this issue:
i've installed shopware without using git or composer back then. now, when i want to update the recipes the script will complain that no .git directories are existing. this can be workaround'ed by forcing the installation of all recipes again though.
from shopware.
Related Issues (20)
- Cart is lost after logging in again HOT 4
- Shopware6 not installing in Cpanel server. HOT 2
- App script macros return Twig\Markup instance instead of actual return value HOT 2
- Regression - Can't login if sales domain has custom paths - Unable to find a matching sales channel for the request HOT 2
- Icons misplaced when adjusting font size globally HOT 1
- Document generation only supports PDF files HOT 2
- Add connection profiler if "--profile" is used for CLI commands HOT 2
- You must call "setEnvironment()" before calling "Twig\\Extension\\EscaperExtension::setEscaper()". HOT 3
- Control settings "None" on image sliders don't work HOT 2
- Meta information in landing pages is not inherited HOT 3
- Custom field (image) in list view: Not displayed when on paginated pages. But displayed when force refresh paginated list-view page. HOT 2
- Shopware v.6.6 stateMachineState for delivery and payment is always = (null) HOT 2
- CMS form data is not cleared from local storage after form is submitted HOT 3
- The selection of a main variant doesn't have any effect HOT 1
- Admin: Unable to move category as first child into another category HOT 1
- On install: "Failed to add the foreign key constraint. Missing unique key for constraint 'fk.product.main_variant_id' in the referenced table 'product'." HOT 3
- Component Text Field doesn't work anymore HOT 4
- every order can be canceled - even if not allowed via statemachine transition HOT 1
- Promotions not recalculated when editing order in administration HOT 2
- Development setup with devenv failed: HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shopware.