Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	CHANGELOG.md
shalvah 4 éve
szülő
commit
8fa98d0e03
2 módosított fájl, 9 hozzáadás és 3 törlés
  1. 8 2
      CHANGELOG.md
  2. 1 1
      src/Tools/Utils.php

+ 8 - 2
CHANGELOG.md

@@ -12,15 +12,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 
 ### Removals
 
-## 2.5.2 (Thursday, 11 February 2021)
+## 2.5.3 (Thursday, 11 February 2021)
 ### Fixes
 - Properly serialize objects in PHP example request (https://github.com/knuckleswtf/scribe/commit/8059566ef39ec09ebd7eb36ecd2e65d20f0dd2bc)
 - Don't include Content-Type header in Guzzle examples (https://github.com/knuckleswtf/scribe/commit/6a1e7504ec4c5a17e4e97996536bd16398823703)
-- 
+
+## 2.5.2 (Monday, 25 January, 2021)
+### Fixes
+- Change check for legacy-style factories to check for new style instead. (https://github.com/knuckleswtf/scribe/pull/181)
 
 ## 2.5.1 (Wednesday, 16 December 2020)
 - PHP 8 support (https://github.com/knuckleswtf/scribe/pull/162)
 
+## 2.5.0
+There wasn't a 2.5.0.😕 No reason why; it just skipped my mind.
+
 ## 2.4.2 (Tuesday, 1 December 2020)
 ### Fixes
 - Specify the `local` disk when fetching `openapi.yaml` file. (https://github.com/knuckleswtf/scribe/pull/150)

+ 1 - 1
src/Tools/Utils.php

@@ -145,7 +145,7 @@ class Utils
 
     public static function getModelFactory(string $modelName, array $states = [])
     {
-        if (!function_exists('factory')) { // Laravel 8 type factory
+        if (method_exists($modelName, 'factory')) { // Laravel 8 type factory
             $factory = call_user_func_array([$modelName, 'factory'], []);
             if (count($states)) {
                 foreach ($states as $state) {