Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): update zenstruck/foundry requirement from 1.37.* to 1.37.* || 2.2.* #227

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 28, 2024

Updates the requirements on zenstruck/foundry to permit the latest version.

Release notes

Sourced from zenstruck/foundry's releases.

v2.2.0

Main features to use Factory::create() and factory service in data providers

2014ed9 feature: allow to use Factory::create() and factory service in data providers (#648) by @​nikophil

From version 2.2, Foundry provides an extension for PHPUnit. You can install it by modifying you phpunit.xml.dist:

    <phpunit>
      <extensions>
        <bootstrap class="Zenstruck\Foundry\PHPUnit\FoundryExtension"/>
      </extensions>
    </phpunit>

[!WARNING] This PHPUnit extension requires at least PHPUnit 11.4.

Using this extension will allow to use your factories in your data providers the same way you're using them in tests. Thanks to it, you can:

  • Call ->create() or ::createOne() or any other method which creates objects in unit tests (using PHPUnit\Framework\TestCase) and functional tests (Symfony\Bundle\FrameworkBundle\Test\KernelTestCase)
  • Use "Factories as Services" in functional tests
  • Use faker() normally, without wrapping its call in a callable

Make "database reset" mechanism extendable

df568da refactor: make "database reset" mechanism extendable (#690) by @​nikophil

The reset mechanism can now be extended thanks to decoration:

    use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
    use Symfony\Component\DependencyInjection\Attribute\When;
    use Symfony\Component\HttpKernel\KernelInterface;
    use Zenstruck\Foundry\ORM\ResetDatabase\OrmResetter;
// The decorator should be declared in test environment only.
#[When('test')]
// You can also decorate `MongoResetter::class`.
#[AsDecorator(OrmResetter::class)]
final readonly class DecorateDatabaseResetter implements OrmResetter
{
    public function __construct(
        private OrmResetter $decorated
    ) {}
public function resetBeforeFirstTest(KernelInterface $kernel): void
{
    // do something once per test suite (for instance: install a PostgreSQL extension)


</tr></table>

... (truncated)

Changelog

Sourced from zenstruck/foundry's changelog.

v2.2.0

October 24th, 2024 - v2.1.0...v2.2.0

v2.1.0

October 3rd, 2024 - v2.0.9...v2.1.0

  • 0f72ea5 fix: allow non object state in stories (#699) by @​Brewal
  • 6482357 feat: allow to configure migrations configuration files (#686) by @​MatTheCat

v2.0.9

September 2nd, 2024 - v2.0.8...v2.0.9

v2.0.8

August 29th, 2024 - v2.0.7...v2.0.8

v2.0.7

July 12th, 2024 - v2.0.6...v2.0.7

v2.0.6

July 4th, 2024 - v2.0.5...v2.0.6

... (truncated)

Commits
  • a549c10 docs: using factories in data providers (#707)
  • 470d927 docs: how to extend database reset mechanism (#706)
  • 3a3c7d6 bot: fix cs [skip ci]
  • 2014ed9 feature: allow to use Factory::create() and factory service in data provide...
  • f046a59 changelog: update [skip ci]
  • 7cd3b59 changelog: update [skip ci]
  • 68b807b bot: fix cs [skip ci]
  • df568da refactor: make "database reset" mechanism extendable (#690)
  • 4fb0b25 docs: add missing docs (#703)
  • fa1d527 minor: misc fixes for sca (#705)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [zenstruck/foundry](https://github.com/zenstruck/foundry) to permit the latest version.
- [Release notes](https://github.com/zenstruck/foundry/releases)
- [Changelog](https://github.com/zenstruck/foundry/blob/2.x/CHANGELOG.md)
- [Commits](zenstruck/foundry@v1.37.0...v2.2.0)

---
updated-dependencies:
- dependency-name: zenstruck/foundry
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants