diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ccf8317..122669d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Removed +## 3.25.0 (21 March 2022) +### Added +- Support validation rules `accepted` and `accepted_if` ([#438](https://github.com/knuckleswtf/scribe/pull/438)) + +### Fixed +- fix(model factory chain): implode relation chains for bigger relations ([#447](https://github.com/knuckleswtf/scribe/pull/447)) + ## 3.24.1 (7 March 2022) ### Fixed - Don't crash on auto upgrade check fail ([c4afdcd59d3fbe300679013877891a45d2e3782e](https://github.com/knuckleswtf/scribe/commit/c4afdcd59d3fbe300679013877891a45d2e3782e)) diff --git a/src/Commands/GenerateDocumentation.php b/src/Commands/GenerateDocumentation.php index bcf31038..5ac857f2 100644 --- a/src/Commands/GenerateDocumentation.php +++ b/src/Commands/GenerateDocumentation.php @@ -36,6 +36,7 @@ public function newLine($count = 1) { // TODO Remove when Laravel 6 is no longer supported $this->getOutput()->write(str_repeat("\n", $count)); + return $this; } public function handle(RouteMatcherInterface $routeMatcher, GroupedEndpointsFactory $groupedEndpointsFactory): void diff --git a/src/Commands/Upgrade.php b/src/Commands/Upgrade.php index 54887cba..cfb035b9 100644 --- a/src/Commands/Upgrade.php +++ b/src/Commands/Upgrade.php @@ -15,6 +15,7 @@ public function newLine($count = 1) { // TODO Remove when Laravel 6 is no longer supported $this->getOutput()->write(str_repeat("\n", $count)); + return $this; } public function handle(): void diff --git a/src/Tools/Globals.php b/src/Tools/Globals.php index 08a71aab..7ddce81c 100644 --- a/src/Tools/Globals.php +++ b/src/Tools/Globals.php @@ -4,7 +4,7 @@ class Globals { - public const SCRIBE_VERSION = '3.24.1'; + public const SCRIBE_VERSION = '3.25.0'; public static bool $shouldBeVerbose = false; diff --git a/src/Tools/Utils.php b/src/Tools/Utils.php index 15077810..afe4e03b 100644 --- a/src/Tools/Utils.php +++ b/src/Tools/Utils.php @@ -218,6 +218,14 @@ public static function getBaseTypeFromArrayType(string $typeName) return substr($typeName, 0, -2); } + /** + * @param string $modelName + * @param string[] $states + * @param string[] $relations + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + * @throws \Throwable + */ public static function getModelFactory(string $modelName, array $states = [], array $relations = []) { // Factories are usually defined without the leading \ in the class name,