Skip to content

Releases: zenstruck/foundry

v2.3.7

08 Mar 09:33
2f523df
Compare
Choose a tag to compare

2f523df fix: use Doctrine metadata event when persist is disabled (#841) by @nikophil
c28b9d7 minor: add parameter "withAutoRefresh" to unproxy() function (#840) by @nikophil
6edd8c2 chore: upgrade also dama when upgrading phpunit version (#839) by @nikophil

Full Change List

v2.3.6

25 Feb 18:18
Compare
Choose a tag to compare

300645b fix: can call ->create() in after persist callback (#833) by @nikophil

Full Change List

v2.3.5

24 Feb 13:07
Compare
Choose a tag to compare

fbf0981 fix: actually disable persistence cascade (#817) by @nikophil
2426f3e fix: trigger after persist callbacks for entities scheduled for insert (#822) by @nikophil

Full Change List

v2.3.4

14 Feb 11:35
Compare
Choose a tag to compare

ad8d72c fix: can index one to many relationships based on "indexBy" (#815) by @nikophil

Full Change List

v2.3.3

03 Feb 10:26
f76cba2
Compare
Choose a tag to compare

f76cba2 fix: fix deprecation message for Factories trait (#806) by @nikophil

Full Change List

v2.3.2

01 Feb 13:06
Compare
Choose a tag to compare

46464cc chore(ci): misc improvments in CI permutations (#797) by @nikophil
86c5aab test: assert updates are implicitly persisted (#781) by @nikophil
54c7424 feat: deprecate when Factories trait is not used in a KernelTestCase (#766) by @nikophil
9937b11 chore: add issue template (#795) by @nikophil
884113f fix: simplify reset database extension (#779) by @nikophil
bd50f41 fix: add unpersisted object to relation (#780) by @nikophil
17388bc tests: transform "migrate" testsuite into "reset database" testsuite (#763) by @nikophil
e45913e fix: propagate "schedule for insert" to factory collection (#775) by @nikophil
d9262cc fix: fix .gitattributes and #[RequiresPhpUnit] versions (#792) by @nikophil
57c42bc tests: fix a test after a bug was resolved in doctrine migrations (#791) by @nikophil
200cfdd [Doc] Fix misc issues (#789) by @javiereguiluz
553807b minor: add platform config to mysql docker container (#788) by @kbond
316d3c7 doc: fix typo (#782) by @norival
0d66c02 minor: use refresh for detached entities (#778) by @nikophil
29b48a1 test: add orphan removal premutation (#777) by @nikophil
c00b3f1 fix: isPersisted must work when id is known in advance (#774) by @nikophil
f303f3f fix: remove _refresh call from create object process (#773) by @nikophil
65cedbf fix: use a "placeholder" for inversed one-to-one (#755) by @nikophil
5f99506 minor: introduce PerssitenceManager::isPersisted() (#754) by @nikophil
9948d6a fix(ci): change PHP version used by PHP CS-Fixer (#768) by @nikophil
cf3cc8b docs: Minor syntax fix (#767) by @javiereguiluz
e8f9a92 docs: clarify default attributes and fixed some syntax issues (#765) by @nikophil, @javiereguiluz
1db5ced tests: validate PSR-4 in CI (#762) by @nikophil
cafc693 [Docs fix] Just spelling in docs (#761) by @GrinWay
d192c4a [Docs fix] Proxy::_save() instead of Proxy::save() (#760) by @GrinWay
ff7210a [Docs fix] Factory::_real() instead Factory::object() (#759) by @GrinWay
d1240b1 fix: RequiresPhpunit should use semver constraint by @nikophil
fd2e38c chore: upgrade to phpstan 2 (#748) by @nikophil
23b4ec4 tests: automatically create cascade persist permutations (#666) by @nikophil
f4ba5d8 tests: add CI permutation with windows (#747) by @nikophil
c17ef91 fix: define FactoryCollection type more precisely (#744) by @nikophil
98f018c feat: schedule objects for insert right after instantiation (#742) by @nikophil
2dcad10 feat: provide current factory to hook (#738) by @nikophil
ea89504 fix: pass to afterPersist hook the attributes from beforeInstantiate (#745) by @nikophil, @kbond

Full Change List

v1.38.4

03 Jan 09:04
Compare
Choose a tag to compare

dcf09e8 minor: add unproxy function (#776) by @nikophil
8037756 doc: fix docblock typo (#670) by @kbond

Full Change List

v2.3.1

12 Dec 09:03
Compare
Choose a tag to compare

138801d chore: remove error handler hack (#729) by @nikophil
cd9dbf5 refactor: extract reset:migration tests in another testsuite (#692) by @nikophil

Full Change List

v2.3.0

11 Dec 15:46
Compare
Choose a tag to compare

Features

0867ad6 feat: add #[WithStory] attribute (#728) by @nikophil

You can use the #[WithStory] attribute to load stories in your tests:

use App\Story\CategoryStory;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Zenstruck\Foundry\Attribute\WithStory;

// You can use the attribute on the class...
#[WithStory(CategoryStory::class)]
final class NeedsCategoriesTest extends KernelTestCase
{
    // ... or on the method
    #[WithStory(CategoryStory::class)]
    public function testThatNeedStories(): void
    {
        // ...
    }
}

If used on the class, the story will be loaded before each test method.

Fixes

af64c35 fix: detect if relation is oneToOne (#732) by @nikophil
c8f5046 fix: fix PHPUnit constraint requirement in FoundryExtension (#735) by @HypeMC
403d9e9 fix: Fix the parameter name of the first and last methods (#730) by @marien-probesys
c5d0bdd fix: can create inversed one to one with non nullable (#726) by @nikophil
f48ffd1 fix: can create inversed one to one (#659) by @nikophil
6d08784 fix: bug with one to many (#722) by @nikophil

Minor

b16b227 docs: Update index.rst (#740) by @OskarStark, @nikophil
854220f docs: fix highlighting and use CPP (#740) by @OskarStark
dfe6bab tests: add paratest permutation (#736) by @nikophil
59867c3 tests: change versions requirements (#737) by @nikophil
4cb7447 docs: Typo in Immutable section (#731) by @franckranaivo
0e7ac6f docs: Fix Story phpdocs (#727) by @simondaigre, @nikophil
efadea8 docs:fix code blocks not showing up (#723) by @AndreasA
edf287e minor: Add templated types to flush_after (#719) by @BackEndTea

Full Change List

v2.2.2

05 Nov 16:39
Compare
Choose a tag to compare

3282f24 Remove @internal from db resetter interfaces (#715) by @HypeMC
870cb42 docs: fix missing comma in upgrade doc (#718) by @justpilot

Full Change List