Skip to content

Commit

Permalink
Merge branch '2.6.x' into 2.5.x-merge-up-into-2.6.x_tl7iY60u
Browse files Browse the repository at this point in the history
* 2.6.x: (32 commits)
  Deprecate DocumentRepository::clear (#2584)
  Support minDistance and maxDistance options for $near and $nearSphere operators (#2583)
  Remove API link from README
  Aggregation uses CursorInterface instead of Cursor
  Deprecate legacy commit options (#2578)
  Improve handling of circular type reference errors in Phpstan
  Add missing phpdoc
  Fix return type for overridden methods
  Fix phpstan errors
  Add sort operator to $search stage
  Bump actions/upload-artifact from 2 to 3 (#2572)
  Implement ObjectManager::isUninitializedObject (#2569)
  Use PHPUnit 10 (#2564)
  Test Symfony 7
  Support Symfony 7 by adding return types conditionally
  PHPCS is now happy with new syntax
  Stop suppressing UndefinedAttributeClass
  Drop support for old symfony components
  ReferenceMany: insert an empty array
  feat: Symfony 7 support
  ...
  • Loading branch information
alcaeus committed Nov 24, 2023
2 parents 92b0d2f + 99aa043 commit bb45088
Show file tree
Hide file tree
Showing 348 changed files with 15,261 additions and 8,372 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand All @@ -32,17 +30,27 @@ jobs:
- "server"
dependencies:
- "highest"
symfony-version:
- "stable"
include:
- dependencies: "lowest"
php-version: "7.4"
php-version: "8.1"
mongodb-version: "4.4"
driver-version: "1.11.0"
topology: "server"
symfony-version: "stable"
- topology: "sharded_cluster"
php-version: "8.2"
mongodb-version: "4.4"
driver-version: "stable"
dependencies: "highest"
symfony-version: "stable"
- topology: "server"
php-version: "8.2"
mongodb-version: "6.0"
driver-version: "stable"
dependencies: "highest"
symfony-version: "7"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -81,6 +89,17 @@ jobs:
- name: "Remove phpbench/phpbench"
run: composer remove --no-update --dev phpbench/phpbench

- name: "Configure Symfony v7@dev"
if: "${{ matrix.symfony-version == '7' }}"
run: |
composer config minimum-stability dev
# not yet ready for v7
composer remove --no-update --dev vimeo/psalm
# update symfony deps
composer require --no-update symfony/console:^7@dev
composer require --no-update symfony/var-dumper:^7@dev
composer require --no-update --dev symfony/cache:^7@dev
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.1"

services:
mongodb:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: "ramsey/composer-install@v2"

- name: "Upload composer.lock as build artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: composer.lock
path: composer.lock
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: "ramsey/composer-install@v2"

- name: "Upload composer.lock as build artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: composer.lock
path: composer.lock
Expand Down Expand Up @@ -82,10 +82,10 @@ jobs:
uses: "ramsey/composer-install@v2"

- name: "Upload composer.lock as build artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: composer.lock
path: composer.lock

- name: "Run a static analysis with vimeo/psalm"
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc) --php-version=${{ matrix.php-version }}"
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc)"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ vendor/
.phpunit.cache
.phpunit.result.cache
phpcs.xml
psalm.xml
1 change: 0 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ The Doctrine MongoDB ODM project is a library that provides a PHP object mapping

* [Website](https://www.doctrine-project.org/projects/mongodb-odm.html)
* [Documentation](https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/stable/)
* [API](https://www.doctrine-project.org/api/mongodb-odm/stable/)
* [Issue Tracker](https://github.com/doctrine/mongodb-odm/issues)
* [Releases](https://github.com/doctrine/mongodb-odm/releases)
15 changes: 15 additions & 0 deletions UPGRADE-2.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# UPGRADE FROM to 2.6

## PHP requirements

* MongoDB ODM 2.6 requires PHP 8.1 or newer. If you're not running PHP 8.1 yet,
it's recommended that you upgrade to PHP 8.1 before upgrading ODM.

## `Match` classes were removed

Minimal requirement of PHP 8.1 has rendered `Match` classes useless as one may
not use them for backward compatibility purposes as `match` is a reserved keyword.

Following classes were removed:
- `\Doctrine\ODM\MongoDB\Aggregation\Stage\GraphLookup\Match`
- `\Doctrine\ODM\MongoDB\Aggregation\Stage\Match`
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{ "name": "Fran Moreno", "email": "[email protected]" }
],
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1",
"ext-mongodb": "^1.11",
"doctrine/annotations": "^1.12 || ^2.0",
"doctrine/cache": "^1.11 || ^2.0",
Expand All @@ -33,19 +33,20 @@
"jean85/pretty-package-versions": "^1.3.0 || ^2.0.1",
"mongodb/mongodb": "^1.10.0",
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"symfony/console": "^3.4 || ^4.1 || ^5.0 || ^6.0",
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0",
"symfony/var-dumper": "^3.4 || ^4.1 || ^5.0 || ^6.0"
"symfony/var-dumper": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
"ext-bcmath": "*",
"doctrine/coding-standard": "^12.0",
"jmikola/geojson": "^1.0",
"phpbench/phpbench": "^1.0.0@dev",
"phpbench/phpbench": "^1.0.0",
"phpstan/phpstan": "^1.10.11",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5.5 || ^10.0.15",
"symfony/cache": "^4.4 || ^5.0 || ^6.0",
"phpunit/phpunit": "^10.4",
"squizlabs/php_codesniffer": "^3.5",
"symfony/cache": "^5.4 || ^6.0 || ^7.0",
"vimeo/psalm": "^5.9.0"
},
"suggest": {
Expand All @@ -59,7 +60,6 @@
"Doctrine\\ODM\\MongoDB\\Benchmark\\": "benchmark",
"Doctrine\\ODM\\MongoDB\\Tests\\": "tests/Doctrine/ODM/MongoDB/Tests",
"Documents\\": "tests/Documents",
"Documents74\\": "tests/Documents74",
"Documents81\\": "tests/Documents81",
"Stubs\\": "tests/Stubs",
"TestDocuments\\" :"tests/Doctrine/ODM/MongoDB/Tests/Mapping/Driver/fixtures"
Expand Down
Loading

0 comments on commit bb45088

Please sign in to comment.