Skip to content

Commit b7499b6

Browse files
authored
The module module-doctrine2 is renamed to module-doctrine (#28)
1 parent ef1bfbf commit b7499b6

26 files changed

+30
-30
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "codeception/module-doctrine2",
3-
"description": "Doctrine2 module for Codeception",
2+
"name": "codeception/module-doctrine",
3+
"description": "Doctrine module for Codeception",
44
"license": "MIT",
55
"type": "library",
66
"keywords": [
77
"codeception",
8-
"doctrine2"
8+
"doctrine"
99
],
1010
"authors": [
1111
{

phpstan.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ parameters:
55
- tests
66
excludePaths:
77
analyse:
8-
- tests/data/doctrine2_fixtures/TestFixture1.php
9-
- tests/data/doctrine2_fixtures/TestFixture2.php
8+
- tests/data/doctrine_fixtures/TestFixture1.php
9+
- tests/data/doctrine_fixtures/TestFixture2.php
1010
- tests/_support/UnitTester.php
1111
checkMissingIterableValueType: false
1212
reportUnmatchedIgnoredErrors: true

readme.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Codeception Module Doctrine2
1+
# Codeception Module Doctrine
22

33
A Doctrine 2 module for Codeception.
44

5-
[![Actions Status](https://github.com/Codeception/module-doctrine2/workflows/CI/badge.svg)](https://github.com/Codeception/module-doctrine2/actions)
6-
[![Latest Stable Version](https://poser.pugx.org/codeception/module-doctrine2/v/stable)](https://github.com/Codeception/module-doctrine2/releases)
7-
[![Total Downloads](https://poser.pugx.org/codeception/module-doctrine2/downloads)](https://packagist.org/packages/codeception/module-doctrine2)
8-
[![License](https://poser.pugx.org/codeception/module-doctrine2/license)](/LICENSE)
5+
[![Actions Status](https://github.com/Codeception/module-doctrine/workflows/CI/badge.svg)](https://github.com/Codeception/module-doctrine/actions)
6+
[![Latest Stable Version](https://poser.pugx.org/codeception/module-doctrine/v/stable)](https://github.com/Codeception/module-doctrine/releases)
7+
[![Total Downloads](https://poser.pugx.org/codeception/module-doctrine/downloads)](https://packagist.org/packages/codeception/module-doctrine)
8+
[![License](https://poser.pugx.org/codeception/module-doctrine/license)](/LICENSE)
99

1010
## Requirements
1111

@@ -14,17 +14,17 @@ A Doctrine 2 module for Codeception.
1414
## Installation
1515

1616
```
17-
composer require "codeception/module-doctrine2" --dev
17+
composer require "codeception/module-doctrine" --dev
1818
```
1919

2020
## Documentation
2121

22-
See [the module documentation](https://codeception.com/docs/modules/Doctrine2).
22+
See [the module documentation](https://codeception.com/docs/modules/Doctrine).
2323

24-
[Changelog](https://github.com/Codeception/module-doctrine2/releases)
24+
[Changelog](https://github.com/Codeception/module-doctrine/releases)
2525

2626
## License
2727

28-
`Codeception Module Doctrine2` is open-sourced software licensed under the [MIT](/LICENSE) License.
28+
`Codeception Module Doctrine` is open-sourced software licensed under the [MIT](/LICENSE) License.
2929

3030
© Codeception PHP Testing Framework

src/Codeception/Module/Doctrine2.php renamed to src/Codeception/Module/Doctrine.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* modules:
4848
* enabled:
4949
* - Symfony # 'ZF2' or 'Symfony'
50-
* - Doctrine2:
50+
* - Doctrine:
5151
* depends: Symfony # Tells Doctrine to fetch the Entity Manager through Symfony
5252
* cleanup: true # All doctrine queries will be wrapped in a transaction, which will be rolled back at the end of each test
5353
* ```
@@ -57,22 +57,22 @@
5757
* ```yaml
5858
* modules:
5959
* enabled:
60-
* - Doctrine2:
60+
* - Doctrine:
6161
* connection_callback: ['MyDb', 'createEntityManager'] # Call the static method `MyDb::createEntityManager()` to get the Entity Manager
6262
* ```
6363
*
6464
* By default, the module will wrap everything into a transaction for each test and roll it back afterwards
6565
* (this is controlled by the `cleanup` setting).
6666
* By doing this, tests will run much faster and will be isolated from each other.
6767
*
68-
* To use the Doctrine2 Module in acceptance tests, set up your `acceptance.suite.yml` like this:
68+
* To use the Doctrine Module in acceptance tests, set up your `acceptance.suite.yml` like this:
6969
*
7070
* ```yaml
7171
* modules:
7272
* enabled:
7373
* - Symfony:
7474
* part: SERVICES
75-
* - Doctrine2:
75+
* - Doctrine:
7676
* depends: Symfony
7777
* ```
7878
*
@@ -84,7 +84,7 @@
8484
* ```yaml
8585
* modules:
8686
* enabled:
87-
* - Doctrine2:
87+
* - Doctrine:
8888
* purge_mode: 1 # 1: DELETE (=default), 2: TRUNCATE
8989
* ```
9090
*
@@ -146,7 +146,7 @@
146146
*
147147
* Note that key is ignored, because actual field name is part of criteria and/or expression.
148148
*/
149-
class Doctrine2 extends CodeceptionModule implements DependsOnModule, DataMapper
149+
class Doctrine extends CodeceptionModule implements DependsOnModule, DataMapper
150150
{
151151
private ?DoctrineProvider $dependentModule = null;
152152

@@ -165,14 +165,14 @@ class Doctrine2 extends CodeceptionModule implements DependsOnModule, DataMapper
165165
166166
modules:
167167
enabled:
168-
- Doctrine2:
168+
- Doctrine:
169169
connection_callback: [My\ConnectionClass, getEntityManager]
170170
171171
Or set a dependent module, which can be either Symfony or ZF2 to get EM from service locator:
172172
173173
modules:
174174
enabled:
175-
- Doctrine2:
175+
- Doctrine:
176176
depends: Symfony
177177
EOF;
178178

@@ -503,7 +503,7 @@ public function haveInRepository($classNameOrInstance, array $data = [])
503503
} elseif (is_string($classNameOrInstance)) {
504504
$instance = $this->instantiateAndPopulateEntity($classNameOrInstance, $data, $instances);
505505
} else {
506-
throw new InvalidArgumentException(sprintf('Doctrine2::haveInRepository expects a class name or instance as first argument, got "%s" instead', gettype($classNameOrInstance)));
506+
throw new InvalidArgumentException(sprintf('Doctrine::haveInRepository expects a class name or instance as first argument, got "%s" instead', gettype($classNameOrInstance)));
507507
}
508508

509509
// Flush all changes to database and then refresh all entities. We need this because

0 commit comments

Comments
 (0)