Home > Software design >  Symfony 6 Maker Bundle
Symfony 6 Maker Bundle

Time:08-05

I'm picking up on Shopware 6. Is it possible to use the Maker bundle shopware? I already did the composer require symfony/maker-bundle but it gives me problems:

Using version ^1.43 for symfony/maker-bundle ./composer.json has been updated Running composer update symfony/maker-bundle Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1 - symfony/maker-bundle v1.43.0 requires doctrine/inflector ^2.0 -> found doctrine/inflector[2.0.0, ..., 2.1.x-dev] but the package is fixed to 1.4.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - symfony/maker-bundle[v1.44.0, ..., v1.45.0] require php >=8.0 -> your php version (7.4.3; overridden via config.platform, actual: 8.1.3) does not satisfy that requirement. - Root composer.json requires symfony/maker-bundle ^1.43 -> satisfiable by symfony/maker-bundle[v1.43.0, v1.44.0, v1.45.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require symfony/maker-bundle:*" to figure out if any version is installable, or "composer require symfony/maker-bundle:^2.1" if you know which you need.

Im using Shopware 6.4


Symfony


Version 5.4.11
Long-Term Support Yes
End of maintenance 11/2024 (in 851 days)
End of life 11/2025 (in 1216 days)


Kernel


Type Shopware\Core\Kernel
Environment dev
Debug true
Charset UTF-8
Cache directory ./var/cache/dev_hc61c72400ff2b806750ba16ed9d16e58 (14.9 MiB)
Build directory ./var/cache/dev_hc61c72400ff2b806750ba16ed9d16e58 (14.9 MiB)
Log directory ./var/log (101 KiB)


PHP


Version 8.1.3
Architecture 64 bits
Intl locale en_US_POSIX
Timezone UTC (2022-08-02T11:40:43 00:00)
OPcache true
APCu false
Xdebug false


CodePudding user response:

this is more of a comment than an answer but I cant comment for some reason. my friend had a very similar issue and it turns out in his case the problem was that the APP_ENV variable in .env file was set to prod. so make sure in the .env file that u have APP_ENV=dev. hope this helps.

CodePudding user response:

As the composer error indicates you require a version of symfony/maker-bundle that requires php 8, but by default shopware is configured with php 7.4.3 as a platform config, because that is the minimal supported shopware version. This ensures that only packages are installed that are also compatible with that php version.

If you know that in your project shopware will always be running with php 8, you can remove the php platform config from the composer.json, or better set it to a project specific value.

If you also want to support all php version that shopware currently supports, you can try requiring an older version of the maker bundle, that is still compatible with php 7.4.

  • Related