'Cant install botman for Laravel

I wanted to try to create a simple chatbot web-app using Laravel Botman. I've created a new Laravel project but when I try to install Botman through the terminal. I get this error.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install botman/botman 2.6.1 (conflict analysis result)
    - symfony/mailer v6.0.7 requires symfony/service-contracts ^1.1|^2|^3 -> satisfiable by symfony/service-contracts[v3.0.1].
    - laravel/framework v9.7.0 requires symfony/mailer ^6.0 -> satisfiable by symfony/mailer[v6.0.7].
    - Root composer.json requires botman/botman ^2.6 -> satisfiable by botman/botman[2.6.0, 2.6.1].
    - Conclusion: don't install psr/container 2.0.2 (conflict analysis result)
    - Conclusion: don't install psr/container 1.1.2 (conflict analysis result)
    - laravel/framework is locked to version v9.7.0 and an update of this package was not requested.
    - Conclusion: don't install psr/container 2.0.1 (conflict analysis result)
    - botman/botman 2.6.0 requires psr/container ^1.0 -> satisfiable by psr/container[1.0.0, ..., 1.x-dev].
    - You can only install one version of a package, so only one of these can be installed: psr/container[dev-master, 1.0.0, ..., 1.x-dev, 2.0.0, 2.0.1, 2.0.2].
    - psr/container 2.0.x-dev is an alias of psr/container dev-master and thus requires it to be installed too.
    - symfony/service-contracts v3.0.1 requires psr/container ^2.0 -> satisfiable by psr/container[2.0.0, 2.0.1, 2.0.2, 2.0.x-dev (alias of dev-master)].
    - Conclusion: don't install psr/container[2.0.0] | install one of psr/container[2.0.1, 2.0.2] (conflict analysis result)


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I've tried deleting the composer.lock file and installing it again. I tried using composer require botman/botman --with-all-dependencies but it still didn't work. Can anyone help me out? Thank you.



Solution 1:[1]

Try adding to composer.json in the section requires "psr/container": "2.0.2 as 1.1.2","symfony/http-foundation": "6.0.3 as 5.4.3" and after that in the terminal 'composer requires botman/botman --with-all-dependencies

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dunduk