shalvah 3 년 전
부모
커밋
4e3d72fdce
5개의 변경된 파일18개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 0
      CHANGELOG.md
  2. 1 0
      src/Commands/GenerateDocumentation.php
  3. 1 0
      src/Commands/Upgrade.php
  4. 1 1
      src/Tools/Globals.php
  5. 8 0
      src/Tools/Utils.php

+ 7 - 0
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))

+ 1 - 0
src/Commands/GenerateDocumentation.php

@@ -36,6 +36,7 @@ class GenerateDocumentation extends Command
     {
         // 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

+ 1 - 0
src/Commands/Upgrade.php

@@ -15,6 +15,7 @@ class Upgrade extends Command
     {
         // TODO Remove when Laravel 6 is no longer supported
         $this->getOutput()->write(str_repeat("\n", $count));
+        return $this;
     }
 
     public function handle(): void

+ 1 - 1
src/Tools/Globals.php

@@ -4,7 +4,7 @@ namespace Knuckles\Scribe\Tools;
 
 class Globals
 {
-    public const SCRIBE_VERSION = '3.24.1';
+    public const SCRIBE_VERSION = '3.25.0';
 
     public static bool $shouldBeVerbose = false;
 

+ 8 - 0
src/Tools/Utils.php

@@ -218,6 +218,14 @@ class Utils
         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,