Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 20, 2024 via composer

dama/doctrine-test-bundle v8.0.1

Symfony bundle to isolate doctrine database tests and improve test performance
Package summary
Share
0
issues
1
license
39
MIT
Package created
19 Mar 2016
Version published
5 Dec 2023
Maintainers
1
Total deps
39
Direct deps
6
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
39 Packages, Including:
dama/doctrine-test-bundle@v8.0.1
doctrine/cache@2.2.0
doctrine/dbal@4.0.2
doctrine/deprecations@1.1.3
doctrine/doctrine-bundle@2.12.0
doctrine/event-manager@2.0.0
doctrine/persistence@3.3.2
doctrine/sql-formatter@1.4.0
psr/cache@3.0.0
psr/container@2.0.2
psr/event-dispatcher@1.0.0
psr/log@3.0.0
symfony/cache@v7.0.7
symfony/cache-contracts@v3.5.0
symfony/config@v7.0.7
symfony/console@v7.0.7
symfony/dependency-injection@v7.0.7
symfony/deprecation-contracts@v3.5.0
symfony/doctrine-bridge@v7.0.7
symfony/error-handler@v7.0.7
symfony/event-dispatcher@v7.0.7
symfony/event-dispatcher-contracts@v3.5.0
symfony/filesystem@v7.0.7
symfony/finder@v7.0.7
symfony/framework-bundle@v7.0.7
symfony/http-foundation@v7.0.7
symfony/http-kernel@v7.0.7
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-intl-grapheme@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/polyfill-php80@v1.29.0
symfony/polyfill-php83@v1.29.0
symfony/process@v7.0.7
symfony/routing@v7.0.7
symfony/service-contracts@v3.5.0
symfony/string@v7.0.7
symfony/var-dumper@v7.0.7
symfony/var-exporter@v7.0.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

6
All Dependencies CSV
β“˜ This is a list of dama/doctrine-test-bundle 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
doctrine/dbal4.0.2-MIT
prod dev
doctrine/doctrine-bundle2.12.0-MIT
prod
psr/cache3.0.06.01 kBMIT
prod dev
symfony/cachev7.0.7-MIT
prod dev
symfony/framework-bundlev7.0.7-MIT
prod
symfony/processv7.0.7-MIT
prod dev

Visualizations

Frequently Asked Questions

What does dama/doctrine-test-bundle do?

The dama/doctrine-test-bundle is a Symfony bundle designed to isolate Doctrine database tests and improve the performance of their execution. This is achieved by using a StaticDriver that wraps your original Driver class and maintains a static database connection in the current PHP process. It begins a transaction before every test case and rolls it back after every test case for all configured DBAL connections. This eliminates the necessity of rebuilding the schema or re-inserting fixtures before every test case, which can significantly boost performance. Along with enhancing test speeds, it also improves memory usage, especially for tests that boot kernels and use Doctrine entities.

How do you use dama/doctrine-test-bundle?

To leverage the benefits of dama/doctrine-test-bundle, you need to install and integrate it into your application. The first step is to install the bundle using Composer. Below is an example of the command that can be executed in your command line:

composer require --dev dama/doctrine-test-bundle

Next, you need to enable the bundle for your test environment in your AppKernel.php file. Here's a general PHP code snippet for the same:

if (in_array($env, ['dev', 'test'])) {
    ...
    if ($env === 'test') {
        $bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
    }
}

The dama/doctrine-test-bundle also includes a PHPUnit extension that should be added to your PHPUnit XML configuration. Depending on your PHPUnit version, the line may slightly vary. The general structure should appear as follows for PHPUnit 8 or 9:

<phpunit>
    ...
    <extensions>
        <extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" />
    </extensions>
</phpunit>

And for PHPUnit 10+:

<phpunit>
    ...
    <extensions>
        <bootstrap class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" />
    </extensions>
</phpunit>

Where are the dama/doctrine-test-bundle docs?

The most comprehensive source of documentation for the dama/doctrine-test-bundle is available on its GitHub page. This includes example usage, installation instructions, how to use the bundle with PHPUnit & Behat, configuration details, and troubleshooting tips. Sample usage and test cases can be found under the tests directory in the bundle's GitHub repository. You can access it here.