Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/9.0' into 90/verifyAndOptimizeFl…
Browse files Browse the repository at this point in the history
…owQuery
  • Loading branch information
mhsdesign committed Nov 5, 2023
2 parents 3c2e461 + 01db7d3 commit ba37e4a
Show file tree
Hide file tree
Showing 62 changed files with 261 additions and 534 deletions.
2 changes: 2 additions & 0 deletions .composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
},
"suggest": {
},
"provide": {
},
"scripts": {
"lint:phpcs-psr12": "../../bin/phpcs --colors --standard=PSR12 ./Neos.ContentGraph.DoctrineDbalAdapter/src ./Neos.ContentGraph.PostgreSQLAdapter/src ./Neos.ContentRepository.BehavioralTests/Classes ./Neos.ContentRepository.TestSuite/Classes ./Neos.ContentRepository.Core/Classes ./Neos.Neos/Classes",
"lint:phpcs": [
Expand Down
2 changes: 1 addition & 1 deletion Neos.ContentGraph.DoctrineDbalAdapter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Event Sourced Content Repository - Content Graph Doctrine DBAL Adapter

This repository is a **read-only subsplit** of a package that is part of the [Content Repository Development Collection](https://github.com/neos/contentrepository-development-collection)
This repository is a **read-only subsplit** of a package that is part of the [Neos Development Collection](https://github.com/neos/neos-development-collection)

Contribute
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId;
use Neos\ContentGraph\DoctrineDbalAdapter\Tests\Behavior\Features\Bootstrap\Helpers\TestingNodeAggregateId;
use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteRuntimeVariables;
use Neos\ContentRepositoryRegistry\Infrastructure\DbalClient;
use Neos\ContentRepositoryRegistry\DoctrineDbalClient\DoctrineDbalClient;
use Neos\Error\Messages\Error;
use Neos\Error\Messages\Result;
use PHPUnit\Framework\Assert;
Expand All @@ -39,7 +39,7 @@ trait ProjectionIntegrityViolationDetectionTrait
{
use CRTestSuiteRuntimeVariables;

private DbalClient $dbalClient;
private DoctrineDbalClient $dbalClient;

protected Result $lastIntegrityViolationDetectionResult;

Expand All @@ -60,7 +60,7 @@ protected function getTableNamePrefix(): string

public function setupDbalGraphAdapterIntegrityViolationTrait()
{
$this->dbalClient = $this->getObject(DbalClient::class);
$this->dbalClient = $this->getObject(DoctrineDbalClient::class);
}

/**
Expand Down Expand Up @@ -322,9 +322,9 @@ public function iRunIntegrityViolationDetection(): void
*/
public function iExpectTheIntegrityViolationDetectionResultToContainExactlyNErrors(int $expectedNumberOfErrors): void
{
Assert::assertSame(
Assert::assertCount(
$expectedNumberOfErrors,
count($this->lastIntegrityViolationDetectionResult->getErrors()),
$this->lastIntegrityViolationDetectionResult->getErrors(),
'Errors were: ' . implode(', ', array_map(fn (Error $e) => $e->render(), $this->lastIntegrityViolationDetectionResult->getErrors()))
);
}
Expand Down
2 changes: 1 addition & 1 deletion Neos.ContentGraph.DoctrineDbalAdapter/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "GPL-3.0+",
"require": {
"neos/contentrepository-core": "*",
"neos/contentrepository-core": "self.version",
"doctrine/dbal": "*",
"doctrine/migrations": "*"
},
Expand Down
10 changes: 10 additions & 0 deletions Neos.ContentGraph.PostgreSQLAdapter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Event Sourced Content Repository - Content Graph PostgreSQL Adapter

This repository is a **read-only subsplit** of a package that is part of the [Neos Development Collection](https://github.com/neos/neos-development-collection)

Contribute
----------

If you want to contribute to the Event Sourced Content Repository, please have a look at
https://github.com/neos/neos-development-collection (Branch 9.0) - it is the repository
used for development and all pull requests should go into it.
2 changes: 1 addition & 1 deletion Neos.ContentGraph.PostgreSQLAdapter/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "GPL-3.0+",
"require": {
"neos/contentrepository-core": "*",
"neos/contentrepository-core": "self.version",
"doctrine/dbal": "*",
"doctrine/migrations": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion Neos.ContentRepository.BehavioralTests/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"GPL-3.0-or-later"
],
"require": {
"neos/contentrepository-core": "*"
"neos/contentrepository-core": "self.version"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion Neos.ContentRepository.Export/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"require": {
"php": ">=8.2",
"neos/contentrepository-core": "*",
"neos/contentrepository-core": "self.version",
"league/flysystem": "^3",
"webmozart/assert": "^1.11"
},
Expand Down
4 changes: 2 additions & 2 deletions Neos.ContentRepository.LegacyNodeMigration/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
],
"require": {
"php": ">=8.2",
"neos/contentrepository-core": "*",
"neos/contentrepository-export": "*",
"neos/contentrepository-core": "self.version",
"neos/contentrepository-export": "self.version",
"league/flysystem": "^3"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions Neos.ContentRepository.NodeAccess/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"GPL-3.0-or-later"
],
"require": {
"neos/contentrepository-core": "~9.0",
"neos/flow": "*"
"neos/flow": "*",
"neos/contentrepository-core": "self.version"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 1 addition & 3 deletions Neos.ContentRepository.NodeMigration/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"GPL-3.0-or-later"
],
"require": {
"neos/contentrepository-core": "*"
},
"require-dev": {
"neos/contentrepository-core": "self.version"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 1 addition & 3 deletions Neos.ContentRepository.StructureAdjustment/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"GPL-3.0-or-later"
],
"require": {
"neos/contentrepository-core": "*"
},
"require-dev": {
"neos/contentrepository-core": "self.version"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions Neos.ContentRepository.TestSuite/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"GPL-3.0-or-later"
],
"require": {
"neos/contentrepository-core": "*",
"neos/contentrepository-structureadjustment": "*",
"neos/contentrepository-nodemigration": "*",
"neos/utility-arrays": "*",
"neos/contentrepository-core": "self.version",
"neos/contentrepository-structureadjustment": "self.version",
"neos/contentrepository-nodemigration": "self.version",
"behat/behat": "^3.5",
"phpunit/phpunit": "^9.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Neos\ContentRepositoryRegistry\Infrastructure;
namespace Neos\ContentRepositoryRegistry\DoctrineDbalClient;

/*
* This file is part of the Neos.ContentGraph.DoctrineDbalAdapter package.
* This file is part of the Neos.ContentRepositoryRegistry.DoctrineDbalClient package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand All @@ -25,7 +25,7 @@
*
* @Flow\Scope("singleton")
*/
class DbalClient implements DbalClientInterface
class DoctrineDbalClient implements DbalClientInterface
{
/**
* @Flow\InjectConfiguration(package="Neos.Flow", path="persistence.backendOptions")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Neos_ContentGraph_DoctrineDbalAdapter_ProcessedEvents:
frontend: Neos\Cache\Frontend\VariableFrontend
backend: Neos\Cache\Backend\FileBackend
backendOptions:
defaultLifetime: 400
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Neos\ContentRepository\Core\Infrastructure\DbalClientInterface:
className: 'Neos\ContentRepositoryRegistry\DoctrineDbalClient\DoctrineDbalClient'

Neos\ContentGraph\DoctrineDbalAdapter\DoctrineDbalContentGraphProjectionFactory:
scope: singleton
factoryObjectName: 'Neos\ContentRepositoryRegistry\Infrastructure\GenericObjectFactory'
arguments:
1:
value: 'Neos\ContentGraph\DoctrineDbalAdapter\DoctrineDbalContentGraphProjectionFactory'
2:
object: 'Neos\ContentRepository\Core\Infrastructure\DbalClientInterface'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Neos:
ContentRepositoryRegistry:
presets:
'default':
projections:
# NOTE: the following name must be stable, because we use it f.e. in Neos UI to register
# catchUpHooks for content cache flushing
'Neos.ContentRepository:ContentGraph':
factoryObjectName: Neos\ContentGraph\DoctrineDbalAdapter\DoctrineDbalContentGraphProjectionFactory
22 changes: 22 additions & 0 deletions Neos.ContentRepositoryRegistry.DoctrineDbalClient/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "neos/contentrepositoryregistry-doctrinedbalclient",
"type": "neos-package",
"description": "Doctrine DBAL client for the Neos Content Repository Registry",
"license": [
"GPL-3.0-or-later"
],
"require": {
"neos/flow": "^9.0",
"neos/contentrepository-core": "self.version",
"neos/contentrepositoryregistry": "self.version",
"neos/contentgraph-doctrinedbaladapter": "self.version"
},
"provide": {
"neos/contentrepositoryregistry-storageclient": "self.version"
},
"autoload": {
"psr-4": {
"Neos\\ContentRepositoryRegistry\\DoctrineDbalClient\\": "Classes"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
declare(strict_types=1);

namespace Neos\ContentRepositoryRegistry\Infrastructure;
namespace Neos\ContentRepositoryRegistry\PostgresDbalClient;

/*
* This file is part of the Neos.ContentRepositoryRegistry package.
* This file is part of the Neos.ContentRepositoryRegistry.PostgresDbalClient package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand All @@ -21,7 +21,7 @@
use Neos\Flow\Annotations as Flow;

/**
* The Doctrine DBAL client adapter
* The PostgreSQL-optimized Doctrine DBAL client adapter
*
* @Flow\Scope("singleton")
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Neos_ContentGraph_PostgreSQLAdapter_ProcessedEvents:
frontend: Neos\Cache\Frontend\VariableFrontend
backend: Neos\Cache\Backend\FileBackend
backendOptions:
defaultLifetime: 400
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Neos\ContentGraph\PostgreSQLAdapter\HypergraphProjectionFactory:
scope: singleton
factoryObjectName: Neos\ContentRepositoryRegistry\Infrastructure\GenericObjectFactory
arguments:
1:
value: Neos\ContentGraph\PostgreSQLAdapter\HypergraphProjectionFactory
2:
object: 'Neos\ContentRepositoryRegistry\PostgresDbalClient\PostgresDbalClient'
22 changes: 22 additions & 0 deletions Neos.ContentRepositoryRegistry.PostgresDbalClient/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "neos/contentrepositoryregistry-postgresdbalclient",
"type": "neos-package",
"description": "PostgreSQL-optimized Doctrine DBAL client for the Neos Content Repository Registry",
"license": [
"GPL-3.0-or-later"
],
"require": {
"neos/flow": "^9.0",
"neos/contentrepository-core": "self.version",
"neos/contentrepositoryregistry": "self.version",
"neos/contentgraph-postgresqladapter": "self.version"
},
"provide": {
"neos/contentrepositoryregistry-storageclient": "self.version"
},
"autoload": {
"psr-4": {
"Neos\\ContentRepositoryRegistry\\PostgresDbalClient\\": "Classes"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?php
declare(strict_types=1);

namespace Neos\ContentRepositoryRegistry\TestSuite\Behavior;

/*
* This file is part of the Neos.ContentRepository.TestSuite package.
* This file is part of the Neos.ContentRepositoryRegistry.TestSuite package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
Expand All @@ -10,10 +13,6 @@
* source code.
*/

declare(strict_types=1);

namespace Neos\ContentRepositoryRegistry\TestSuite\Behavior;

use Doctrine\DBAL\Connection;
use Neos\ContentRepository\Core\ContentRepository;
use Neos\ContentRepository\Core\Factory\ContentRepositoryId;
Expand All @@ -24,7 +23,7 @@
use Neos\EventStore\EventStoreInterface;

/**
* The node creation trait for behavioral tests
* The CR registry subject provider trait for behavioral tests
*/
trait CRRegistrySubjectProvider
{
Expand Down
18 changes: 18 additions & 0 deletions Neos.ContentRepositoryRegistry.TestSuite/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "neos/contentrepositoryregistry-testsuite",
"type": "neos-package",
"description": "Testing support suite for the Neos Content Repository Registry. Contains fixtures and helpers for all layers of tests",
"license": [
"GPL-3.0-or-later"
],
"require": {
"neos/contentrepository-core": "self.version",
"neos/contentrepositoryregistry": "self.version",
"neos/behat": "^9.0"
},
"autoload": {
"psr-4": {
"Neos\\ContentRepositoryRegistry\\TestSuite\\": "Classes"
}
}
}
6 changes: 0 additions & 6 deletions Neos.ContentRepositoryRegistry/Configuration/Caches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@ Neos_ContentGraph_DoctrineDbalAdapter_ProcessedEvents:
backend: Neos\Cache\Backend\FileBackend
backendOptions:
defaultLifetime: 400

Neos_ContentGraph_PostgreSQLAdapter_ProcessedEvents:
frontend: Neos\Cache\Frontend\VariableFrontend
backend: Neos\Cache\Backend\FileBackend
backendOptions:
defaultLifetime: 400
Loading

0 comments on commit ba37e4a

Please sign in to comment.