From aa0ce72d35903d8b72b43a74a4501021488e6af8 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Sun, 8 Mar 2026 20:24:59 -0500 Subject: [PATCH] fix: errors preventing builds --- .env | 2 +- config/bundles.php | 2 +- config/packages/sentry.yaml | 75 +++++++++++++++++++------------------ 3 files changed, 41 insertions(+), 38 deletions(-) diff --git a/.env b/.env index 53cbc28..8ffea9b 100644 --- a/.env +++ b/.env @@ -13,7 +13,7 @@ # # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration - +APP_URL= ###> symfony/framework-bundle ### APP_ENV=prod APP_SECRET= diff --git a/config/bundles.php b/config/bundles.php index 8df3874..ab99b0d 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -11,7 +11,7 @@ return [ OneToMany\RichBundle\RichBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true], - Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['prod' => true, 'dev' => true, 'test' => true], + Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true], Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true], diff --git a/config/packages/sentry.yaml b/config/packages/sentry.yaml index 339d285..42f4bf1 100644 --- a/config/packages/sentry.yaml +++ b/config/packages/sentry.yaml @@ -1,40 +1,43 @@ -sentry: - register_error_listener: true # Disables the ErrorListener to avoid duplicated log in sentry - register_error_handler: true # Disables the ErrorListener, ExceptionListener and FatalErrorListener integrations of the base PHP SDK +when@prod: &prod + sentry: + register_error_listener: true # Disables the ErrorListener to avoid duplicated log in sentry + register_error_handler: true # Disables the ErrorListener, ExceptionListener and FatalErrorListener integrations of the base PHP SDK - options: - release: 'torsearch@%app.version%' - enable_logs: true - traces_sample_rate: 1 - profiles_sample_rate: 1 - attach_stacktrace: true + options: + release: 'torsearch@%app.version%' + enable_logs: true + traces_sample_rate: 1 + profiles_sample_rate: 1 + attach_stacktrace: true - tracing: - enabled: true - dbal: # DB queries - enabled: true - cache: # cache pools - enabled: true - twig: # templating engine + tracing: enabled: true + dbal: # DB queries + enabled: true + cache: # cache pools + enabled: true + twig: # templating engine + enabled: true -services: - # (Optionally) Configure the breadcrumb handler as a service (needed for the breadcrumb Monolog handler) - Sentry\Monolog\BreadcrumbHandler: - arguments: - - '@Sentry\State\HubInterface' - - !php/const Monolog\Logger::INFO # Configures the level of messages to capture as breadcrumbs -monolog: - handlers: - # (Optionally) Register the breadcrumb handler as a Monolog handler - sentry_breadcrumbs: - type: service - name: sentry_breadcrumbs - id: Sentry\Monolog\BreadcrumbHandler - # Register the handler as a Monolog handler to capture messages as events - sentry: - type: sentry - level: !php/const Monolog\Logger::ERROR # Configures the level of messages to capture as events - hub_id: Sentry\State\HubInterface - fill_extra_context: true # Enables sending monolog context to Sentry - process_psr_3_messages: false # Disables the resolution of PSR-3 placeholders in reported messages \ No newline at end of file + services: + # (Optionally) Configure the breadcrumb handler as a service (needed for the breadcrumb Monolog handler) + Sentry\Monolog\BreadcrumbHandler: + arguments: + - '@Sentry\State\HubInterface' + - !php/const Monolog\Logger::INFO # Configures the level of messages to capture as breadcrumbs + monolog: + handlers: + # (Optionally) Register the breadcrumb handler as a Monolog handler + sentry_breadcrumbs: + type: service + name: sentry_breadcrumbs + id: Sentry\Monolog\BreadcrumbHandler + # Register the handler as a Monolog handler to capture messages as events + sentry: + type: sentry + level: !php/const Monolog\Logger::ERROR # Configures the level of messages to capture as events + hub_id: Sentry\State\HubInterface + fill_extra_context: true # Enables sending monolog context to Sentry + process_psr_3_messages: false # Disables the resolution of PSR-3 placeholders in reported messages + +when@dev: *prod