Skip to content

Commit

Permalink
bc: fix Proxy sca problem in ModelFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
nikophil committed Mar 15, 2024
1 parent 949ae62 commit 424732a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/ModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
* @method static Proxy[]|TModel[] createMany(int $number, array|callable $attributes = [])
* @phpstan-method static list<Proxy<TModel>> createMany(int $number, array|callable $attributes = [])
*
* @phpstan-method FactoryCollection<Proxy<TModel>> sequence(iterable<array<string, mixed>>|callable(): iterable<array<string, mixed>> $sequence)
* @phpstan-method FactoryCollection<Proxy<TModel>> many(int $min, int|null $max = null)
*
* @phpstan-method static list<Proxy<TModel>> createSequence(iterable<array<string, mixed>>|callable(): iterable<array<string, mixed>> $sequence)
* @phpstan-method static list<Proxy<TModel>> createMany(int $min, int|null $max = null)
*
* @author Kevin Bond <[email protected]>
*
* @deprecated use PersistentProxyObjectFactory instead
Expand Down
9 changes: 1 addition & 8 deletions src/Persistence/PersistentProxyObjectFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

use Zenstruck\Foundry\Exception\FoundryBootException;
use Zenstruck\Foundry\Factory;
use Zenstruck\Foundry\FactoryCollection; // keep me!
use Zenstruck\Foundry\Proxy;
use Zenstruck\Foundry\Persistence\Proxy;

/**
* @template TModel of object
Expand All @@ -25,12 +24,6 @@
* @method static Proxy[]|TModel[] createMany(int $number, array|callable $attributes = [])
* @phpstan-method static list<Proxy<TModel>> createMany(int $number, array|callable $attributes = [])
*
* @phpstan-method FactoryCollection<Proxy<TModel>> sequence(iterable<array<string, mixed>>|callable(): iterable<array<string, mixed>> $sequence)
* @phpstan-method FactoryCollection<Proxy<TModel>> many(int $min, int|null $max = null)
*
* @phpstan-method static list<Proxy<TModel>> createSequence(iterable<array<string, mixed>>|callable(): iterable<array<string, mixed>> $sequence)
* @phpstan-method static list<Proxy<TModel>> createMany(int $min, int|null $max = null)
*
* @author Kevin Bond <[email protected]>
*/
abstract class PersistentProxyObjectFactory extends PersistentObjectFactory
Expand Down

0 comments on commit 424732a

Please sign in to comment.