Skip to content

Commit

Permalink
3.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Mar 21, 2022
1 parent d224c4a commit 4e3d72f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions src/Commands/GenerateDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Commands/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Tools/Globals.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 8 additions & 0 deletions src/Tools/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4e3d72f

Please sign in to comment.