Add support for sentry.

This commit is contained in:
James Cole
2025-11-03 20:08:31 +01:00
parent 7743d16ea1
commit d66f03d538
7 changed files with 430 additions and 49 deletions

View File

@@ -37,7 +37,7 @@ abstract class AggregateFormRequest extends ApiRequest
*/
protected array $requests = [];
/** @return class-string[] */
/** @return array<string|array> */
abstract protected function getRequests(): array;
public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): void
@@ -47,6 +47,7 @@ abstract class AggregateFormRequest extends ApiRequest
// instantiate all subrequests and share current requests' bags with them
Log::debug('Initializing AggregateFormRequest.');
/** @var array|string $config */
foreach ($this->getRequests() as $config) {
$requestClass = is_array($config) ? array_shift($config) : $config;