Download the PHP package phpaml/data-mongodb without Composer
On this page you can find all versions of the php package phpaml/data-mongodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package data-mongodb
PHPAML Data MongoDB
The official MongoDB adapter for PHPAML Data.
Status:
0.1.0-alpha.5. The in-memory and official transports are tested against MongoDB 8.2 running as a replica set.
PHPAML Data · Changelog
Why this adapter?
PHPAML Data MongoDB brings typed PHPAML entities and a familiar query workflow to MongoDB while preserving MongoDB-specific behavior. It does not pretend that a document database is relational SQL.
- typed documents and collections;
- CRUD, filters, ordering, and pagination;
- explicit
objectIdand string identifier contracts; - entity validation inherited from PHPAML Data;
- transactions through MongoDB sessions;
- automatic discovery by PHPAML's
ConnectionManager; - deterministic in-memory transport for tests;
- topology-aware diagnostics.
Install
In a PHPAML project:
In any Composer project:
The official transport requires ext-mongodb and mongodb/mongodb.
Five-minute example
Supported portable operators are =, !=, >, >=, <, <=, and in.
Identifier contracts
#[DocumentId] uses MongoDB ObjectId by default. PHPAML exposes it as a
string in the entity and converts it for database operations. Use an explicit
string contract when the identifier must remain textual:
Platform relationship
The adapter is discovered automatically when it is present in Composer's
autoload. Use aml data:doctor to inspect the configured server and transaction
capabilities.
Current scope
This alpha intentionally does not claim SQL feature parity. Public document relations, declarative indexes, document migrations, and aggregation pipelines remain future work. Server transactions require a compatible MongoDB topology, normally a replica set.
Tests
License
PHPAML Data MongoDB is open-source software licensed under the MIT License.
All versions of data-mongodb with dependencies
ext-mongodb Version *
phpaml/data Version ^0.1@alpha || ^0.2@alpha
mongodb/mongodb Version ^2.0