Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
test:
name: "PHP ${{ matrix.php-version }}, Symfony ${{ matrix.symfony-version }}"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
env:
SYMFONY_REQUIRE: ${{matrix.symfony-require}}

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changelog
Version 3
=========

3.0.3
-----

* PHPCRExecutor no longer extends Doctrine\Common\DataFixtures\Executor\PHPCRExecutor because that class is final since `doctrine/data-fixtures` version 2.

3.0.2
-----

Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@
},
"require-dev": {
"ext-libxml": "*",
"doctrine/data-fixtures": "^2.0",
"doctrine/doctrine-bundle": "^2.0.3",
"doctrine/phpcr-odm": "^2.0",
"doctrine/orm": "^2.0 || ^3.0",
"jackalope/jackalope-doctrine-dbal": "^2.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.3.1 || ^5.0",
"phpcr/phpcr-shell": "^1.6",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-symfony": "^1.3",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-doctrine": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^9.5",
"symfony/asset": "^5.4 || ^6.0 || ^7.0",
"symfony/browser-kit": "^5.4 || ^6.0 || ^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Command/MigratorMigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MigratorMigrateCommand extends BaseCommand
private const NAME = 'doctrine:phpcr:migrator:migrate';

public function __construct(
private ContainerInterface $container
private ContainerInterface $container,
) {
parent::__construct(self::NAME);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Command/NodeDumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class NodeDumpCommand extends BaseDumpCommand

public function __construct(
private PhpcrConsoleDumperHelper $consoleDumper,
private int $dumpMaxLineLength
private int $dumpMaxLineLength,
) {
parent::__construct(self::NAME);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Command/RepositoryInitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class RepositoryInitCommand extends Command
private const NAME = 'doctrine:phpcr:repository:init';

public function __construct(
private InitializerManager $initializerManager
private InitializerManager $initializerManager,
) {
parent::__construct(self::NAME);
}
Expand Down
20 changes: 17 additions & 3 deletions src/DataFixtures/PHPCRExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Doctrine\Bundle\PHPCRBundle\DataFixtures;

use Doctrine\Bundle\PHPCRBundle\Initializer\InitializerManager;
use Doctrine\Common\DataFixtures\Executor\AbstractExecutor;
use Doctrine\Common\DataFixtures\Executor\PHPCRExecutor as BasePHPCRExecutor;
use Doctrine\Common\DataFixtures\Purger\PHPCRPurger;
use Doctrine\ODM\PHPCR\DocumentManagerInterface;
Expand All @@ -12,14 +13,17 @@
*
* @author Daniel Leech <[email protected]>
*/
final class PHPCRExecutor extends BasePHPCRExecutor
final class PHPCRExecutor extends AbstractExecutor
{
private BasePHPCRExecutor $wrappedExecutor;

public function __construct(
DocumentManagerInterface $dm,
?PHPCRPurger $purger = null,
private ?InitializerManager $initializerManager = null
private ?InitializerManager $initializerManager = null,
) {
parent::__construct($dm, $purger);
parent::__construct($dm);
$this->wrappedExecutor = new BasePHPCRExecutor($dm, $purger);
}

public function purge(): void
Expand All @@ -31,4 +35,14 @@ public function purge(): void
$this->initializerManager->initialize();
}
}

public function execute(array $fixtures, bool $append = false): void
{
$this->wrappedExecutor->execute($fixtures, $append);
}

public function getObjectManager(): DocumentManagerInterface
{
return $this->wrappedExecutor->getObjectManager();
}
}
2 changes: 1 addition & 1 deletion src/EventListener/JackalopeDoctrineDbalSchemaListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class JackalopeDoctrineDbalSchemaListener
{
public function __construct(
private RepositorySchema $schema
private RepositorySchema $schema,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/ManagerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
array $entityManagers,
string $defaultConnectionName,
string $defaultEntityManagerName,
string $proxyInterfaceName
string $proxyInterfaceName,
) {
$this->container = $container;

Expand Down
2 changes: 1 addition & 1 deletion src/OptionalCommand/ODM/LoadFixtureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class LoadFixtureCommand extends BaseCommand
private const NAME = 'doctrine:phpcr:fixtures:load';

public function __construct(
private InitializerManager $initializerManager
private InitializerManager $initializerManager,
) {
parent::__construct(self::NAME);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/App/Document/ReferrerDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Doctrine\ODM\PHPCR\Mapping\Attributes as PHPCR;

#[PHPCR\Document]
class ReferrerDocument
class ReferrerDocument implements \Stringable
{
#[PHPCR\Id(strategy: 'assigned')]
public string $id;
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/App/Document/TestDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Doctrine\ODM\PHPCR\Mapping\Attributes as PHPCR;

#[PHPCR\Document(referenceable: true)]
class TestDocument
class TestDocument implements \Stringable
{
#[PHPCR\Id]
public string $id;
Expand Down