如何仅在需求开发中使用 bunde?



我做了一个composer diagnose,并收到以下错误消息:

警告 symfony/monolog-bundle 在 require 和 require-dev,这可能会导致意外行为 require.symfony/serializer-pack : unbound version constraint (( 应该避免require.symfony/webpack-encore-pack:unbound 应避免版本约束 ((

如何仅在需求开发中使用单语包?

重新运行应该可以解决您的问题的composer require symfony/monolog-bundle --dev

另一种方法是编辑您的 composer.json 并将包从部分中删除require但保留在部分require-dev