Skip to content

I should get a warning if my memory_limit of the local php used by composer is insufficient #1343

Closed

Description

@insid1ous-admin

User story

I am too stupid to already have a well configured PHP environment before starting developing projects for shopware and this CLI looks like it was made for exactly this person. I would like a warning if my local composers php has insufficient memory.

I scaffolded via: shopware-cli project create testshop --no-interaction --docker and ran it via shopware-cli proejct dev up which worked fine. It even tells me my Runtime Memory Limit is fine:

Image

Now that probably refers to the container environment (the runtime) which is why this is a Story and not a Bug.

But when I now run composer require shopware/docker --no-interaction locally it throws:

 [KO]
Script assets:install returned with error code 255
!!  Warning: Failed to load plugins Error message: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory
!!
!!  Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /tmp/test-gitlab/test2/testshop/vendor/symfony/framework-bundle/DependencyInjection/Compiler/ContainerBuilderDebugDumpPass.php on line 52
!!
!!  Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /tmp/test-gitlab/test2/testshop/vendor/symfony/error-handler/Error/OutOfMemoryError.php on line 1
!!
Script @auto-scripts was called via post-update-cmd

I would like a warning that is independent of the runtime check.

Acceptance criteria

An "memory limit" healthcheck additionally happens under "Local behaviour"just like for the runtime.

Readiness checklist

  • Acceptance criteria are clearly defined.
  • Backward compatibility impact addressed.
  • Documentation written.
  • Tests added or adjusted accordingly.

Activity

  1. insid1ous-admin commented on Aug 9, 2026

    @insid1ous-admin
    Author

    Also, I couldn't really find this memory limit requirement in the docks, it may make sense to state this somewhere in the CLIs documentation because I did not read legacy setup or hosting guides when starting developing with this and it seems to be a rather important setting:

    Image

    (or maybe i missed it)

  2. shyim commented on Aug 10, 2026

    @shyim
    Member

    I guess we miss here documentation. You should run composer inside the Container. docker compose exec web bash and there the actual composer commands. Than it has all correct environment

  3. insid1ous-admin commented on Aug 10, 2026

    @insid1ous-admin
    Author

    I guess we miss here documentation. You should run composer inside the Container. docker compose exec web bash and there the actual composer commands. Than it has all correct environment

    I thought about it but this volume mount suggested I could do either:

    web:
      volumes:
        - .:/var/www/html

    And yes, if you do want people to run all their composer / php commands in the web container via a docker exec that should be documented, exec into the web service to run composer wasn't intuitive for me. And while you don't need it often, it's also a bit cumbersome.

    Generally, I would also advocate for "freedom of choice" on how developers use the tools you provide. And while I do see point in steering people into the right direction when developing for a product you probably know best yourself, different people write code in different ways, given the resources I would try to support them in their choice.

    If you really do want people to go through the container, maybe give people an shopware-cli composer <args> command that just takes the input arguments 1:1 and routes them wherever you see fit. Someone from us could probably create PR for something like that and internally we could add an alias for composer = shopware-cli composer and prevent Claude to do stupid things in our AI-workflows.

  4. shyim commented on Aug 12, 2026

    @shyim
    Member

    insid1ous-admin i guess i would document this for now and not change anything inside cli yet 👀
    shopware/docs#2436

    what do you think?

  5. shyim commented on Sep 25, 2026

    @shyim
    Member

    In the meanwhile we updated the docs and added also the alias

    swx composer
    shopware-cli project composer
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Story.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions