diff --git a/CHANGELOG.md b/CHANGELOG.md index 90988b47..52831eae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - Enh #356: Improve usage `NotFoundException` for cases with definitions (@vjik) - Enh #364: Minor refactoring to improve performance of container (@samdark) - Enh #375: Raise minimum PHP version to `^8.1` and refactor code (@vjik) +- Enh #376: Add default value `true` for parameter of `ContainerConfig::withStrictMode()` and + `ContainerConfig::withValidate()` methods (@vjik) ## 1.2.1 December 23, 2022 diff --git a/src/ContainerConfig.php b/src/ContainerConfig.php index 7995bac2..daeca35f 100644 --- a/src/ContainerConfig.php +++ b/src/ContainerConfig.php @@ -73,7 +73,7 @@ public function getTags(): array /** * @param bool $validate Whether definitions should be validated immediately. */ - public function withValidate(bool $validate): self + public function withValidate(bool $validate = true): self { $new = clone $this; $new->validate = $validate; @@ -106,7 +106,7 @@ public function getDelegates(): array * @param bool $useStrictMode If the automatic addition of definition when class exists and can be resolved * is disabled. */ - public function withStrictMode(bool $useStrictMode): self + public function withStrictMode(bool $useStrictMode = true): self { $new = clone $this; $new->useStrictMode = $useStrictMode;