Coder Social home page Coder Social logo

Comments (17)

littleAmused avatar littleAmused commented on June 2, 2024 4

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.

shopware-issue-bot avatar shopware-issue-bot commented on June 2, 2024

We found the following existing issues which may help or are related to your topic:

from shopware.

AydinHassan avatar AydinHassan commented on June 2, 2024

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.

AydinHassan avatar AydinHassan commented on June 2, 2024

@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.

littleAmused avatar littleAmused commented on June 2, 2024

I am able to reproduce it with Symfony Flex on MacOS:

  1. Have a local installed ~v6.5 (used composer create-project shopware/production for that)
  2. run bin/console system:update:prepare
  3. Bump version in composer.json up to "v6.6.0.0-rc3"
  4. run composer update --no-scripts
  5. 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.

AydinHassan avatar AydinHassan commented on June 2, 2024

@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.

littleAmused avatar littleAmused commented on June 2, 2024

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.

AydinHassan avatar AydinHassan commented on June 2, 2024

@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.

alberto-wallee avatar alberto-wallee commented on June 2, 2024

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.

AydinHassan avatar AydinHassan commented on June 2, 2024

@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.

alberto-wallee avatar alberto-wallee commented on June 2, 2024

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.

AydinHassan avatar AydinHassan commented on June 2, 2024

@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.

alberto-wallee avatar alberto-wallee commented on June 2, 2024

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.

AydinHassan avatar AydinHassan commented on June 2, 2024

@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.

alberto-wallee avatar alberto-wallee commented on June 2, 2024

Hi @AydinHassan ,
I can confirm that running composer recipes:update solves the problem.
Thanks!

from shopware.

AydinHassan avatar AydinHassan commented on June 2, 2024

nice, I would close the issue now then :)

from shopware.

ckilb avatar ckilb commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.