Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f7b1b8e
Fix duplicate slug in .doctrine-project.json (#2816)
GromNaN Sep 2, 2025
0530248
Update test using deprecated field type 'integer' (#2811)
GromNaN Sep 2, 2025
fb83e3a
Format evaled code with heredoc (#2812)
GromNaN Sep 2, 2025
6610af7
Enable creation of the next minor release branch when a new release i…
GromNaN Sep 2, 2025
1c2a146
Convert the value of the "version" field using its known type (#2813)
GromNaN Sep 2, 2025
6072551
Enable optimistic locking using an `ObjectId` as version field (#2815)
GromNaN Sep 3, 2025
e3352c0
Merge release 2.12.1 into 2.13.x (#2819)
GromNaN Sep 3, 2025
0642c8b
Bump actions/setup-python from 5 to 6 (#2821)
dependabot[bot] Sep 10, 2025
9a0e994
PHPORM-381 Add class metadata for vector search indexes (#2820)
GromNaN Sep 10, 2025
ace0396
PHPORM-382 Add $vectorSearch stage to the aggregation builder (#2822)
GromNaN Sep 10, 2025
2a9118a
Deprecate Stage::search() because the $search stage must be the first…
GromNaN Sep 14, 2025
c813a57
Support symfony UUID (#2826)
alcaeus Sep 24, 2025
3dfba27
Add test on Atlas Search features using an MongoDB Atlas Local Docker…
GromNaN Sep 25, 2025
eff9818
Ignore PHPStan errors for unused properties in document classes (#2835)
GromNaN Sep 25, 2025
e6c0b0e
Merge branch '2.12.x' into 2.13.x
GromNaN Sep 25, 2025
cb1f717
Exclude non-essential fields from the archive (#2837)
GromNaN Sep 26, 2025
7abdc70
Fix return type of compound search operators (#2836)
GromNaN Sep 26, 2025
00d74f5
Merge release 2.12.2 into 2.13.x (#2838)
GromNaN Sep 26, 2025
07a30c5
Prepare field names for search indexes and vector search indexes and …
GromNaN Sep 29, 2025
594daf8
Always ignore missing generic type for `ClassMetadata` and `DocumentP…
GromNaN Sep 30, 2025
18a3c34
Use null coalescing operator `??` and `??=` (#2843)
GromNaN Sep 30, 2025
f22d8ec
Add SchemaManager::waitForSearchIndex() (#2830)
GromNaN Sep 30, 2025
d162d2d
Use double-quotes for array-shape annotations, as PHPStorm does not u…
GromNaN Oct 2, 2025
7a85038
Upgrade to squizlabs/php_codesniffer: 4 (#2845)
GromNaN Oct 2, 2025
7765d83
Bump doctrine/.github from 7.3.0 to 8.0.0 (#2847)
dependabot[bot] Oct 6, 2025
0529a48
Support dot syntax when preparing nested query values (#2827)
alcaeus Oct 6, 2025
3acd6da
Add an assertion on missing search index when a `$search` or `$vector…
GromNaN Oct 10, 2025
e43c2d1
Bump doctrine/.github from 8.0.0 to 10.1.0 (#2852)
dependabot[bot] Oct 14, 2025
6a544a7
Fix test on Binary vector (#2853)
GromNaN Oct 14, 2025
2b61983
Document methods Type::closureToMongo and closureToPHP (#2855)
GromNaN Oct 15, 2025
acd69a8
Documentation for Vector Search (#2846)
GromNaN Oct 15, 2025
16cfe5a
Use docs-builder package for building docs (#2849)
paulinevos Oct 16, 2025
d820746
Validate Query Vector in $vectorSearch stage builder (#2857)
GromNaN Oct 16, 2025
2edcd25
Add an example for using the compound search operator (#2856)
GromNaN Oct 16, 2025
fa8affc
Add field type for binary vectors (#2854)
GromNaN Oct 16, 2025
c73060e
Randomize the collection name to avoid collisions when search indexes…
GromNaN Oct 17, 2025
216841e
Merge pull request #2861 from doctrine/2.12.x
GromNaN Oct 17, 2025
3900354
Update .doctrine-project.json for 1.13.0 (#2860)
GromNaN Oct 19, 2025
3e973b8
Bump doctrine/.github from 10.1.0 to 12.0.0 (#2862)
dependabot[bot] Oct 20, 2025
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
30 changes: 10 additions & 20 deletions .doctrine-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,86 +6,79 @@
"docsSlug": "doctrine-mongodb-odm",
"versions": [
{
"name": "2.13",
"branchName": "2.13.x",
"name": "2.14",
"branchName": "2.14.x",
"slug": "latest",
"upcoming": true
},
{
"name": "2.12",
"branchName": "2.12.x",
"slug": "latest",
"name": "2.13",
"branchName": "2.13.x",
"slug": "2.13",
"current": true
},
{
"name": "2.12",
"slug": "2.12",
"maintained": false
},
{
"name": "2.11",
"branchName": "2.11.x",
"slug": "2.11",
"maintained": false
},
{
"name": "2.10",
"branchName": "2.10.x",
"slug": "2.10",
"maintained": false
},
{
"name": "2.9",
"branchName": "2.9.x",
"slug": "2.9",
"maintained": false
},
{
"name": "2.8",
"branchName": "2.8.x",
"slug": "2.8",
"maintained": false
},
{
"name": "2.7",
"branchName": "2.7.x",
"slug": "2.7",
"maintained": false
},
{
"name": "2.6",
"branchName": "2.6.x",
"slug": "2.6",
"maintained": false
},
{
"name": "2.5",
"branchName": "2.5.x",
"slug": "2.5",
"maintained": false
},
{
"name": "2.4",
"branchName": "2.4.x",
"slug": "2.4",
"maintained": false
},
{
"name": "2.3",
"branchName": "2.3.x",
"slug": "2.3",
"maintained": false
},
{
"name": "2.2",
"branchName": "2.2.x",
"slug": "2.2",
"maintained": false
},
{
"name": "2.1",
"branchName": "2.1.x",
"slug": "2.1",
"maintained": false
},
{
"name": "2.0",
"branchName": "2.0.x",
"slug": "2.0",
"maintained": false
},
Expand All @@ -97,19 +90,16 @@
},
{
"name": "1.2",
"branchName": "1.2.x",
"slug": "1.2",
"maintained": false
},
{
"name": "1.1",
"branchName": "1.1.x",
"slug": "1.1",
"maintained": false
},
{
"name": "1.0",
"branchName": "1.0.x",
"slug": "1.0",
"maintained": false
}
Expand Down
14 changes: 5 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
* text=auto eol=lf

# Exclude non-essential files from dist
/.github export-ignore
/.* export-ignore
/*.dist export-ignore
/.neon export-ignore
/docs export-ignore
/benchmark export-ignore
/phpbench.json export-ignore
/tests export-ignore
/tools export-ignore
/.doctrine-project.json export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.gitmodules export-ignore
/.scrutinizer.yml export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
99 changes: 99 additions & 0 deletions .github/workflows/atlas-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: "Atlas CI"

on:
pull_request:
branches:
- "*.x"
- "feature/*"
push:

jobs:
atlas-local:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
php-version:
- "8.4"
symfony:
- "stable"
proxy:
- "lazy-ghost"
include:
# Test with ProxyManager
- php-version: "8.1"
symfony: "6.4"
proxy: "proxy-manager"
os: "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v5"
with:
fetch-depth: 2

- name: "Create MongoDB Atlas Local"
run: |
docker run --name mongodb -p 27017:27017 --detach mongodb/mongodb-atlas-local:8.2
until docker exec --tty mongodb mongosh --eval "db.runCommand({ ping: 1 })"; do
sleep 1
done
until docker exec --tty mongodb mongosh --eval "db.createCollection('connection_test') && db.getCollection('connection_test').createSearchIndex({mappings:{dynamic: true}})"; do
sleep 1
done

- name: "Show MongoDB server status"
run: |
docker exec --tty mongodb mongosh --eval "db.runCommand({ serverStatus: 1 })"

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-version }}
extensions: "mongodb, bcmath"
key: "extcache-v1"

- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: "pecl"
extensions: "mongodb, bcmath"
coverage: "none"
ini-values: "zend.assertions=1"

- name: "Show driver information"
run: "php --ri mongodb"

# Not used, skip transient dependencies
- name: "Remove phpbench/phpbench"
run: composer remove --no-update --dev phpbench/phpbench

- name: "Configure Symfony ${{ matrix.symfony }}"
if: "${{ matrix.symfony != 'stable' }}"
run: |
composer config minimum-stability dev
# update symfony deps
composer require --no-update symfony/console:^${{ matrix.symfony }}
composer require --no-update symfony/var-dumper:^${{ matrix.symfony }}
composer require --no-update --dev symfony/cache:^${{ matrix.symfony }}

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "highest"
composer-options: "--prefer-dist"

- name: "Run PHPUnit with Atlas Local"
run: "vendor/bin/phpunit --group atlas"
env:
DOCTRINE_MONGODB_SERVER: "mongodb://127.0.0.1:27017/?directConnection=true"
USE_LAZY_GHOST_OBJECTS: ${{ matrix.proxy == 'lazy-ghost' && '1' || '0' }}
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@7.3.0"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@12.0.0"
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
composer-options: "--prefer-dist"

- name: "Install latest Python version"
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.13'

Expand All @@ -159,7 +159,7 @@ jobs:
topology: ${{ matrix.topology }}

- name: "Run PHPUnit"
run: "vendor/bin/phpunit"
run: "vendor/bin/phpunit --exclude-group=atlas"
env:
DOCTRINE_MONGODB_SERVER: ${{ steps.setup-mongodb.outputs.cluster-uri }}
USE_LAZY_GHOST_OBJECTS: ${{ matrix.proxy == 'lazy-ghost' && '1' || '0' }}"
Expand Down
30 changes: 3 additions & 27 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,6 @@ on:
- docs/**

jobs:
validate-with-guides:
name: "Validate documentation with phpDocumentor/guides"
runs-on: "ubuntu-24.04"

steps:
- name: "Checkout code"
uses: "actions/checkout@v5"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.3"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
working-directory: "docs"
dependency-versions: "highest"

- name: "Add orphan metadata where needed"
run: |
printf '%s\n\n%s\n' ":orphan:" "$(cat docs/en/sidebar.rst)" > docs/en/sidebar.rst
printf '%s\n\n%s\n' ":orphan:" "$(cat docs/en/reference/annotations-reference.rst)" > docs/en/reference/annotations-reference.rst

- name: "Run guides-cli"
run: "docs/vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'No template found for rendering directive' | ( ! grep WARNING )"
documentation:
name: "Generate documentation"
uses: "doctrine/.github/.github/workflows/[email protected]"
4 changes: 3 additions & 1 deletion .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
uses: "doctrine/.github/.github/workflows/[email protected]"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
use-next-minor-as-default-branch: true
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ on:
jobs:
json-validate:
name: "Validate JSON schema"
uses: "doctrine/.github/.github/workflows/website-schema.yml@7.3.0"
uses: "doctrine/.github/.github/workflows/website-schema.yml@12.0.0"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
docs/output
tools/sandbox/Proxies/*
tools/sandbox/Hydrators/*
tools/sandbox/PersistentCollections/*
Expand Down
5 changes: 5 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ The `Doctrine\ODM\MongoDB\Id\AbstractIdGenerator` class has been removed. Custom
ID generators must implement the `Doctrine\ODM\MongoDB\Id\IdGenerator`
interface.

The `Doctrine\ODM\MongoDB\Id\UuidGenerator` class has been removed. Use a custom
generator to generate string UUIDs. For more efficient storage of UUIDs, use the
`Doctrine\ODM\MongoDB\Types\BinaryUuidType` type in combination with the
`Doctrine\ODM\MongoDB\Id\SymfonyUuidGenerator` generator.

## Metadata
The `Doctrine\ODM\MongoDB\Mapping\ClassMetadata` class has been marked final and
will no longer be extendable.
Expand Down
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
{ "name": "Ion Bazan", "email": "[email protected]" },
{ "name": "Fran Moreno", "email": "[email protected]" }
],
"scripts": {
"docs": "composer update -d docs && ./docs/vendor/bin/build-docs.sh @additional_args"
},
"require": {
"php": "^8.1",
"ext-mongodb": "^1.21 || ^2.0",
Expand All @@ -40,16 +43,17 @@
"require-dev": {
"ext-bcmath": "*",
"doctrine/annotations": "^1.12 || ^2.0",
"doctrine/coding-standard": "^12.0",
"doctrine/coding-standard": "^14.0",
"doctrine/orm": "^3.2",
"jmikola/geojson": "^1.0",
"phpbench/phpbench": "^1.0.0",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^10.4",
"squizlabs/php_codesniffer": "^3.5",
"symfony/cache": "^5.4 || ^6.0 || ^7.0"
"phpunit/phpunit": "^10.5.58",
"squizlabs/php_codesniffer": "^4",
"symfony/cache": "^5.4 || ^6.0 || ^7.0",
"symfony/uid": "^5.4 || ^6.0 || ^7.0"
},
"conflict": {
"doctrine/annotations": "<1.12 || >=3.0"
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3.8'

services:
mongodb-atlas-local:
image: mongodb/mongodb-atlas-local
ports:
- "27018:27017"
2 changes: 1 addition & 1 deletion docs/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require-dev": {
"phpdocumentor/guides-cli": "^1.2"
"doctrine/docs-builder": "^1.0.3"
}
}
Loading
Loading