Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit ff54164

Browse files
committed
3.22 compatibility
1 parent 5926395 commit ff54164

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Codegen.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private function buildUriBuilders(): void {
197197
))
198198
->setGeneratedFrom($this->getGeneratedFrom())
199199
->setDiscardChanges(
200-
Shapes::idx($this->config, 'discardChanges', false),
200+
Shapes::idx($this->config ?? shape(), 'discardChanges', false),
201201
);
202202

203203
$controllers = $this->controllerFacts->getControllers()->keys();
@@ -242,7 +242,7 @@ function (classname<HasUriPattern> $class) {
242242
$base,
243243
$param_builder,
244244
))
245-
->setDiscardChanges(Shapes::idx($this->config, 'discardChanges', false))
245+
->setDiscardChanges(Shapes::idx($this->config ?? shape(), 'discardChanges', false))
246246
->setGeneratedFrom($this->getGeneratedFrom());
247247
foreach ($config['trait']['requireExtends'] ?? [] as $what) {
248248
$builder->traitRequireExtends($what);

0 commit comments

Comments
 (0)