没有扩展能够加载 “sentry” 的配置。

huangapple go评论50阅读模式
英文:

There is no extension able to load the configuration for "sentry"

问题

我在我的Symfony 4项目中遇到了这个错误:

>在C:\SourceGit\Sentry\taxeapprentissage\config/packages/sentry.yaml中,没有找到可以加载"sentry"配置的扩展。查找了命名空间"sentry",但在C:\SourceGit\Sentry\taxeapprentissage\config/packages/sentry.yaml中找到了"framework"、"doctrine"、"doctrine_migrations"、"maker"、"twig"、"monolog"、"web_profiler"、"security"、"doctrine_fixtures"、"sensio_framework_extra"、"swiftmailer"、"it_input_mask"和"captcha"。

你能帮助我吗?

我想在我的Symfony 4项目中安装Sentry。我有两个环境,开发和生产。

英文:

I have this error in my symfony 4 project :

>There is no extension able to load the configuration for "sentry" (in C:\SourceGit\Sentry\taxeapprentissage\config/packages/sentry.yaml). Looked for namespace "sentry", found "framework", "doctrine", "doctrine_migrations", "maker", "twig", "monolog", "web_profiler", "security", "doctrine_fixtures", "sensio_framework_extra", "swiftmailer", "it_input_mask", "captcha" in C:\SourceGit\Sentry\taxeapprentissage\config/packages/sentry.yaml (which is loaded in resource "C:\SourceGit\Sentry\taxeapprentissage\config/packages/sentry.yaml").

Can you help me ?

I want to install sentry in my symfony 4 project. I have 2 environments, dev and prod.

答案1

得分: 2

看起来他们的安装脚本有一个bug。我遇到了完全相同的问题。他们提到了packages/sentry.yaml中的一个配置,但实际上它存在于packages/PROD/sentry.yaml中。当将其移到上一级目录时,它会在启动后出现错误。

在运行composer install后,bundles.php中显示:

Sentry\SentryBundle\SentryBundle::class => ['prod' => true],

这意味着它只在环境为PROD时加载。然而,他们的文档中使用了['all' => true]

英文:

It appears their install script has a bug. I had the exact same issue. They speak of a config in packages/sentry.yaml, but it exists in packages/PROD/sentry.yaml. When moving it up a directory, it gives the error from the start post.

After a composer install, the bundles.php says:

Sentry\SentryBundle\SentryBundle::class => ['prod' => true],

Which means it doesnt load unless env=PROD. Their documentation however uses ['all' => true].

huangapple
  • 本文由 发表于 2023年6月6日 17:33:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76413271.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定