Related
This has just randomly started happening and i've never seen this so i'm not sure how to fix it. I came to reinstall all the plugins for a bedrock install from wpackagist and instead of going into web/app/plugins they are all installing in the vendor folder. They weren't doing this last time i installed them, here is composer.json, nothing has changed so i don't know what is going on:
{
"name": "roots/bedrock",
"type": "project",
"license": "MIT",
"description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
"homepage": "https://roots.io/bedrock/",
"authors": [
{
"name": "Scott Walkinshaw",
"email": "scott.walkinshaw#gmail.com",
"homepage": "https://github.com/swalkinshaw"
},
{
"name": "Ben Word",
"email": "ben#benword.com",
"homepage": "https://github.com/retlehs"
}
],
"keywords": [
"bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
],
"support": {
"issues": "https://github.com/roots/bedrock/issues",
"forum": "https://discourse.roots.io/category/bedrock"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
},
{
"type": "vcs",
"url": "git#github.com:clickds/save-share-cart.git"
},
{
"type": "vcs",
"url" : "git#github.com:clickds/woocommerce-additional-variation-images.git"
}
],
"require": {
"php": ">=7.1",
"composer/installers": "^1.11",
"vlucas/phpdotenv": "^5.3",
"oscarotero/env": "^2.1",
"roots/bedrock-autoloader": "^1.0",
"roots/bedrock-disallow-indexing": "^2.0",
"roots/wordpress": "5.8",
"roots/wp-config": "1.0.0",
"roots/wp-password-bcrypt": "1.0.0",
"wpackagist-plugin/woocommerce": "^5.7",
"wpackagist-plugin/disable-gutenberg": "^2.5",
"wpackagist-plugin/custom-field-builder": "^1.2",
"clickds/save-share-cart" : "^1.0.4",
"wpackagist-plugin/woocommerce-gateway-stripe": "^5.8",
"wpackagist-plugin/all-in-one-wp-security-and-firewall": "^4.4",
"wpackagist-plugin/w3-total-cache": "^2.1",
"wpackagist-plugin/woocommerce-gateway-paypal-express-checkout": "^2.1",
"wpackagist-plugin/simple-taxonomy-ordering": "^2.3",
"wpackagist-plugin/wp-mail-smtp": "^3.2",
"glenelkins84/woocommerce-additional-variation-images" : "^1.9.2",
"wpackagist-plugin/import-xml-feed": "^2.1",
"wpackagist-plugin/woo-variation-swatches": "^1.1",
"wpackagist-plugin/woo-custom-related-products": "^1.3",
"wpackagist-plugin/purchase-orders-for-woocommerce": "^1.8"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.6.0",
"roave/security-advisories": "dev-master"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"allow-plugins": {
"composer/installers": false,
"roots/wordpress-core-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"installer-paths": {
"web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
"web/app/plugins/{$name}/": ["type:wordpress-plugin"],
"web/app/themes/{$name}/": ["type:wordpress-theme"]
},
"wordpress-install-dir": "web/wp"
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"test": [
"phpcs"
]
}
}
It seems "WordPress boilerplate" works separately from WordPress core.
Generally, using composer, the installed packages are stored in the vendor folder and can be called by requiring autoload.php file in your project.
I have freshly installed drupal 9.
composer.json
{
"name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"require": {
"composer/installers": "^1.9",
"drupal/core": "self.version",
"drupal/core-project-message": "self.version",
"drupal/core-vendor-hardening": "self.version"
},
"require-dev": {
"behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.4",
"composer/composer": "^2.0.2",
"drupal/coder": "^8.3.10",
"fabpot/goutte": "^3.3",
"instaclick/php-webdriver": "^1.4.1",
"mikey179/vfsstream": "^1.6.8",
"phpunit/phpunit": "^8.5.14 || ^9",
"phpspec/prophecy": "^1.12",
"symfony/css-selector": "^4.4",
"symfony/phpunit-bridge": "^5.3.0",
"symfony/var-dumper": "^5.3.0",
"symfony/error-handler": "^4.4",
"justinrainbow/json-schema": "^5.2",
"symfony/filesystem": "^4.4",
"symfony/finder": "^4.4",
"symfony/lock": "^4.4",
"symfony/browser-kit": "^4.4",
"symfony/dom-crawler": "^4.4 !=4.4.5",
"easyrdf/easyrdf": "^0.9 || ^1.0"
},
"replace": {
"paragonie/random_compat": "9.99.99",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"preferred-install": "dist",
"autoloader-suffix": "Drupal9",
"platform": {
"php": "7.3.0"
}
},
"extra": {
"_readme": [
"By default Drupal loads the autoloader from ./vendor/autoload.php.",
"To change the autoloader you can edit ./autoload.php.",
"This file specifies the packages.drupal.org repository.",
"You can read more about this composer repository at:",
"https://www.drupal.org/node/2718229"
],
"installer-paths": {
"core": ["type:drupal-core"],
"libraries/{$name}": ["type:drupal-library"],
"modules/contrib/{$name}": ["type:drupal-module"],
"profiles/contrib/{$name}": ["type:drupal-profile"],
"themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
"modules/custom/{$name}": ["type:drupal-custom-module"],
"themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"drupal-core-project-message": {
"post-install-cmd-message": [
"<bg=blue;fg=white>drupal/drupal</>: This package is meant for core development,",
" and not intended to be used for production sites.",
" See: https://www.drupal.org/node/3082474"
],
"post-create-project-cmd-message": [
"<bg=red;fg=white>drupal/drupal</>: This package is meant for core development,",
" and not intended to be used for production sites.",
" See: https://www.drupal.org/node/3082474"
]
}
},
"autoload": {
"psr-4": {
"Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer"
}
},
"autoload-dev": {
"psr-4": {
"Drupal\\Composer\\": "composer"
}
},
"scripts": {
"pre-install-cmd": "Drupal\\Composer\\Composer::ensureComposerVersion",
"pre-update-cmd": "Drupal\\Composer\\Composer::ensureComposerVersion",
"pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
"drupal-phpunit-upgrade-check": "Drupal\\Core\\Composer\\Composer::upgradePHPUnit",
"drupal-phpunit-upgrade": [
"#composer update phpunit/phpunit --with-dependencies --no-progress",
"#composer require phpspec/prophecy-phpunit:^2 --no-progress --no-suggest"
],
"post-update-cmd": [
"Drupal\\Composer\\Composer::generateMetapackages"
],
"phpcs": "phpcs --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --",
"phpcbf": "phpcbf --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --"
},
"repositories": [
{
"type": "path",
"url": "core"
},
{
"type": "path",
"url": "composer/Plugin/ProjectMessage"
},
{
"type": "path",
"url": "composer/Plugin/VendorHardening"
},
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
]
}
I have read it is best to use composer for installign modules. So I am trying
php8.0 /usr/local/bin/composer require drupal/google_analytics
Using version ^3.1 for drupal/google_analytics
./composer.json has been updated
Running composer update drupal/google_analytics
> Drupal\Composer\Composer::ensureComposerVersion
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/google_analytics[dev-3.x, 3.1.0] require drupal/core ^8.8.6|^9.0 -> satisfiable by drupal/core[8.8.6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.3.x-dev] from composer repo (https://repo.packagist.org) but drupal/core[dev-main] from path repo (core) has higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
- drupal/google_analytics 3.x-dev is an alias of drupal/google_analytics dev-3.x and thus requires it to be installed too.
- Root composer.json requires drupal/google_analytics ^3.1 -> satisfiable by drupal/google_analytics[3.1.0, 3.x-dev (alias of dev-3.x)].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
How to understand those errors? Looks like it requires drupal 8 or 9 but i have 9 so why there is a problem? I see there is mentioned priorities, I have read https://getcomposer.org/doc/articles/repository-priorities.md but I do not get what I need to fix for it to work. Can you tell?
Deleted vendor directory. Ran composer install. Noticed message after installation
drupal/drupal: This package is meant for core development,
and not intended to be used for production sites.
See: https://www.drupal.org/node/3082474
Packages already clean.
In the link I saw composer command to create new project, so I modified it to this one and tried:
composer -n create-project drupal/recommended-project:* drupal3
then followed installation steps https://www.drupal.org/docs/installing-drupal
and then tried installing google analytics - and it went without problems.
I have a package in a private github repository.
When I run composer require my_vendor/my_package the package gets added to composer.json and shows up in the vendor directory.
When I run composer remove my_vendor/my_package it gives me a warning:
Package "my_vendor/my_package" listed for update is not installed.
Ignoring.
So when I run composer prohibits my_vendor/my_package it says
Could not find package "my_vendor/my_package" in your project
If I run composer show (after requiring the package) it is not displayed in the list.
This package has a dependency (lexik/authenticationbundle) which is correctly installed, removed and show in list of installed packages (but not listed in the tree view since it is a dependency of a non existent package)...
I have no clue on what could explain this behavior.
Any suggestion?
edit (adding composer.json content)
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/api-pack": "^1.1",
"composer/composer": "^1.6",
"symfony/console": "^4.1",
"symfony/flex": "^1.0",
"symfony/framework-bundle": "^4.1",
"symfony/lts": "^4#dev",
"symfony/orm-pack": "^1.0",
"symfony/web-server-bundle": "^4.1",
"symfony/yaml": "^4.1"
},
"require-dev": {
"symfony/dotenv": "^4.1"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/my_repo/my_package.git"
}
],
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"cache:clear": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-package-install": [
"App\\Utility\\Bootstrap\\Setup::execute",
"#auto-scripts"
],
"pre-package-uninstall": [
"App\\Utility\\Bootstrap\\Demolish::execute",
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"id": "01C1K60FQVPP7FCAC3YB6639RZ",
"allow-contrib": true
}
}
}
Furthermore, creating a new project and requiring the package correctly adds it to the list of installed packages, thus removing it works fine. Then I tried to delete lock file and running a composer update and eventually I tried to require/remove it but with no luck.
It appears that what was preventing composer to correctly configure required package was a die() in the post-package-install script.
Removing the statement solved the issue.
I recently made a composer update on my Symfony app (2.7). Since I did this update, swiftmailer went from 2.4 to 2.5 and after the command, the console displayed me this error:
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
Unable to replace alias "swiftmailer.mailer.default.transport.real" with actual definition "mail".
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
You have requested a non-existent service "mail".
I tried to remove the swiftmailer directory in "vendor", but it didnt work.
Here's my composer.json:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": { "": "src/" }
},
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "dev-master"
},
"require-dev": {
"sensio/generator-bundle": "~2.3",
"symfony/phpunit-bridge": "~2.7"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"#symfony-scripts"
],
"post-update-cmd": [
"#symfony-scripts"
]
},
"config": {
"bin-dir": "bin",
"platform": {
"php": "7.0"
}
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.7-dev"
}
}
}
Thank you in advance for your help.
This has definitely been happening since today. (I'm on Symfony 2.8.17.) Reverting the Swiftmailer bundle back to version 2.4 fixed this for me.
In your composer.json file change
"symfony/swiftmailer-bundle": "~2.3",
to
"symfony/swiftmailer-bundle": "2.4",
Now do a composer update so you go back to version 2.4 of the Swiftmailer bundle and all should be well. Looks like there is a bug in the 2.5 update.
--
If you're still having problems try these commands to fully flush out cache:
rm -rf app/cache/*
rm app/bootstrap.php.cache
Also check your composer.lock file to ensure that the Swiftmailer bundle really has reverted back to 2.4. You should see a section like this:
{
"name": "symfony/swiftmailer-bundle",
"version": "v2.4.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/swiftmailer-bundle.git",
"reference": "ad751095576ce0c12a284e30e3fff80c91f27225"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/ad751095576ce0c12a284e30e3fff80c91f27225",
"reference": "ad751095576ce0c12a284e30e3fff80c91f27225",
"shasum": ""
},
"require": {
"php": ">=5.3.2",
"swiftmailer/swiftmailer": ">=4.2.0,~5.0",
"symfony/config": "~2.7|~3.0",
"symfony/dependency-injection": "~2.7|~3.0",
"symfony/http-kernel": "~2.7|~3.0"
},
"require-dev": {
"symfony/console": "~2.7|~3.0",
"symfony/framework-bundle": "~2.7|~3.0",
"symfony/phpunit-bridge": "~2.7|~3.0",
"symfony/yaml": "~2.7|~3.0"
},
"suggest": {
"psr/log": "Allows logging"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\SwiftmailerBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien#symfony.com"
}
],
"description": "Symfony SwiftmailerBundle",
"homepage": "http://symfony.com",
"time": "2016-12-20T04:44:33+00:00"
},
Most likely the issue you're describing was not caused by a bug, but by changed related dependency to swiftmailer/swiftmailer.
You have requested a non-existent service "mail". says that a service mail is missing, Unable to replace alias "swiftmailer.mailer.default.transport.real" with actual definition "mail". is a broad hint that this is related to swfitmailer transport mail, the class Swift_Transport_MailTransport using insecure php mail() function. This transport is deprecated since
swiftmailer version 5.4.5 for security reasons.
In order to fix the issue, you need to
switch from transport mail to a transport supported by current swiftmailer, or
add "swiftmailer/swiftmailer": "<6.0" to your composer.json dependencies in order to prevent packages from installing swiftmailer v6.x where Swift_Transport_MailTransport is gone. Unfortunately, symfony/swiftmailer-bundle requires swiftmailer v6.x starting from v3.0.0, so you would need to require "symfony/swiftmailer-bundle": "^2"
When i do composer update on my Laravel 5.1 it come out with this error
> Downloading http://packagist.org/p/symfony/polyfill-mbstring$a9a5f6e4a8af44008f50a8c0059a6d1a61b1f692627fb41f0cc1f3e8bbfb7205.json
> Writing /root/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-mbstring.json into cache
[RuntimeException]
Could not load package shopware/shopware in http://packagist.org: [UnexpectedValueException] Could not parse version constraint ~v
2.0.0-rc1: Invalid version string "~v2.0.0-rc1"
[UnexpectedValueException]
Could not parse version constraint ~v2.0.0-rc1: Invalid version string "~v2.0.0-rc1"
when i trace it on cache folder
"require-dev": {
"phpunit\/phpunit": "~4.5",
"phpunit\/dbunit": "~1.3",
"behat\/mink": "~1.7",
"behat\/mink-extension": "~2.1",
"behat\/mink-goutte-driver": "~1.2",
"behat\/mink-selenium2-driver": "~1.3",
"symfony\/dom-crawler": "~2.8",
"behat\/behat": "~3.1",
"sensiolabs\/behat-page-object-extension": "~v2.0.0-rc1"
},
it is on not on my require package : composer.json
it is from symfony/polyfill-mbstring
but why on json file they got this?
"packages": {
"shopware\/shopware": {
"5.2.x-dev": {
"name": "shopware\/shopware",
"description": "Shopware is the next generation of open source e-commerce software made in Germany",
"keywords": ["shop", "shopware"],
"homepage": "http:\/\/www.shopware.com",
"version": "5.2.x-dev",
"version_normalized": "5.2.9999999.9999999-dev",
"license": ["AGPL-3.0", "proprietary"],
"authors": [],
"source": {
"type": "git",
"url": "https:\/\/github.com\/shopware\/shopware.git",
"reference": "4c4817979a98144e57d9eebc5aa166795e378a1c"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/shopware\/shopware\/zipball\/4c4817979a98144e57d9eebc5aa166795e378a1c",
"reference": "4c4817979a98144e57d9eebc5aa166795e378a1c",
"shasum": ""
},
"type": "project",
"time": "2016-03-29T06:54:10+00:00",
"autoload": {
"psr-0": {
"Doctrine\\Common\\Proxy\\AbstractProxyFactory": "engine\/Library\/",
"Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister": "engine\/Library\/",
"Shopware": "engine\/",
"Enlight": "engine\/Library\/",
"Zend": "engine\/Library\/",
"JSMin": "engine\/Library\/minify\/"
},
"classmap": ["engine\/Shopware\/Core\/"],
"files": ["engine\/Shopware\/Application.php"]
},
"include-path": ["engine\/Library\/"],
"require": {
"php": ">=5.5.9",
"ext-curl": "*",
"ext-mbstring": "*",
"ext-gd": "*",
"doctrine\/common": "2.5.1",
"doctrine\/dbal": "2.5.1",
"doctrine\/orm": "2.5.1",
"beberlei\/assert": "2.4.0",
"zendframework\/zend-escaper": "2.5.1",
"oyejorge\/less.php": "1.7.0.5",
"guzzlehttp\/guzzle": "5.1.0",
"egulias\/email-validator": "1.2.9",
"symfony\/http-kernel": "2.8.0",
"symfony\/config": "2.8.0",
"symfony\/dependency-injection": "2.8.0",
"symfony\/validator": "2.8.0",
"symfony\/filesystem": "2.8.0",
"symfony\/finder": "2.8.0",
"symfony\/console": "2.8.0",
"symfony\/polyfill-php56": "1.0.0",
"monolog\/monolog": "1.17.2",
"doctrine\/cache": "1.6.0",
"paragonie\/random_compat": "1.1.5",
"symfony\/form": "2.8.0",
"league\/flysystem": "1.0.18",
"elasticsearch\/elasticsearch": "2.1.5",
"ongr\/elasticsearch-dsl": "v2.0.0"
},
"require-dev": {
"phpunit\/phpunit": "~4.5",
"phpunit\/dbunit": "~1.3",
"behat\/mink": "~1.7",
"behat\/mink-extension": "~2.1",
"behat\/mink-goutte-driver": "~1.2",
"behat\/mink-selenium2-driver": "~1.3",
"symfony\/dom-crawler": "~2.8",
"behat\/behat": "~3.1",
"sensiolabs\/behat-page-object-extension": "~v2.0.0-rc1"
},
"replace": {
"symfony\/polyfill-php55": "~1.0",
"symfony\/polyfill-mbstring": "~1.0"
},
"uid": 588566
}, bla ...............
I've had exact same error
./composer.phar selfupdate solve the problem, for me.
Seems to be a problem with composer itself, we had the same problem with our global composer.
You will need to clear the cache and vendor maps in /root/.composer/ and update composer itself:
cd /root
curl -sS https://getcomposer.org/installer | sudo php --
php composer.phar global update
rm composer.phar
This is not an issue in Composer but with the Shopware upstream packages.
The following commit broke this dependency on March 29th:
https://github.com/shopware/shopware/commit/e44e4a7d788675489aadbd664c50a7cfc47e0f05
The following commit fixed it a day later:
https://github.com/shopware/shopware/commit/0cec1d69e972150b3d1fa71b82e621031ff341e3
So if you are still experiencing this issue use the following commands to fix:
composer clear-cache
composer update shopware/shopware