Skip to content

Commit f0b5f7a

Browse files
committed
feat(deps): integrate resetter bundle
1 parent c6a225e commit f0b5f7a

File tree

8 files changed

+172
-180
lines changed

8 files changed

+172
-180
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
"phpunit/php-code-coverage": "^10.1",
6969
"phpunit/phpcov": "^9.0",
7070
"phpunit/phpunit": "^10.5",
71-
"pixelfederation/doctrine-resettable-em-bundle": "^7.0|^8.0",
7271
"ramsey/uuid": "^4.7",
7372
"rector/rector": "^2.0",
7473
"slevomat/coding-standard": "^8.14",
7574
"squizlabs/php_codesniffer": "^3.8",
75+
"swoole-bundle/resetter-bundle": "^1.0",
7676
"swoole-bundle/z-engine": "^8.2.1|^8.3.0",
7777
"swoole/ide-helper": "^6.0.0",
7878
"symfony/debug-bundle": "^6.4|^7.2",
@@ -100,7 +100,7 @@
100100
"doctrine/orm": "For using Entity Manager Handler",
101101
"symfony/messenger": "For using Symfony Messenger Swoole Task Transport.",
102102
"upscale/swoole-blackfire": "To enable Blackfire profiling",
103-
"pixelfederation/doctrine-resettable-em-bundle": "To be able to recover Doctrine Entity Managers from errors",
103+
"swoole-bundle/resetter-bundle": "To be able to recover Doctrine Entity Managers from errors",
104104
"symfony/error-handler": "To use Symfony Error Handler",
105105
"swoole-bundle/z-engine": "To be able to use coroutines."
106106
},

composer.lock

Lines changed: 157 additions & 165 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/configuration-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ them to the service pools for each resettable service. That means, there is no n
313313
Sometimes there are special cases that emerge for using Symfony with coroutines turned on, like pinging DBAL connections
314314
before the first query on each request (because the connections may be already closed, btw this bundle already has
315315
a solution for this, using connection pingers
316-
from [pixelfederation/doctrine-resettable-em-bundle](https://github.com/pixelfederation/doctrine-resettable-em-bundle)).
316+
from [swoole-bundle/resetter-bundle](https://github.com/symfony-swoole/resetter-bundle)).
317317

318318
For special cases like this, you can implement a custom service resetter. The resetter has to implement
319319
the `SwooleBundle\SwooleBundle\Bridge\Symfony\Container\Resetter` interface and has to be registered in the SF container

docs/swoole-doctrine.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ However this approach is quite simple and doesn't contain error handling logic f
77
will get closed because of an error.
88

99
For using Doctrine with this bundle in production, it is recommended to use the
10-
[Doctrine resettable entity manager bundle](https://github.com/pixelfederation/doctrine-resettable-em-bundle).
10+
[Resetter bundle](https://github.com/symfony-swoole/resetter-bundle).
1111

1212
This bundle will do the same as the handler mentioned above, but it does this for all the entity managers registered
1313
in the application. It automatically wraps all of them and instead only clearing the manager, it will also reset the
1414
entity manager if it got closed during request processing.
1515

1616
## How to use?
1717

18-
You need to install the doctrine-resettable-em-bundle
18+
You need to install the resetter-bundle
1919

2020
```shell script
21-
composer require pixelfederation/doctrine-resettable-em-bundle
21+
composer require swoole-bundle/resetter-bundle
2222
```
2323

2424
After that, you need to activate the bundle in `bundles.php`.
2525

2626
```php
2727
return [
2828
// ...
29-
PixelFederation\DoctrineResettableEmBundle\PixelFederationDoctrineResettableEmBundle::class => ['all' => true],
29+
SwooleBundle\ResetterBundle\SwooleBundleResetterBundle::class => ['all' => true],
3030
// ...
3131
];
3232
```
3333

34-
That's it! After that, all your entity managers will be able to handle all possibly occurring errors.
34+
That's it! After that, all your entity managers will be able to handle all possibly occurring errors.

src/Bridge/Doctrine/DBAL/ConnectionKeepAliveResetter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace SwooleBundle\SwooleBundle\Bridge\Doctrine\DBAL;
66

77
use Doctrine\DBAL\Connection;
8-
use PixelFederation\DoctrineResettableEmBundle\DBAL\Connection\DBALAliveKeeper;
8+
use SwooleBundle\ResetterBundle\DBAL\Connection\DBALAliveKeeper;
99
use SwooleBundle\SwooleBundle\Bridge\Symfony\Container\Resetter;
1010
use UnexpectedValueException;
1111

src/Bridge/Doctrine/DoctrineProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace SwooleBundle\SwooleBundle\Bridge\Doctrine;
66

77
use Assert\Assertion;
8-
use PixelFederation\DoctrineResettableEmBundle\DBAL\Connection\DBALPlatformAliveKeeper;
8+
use SwooleBundle\ResetterBundle\DBAL\Connection\DBALPlatformAliveKeeper;
99
use SwooleBundle\SwooleBundle\Bridge\Doctrine\DBAL\ConnectionKeepAliveResetter;
1010
use SwooleBundle\SwooleBundle\Bridge\Doctrine\ORM\EntityManagerResetter;
1111
use SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServices\CompileProcessor;

symfony.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@
6464
"tests/bootstrap.php"
6565
]
6666
},
67-
"pixelfederation/doctrine-resettable-em-bundle": {
68-
"version": "7.0.0"
69-
},
7067
"squizlabs/php_codesniffer": {
7168
"version": "3.8",
7269
"recipe": {
@@ -79,6 +76,9 @@
7976
"phpcs.xml.dist"
8077
]
8178
},
79+
"swoole-bundle/resetter-bundle": {
80+
"version": "1.0.0"
81+
},
8282
"symfony/console": {
8383
"version": "5.4",
8484
"recipe": {

tests/Fixtures/Symfony/TestAppKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
99
use Exception;
1010
use Generator;
11-
use PixelFederation\DoctrineResettableEmBundle\PixelFederationDoctrineResettableEmBundle;
11+
use SwooleBundle\ResetterBundle\SwooleBundleResetterBundle;
1212
use SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\SwooleBundle;
1313
use SwooleBundle\SwooleBundle\Bridge\Symfony\Kernel\CoroutinesSupportingKernel;
1414
use SwooleBundle\SwooleBundle\Tests\Fixtures\Symfony\CoverageBundle\CoverageBundle;
@@ -101,7 +101,7 @@ public function registerBundles(): Generator
101101
yield new TestBundle();
102102
yield new DoctrineBundle();
103103
yield new DoctrineMigrationsBundle();
104-
yield new PixelFederationDoctrineResettableEmBundle();
104+
yield new SwooleBundleResetterBundle();
105105

106106
if ($this->coverageEnabled) {
107107
yield new CoverageBundle();

0 commit comments

Comments
 (0)