Download the PHP package neos/contentgraph-postgresqladapter without Composer
On this page you can find all versions of the php package neos/contentgraph-postgresqladapter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neos/contentgraph-postgresqladapter
More information about neos/contentgraph-postgresqladapter
Files in neos/contentgraph-postgresqladapter
Package contentgraph-postgresqladapter
Short Description The PostgreSQL database backend for the Neos content graph
License GPL-3.0+
Informations about the package contentgraph-postgresqladapter
Event Sourced Content Repository - Content Graph PostgreSQL Adapter
The PostgreSQL database backend for the Neos content graph. It plugs into the Neos 9 content
repository as an alternative contentGraphProjection, replacing the default Doctrine/MariaDB
adapter.
⚠️ Alpha release ⚠️
This adapter is usable for experimentation, benchmarking and testing, but it is not production-ready. Database schema, projection internals and APIs may change without a migration or compatibility layer, and a few projection integrity checks are still unimplemented. Expect to reset and replay rather than upgrade in place.
The Doctrine/MariaDB adapter remains the default and the only production-supported backend for Neos 9. Running the
Neos.Neosprojections on top of PostgreSQL is still work in progress.For progress and open questions see neos-development-collection#3855.
Requirements
| PHP | 8.4+ (CI covers 8.4 and 8.5) |
| Neos | 9.2 — neos/contentrepository-core ~9.2 |
| PostgreSQL | a currently supported release; CI runs postgres:18.3 |
| Doctrine | doctrine/dbal ^3.1.4, doctrine/migrations |
How it works
This adapter implements a hypergraph model rather than the row-per-edge model of the
MariaDB/DBAL adapter. It is not simply the same schema in a different SQL dialect. A single
hierarchy relation row holds an ordered bigint[] of child node anchor points, and subtree
tags are stored as per-anchor JSONB on that same row. The projection therefore leans on
PostgreSQL-specific features throughout: jsonb, array column types, GIN indexes and
PL/pgSQL functions created during setUp().
Tables and functions are namespaced per content repository: cr_<crId>_p_graph_* for tables,
neoscr_<crId>_* for helper functions.
PostgresContentGraphProjectionFactory is the only @api class; everything else is
@internal and may change at any time.
Usage
Install the package into your Neos distribution:
Point Flow's persistence at PostgreSQL and swap the content graph projection of your content
repository preset, in Configuration/Settings.yaml:
The factory takes a Doctrine\DBAL\Connection as a constructor argument, so it also needs to
be wired in Configuration/Objects.yaml — this part is not optional:
Then create the schema and bring the projection up:
For an existing content repository the projection has to be rebuilt from the event stream
afterwards (./flow cr:projection:replayall, or ./flow help for the replay commands
available in your Neos version).
Development
Development happens in this repository. Issues and pull requests belong here, not in
neos/neos-development-collection.
The package has no standalone test harness: it is developed against a checked-out Neos
distribution, which provides the PHPUnit and Behat configuration. The setup below mirrors
.github/workflows/tests.yml, which is the authoritative
reference if anything drifts.
1. Get a Neos distribution as the Flow root
Clone neos/neos-development-distribution on the 9.2 branch and point FLOW_PATH_ROOT at
it.
2. Register this checkout as a path repository
3. Start PostgreSQL
4. Configure the Testing context
Write the same Settings.yaml and Objects.yaml blocks as in Usage — into
Configuration/Testing/ of the distribution, with dbname: 'neos_behaviour_testing'.
If your distribution does not use the Neos.Neos content repository preset, you additionally
have to declare the defaults it would otherwise provide (eventStore, subscriptionStore
and the propertyConverters); see the "Setup Flow configuration" step in the workflow for
the exact block.
5. Run the checks
All commands run from $FLOW_PATH_ROOT:
Note that this package ships no phpunit.xml, behat.yml, phpstan.neon, Makefile,
composer scripts or docker-compose file — all of that comes from the distribution checkout.
Its own unit coverage is a single test (Tests/Unit/Domain/Repository/NodeFactoryTest.php);
the Neos core Behat suite is the real safety net, so run it before opening a pull request.
Contributing
- Open pull requests against
main. CI also builds9.2-style maintenance branches, and can be triggered manually on any branch viagh workflow run tests.yml -r <branch-name>. - PHPStan level 8 and the Behat suite must pass.
- Contributions are licensed under GPL-3.0+, in line with the rest of Neos.
Links
- Forum: https://discuss.neos.io/
- Documentation: https://docs.neos.io/
- Content repository core: neos/neos-development-collection (branch 9.2+)
- PostgreSQL support status: neos-development-collection#3855
License
GPL-3.0+ — see LICENSE.
All versions of contentgraph-postgresqladapter with dependencies
doctrine/dbal Version ^3.1.4
doctrine/migrations Version *