idct / sonata-admin-mongodb-bundle
Symfony Sonata / Integrate Doctrine MongoDB ODM into the SonataAdminBundle
Package info
github.com/ideaconnect/sonata-admin-mongodb-bundle
Type:symfony-bundle
pkg:composer/idct/sonata-admin-mongodb-bundle
Requires
- php: ^8.4
- ext-mongodb: *
- doctrine/collections: ^2.0
- doctrine/mongodb-odm: ^2.6
- doctrine/mongodb-odm-bundle: ^5.0
- doctrine/persistence: ^4.0
- sonata-project/admin-bundle: ^4.39
- sonata-project/exporter: ^3.0
- sonata-project/form-extensions: ^2.0
- symfony/config: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/doctrine-bridge: ^7.4 || ^8.0
- symfony/form: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
- symfony/property-access: ^7.4 || ^8.0
- twig/twig: ^3.0
Requires (Dev)
- doctrine/data-fixtures: ^2.0
- friendsofphp/php-cs-fixer: ^3.95
- matthiasnoback/symfony-config-test: ^6.1
- matthiasnoback/symfony-dependency-injection-test: ^6.2
- phpstan/extension-installer: ^1.1
- phpstan/phpdoc-parser: ^1.0
- phpstan/phpstan: ^1.0 || ^2.0
- phpstan/phpstan-phpunit: ^1.0 || ^2.0
- phpstan/phpstan-strict-rules: ^1.0 || ^2.0
- phpstan/phpstan-symfony: ^1.0 || ^2.0
- phpunit/phpunit: ^11.5.38 || ^12.3.10
- rector/rector: ^1.1 || ^2.0
- sonata-project/block-bundle: ^5.0
- symfony/browser-kit: ^7.4 || ^8.0
- symfony/css-selector: ^7.4 || ^8.0
- symfony/dom-crawler: ^7.4 || ^8.0
- symfony/panther: ^2.4
- symfony/security-acl: ^3.3.4
- symfony/twig-bridge: ^7.4 || ^8.0
Conflicts
README
Integrate Doctrine MongoDB ODM into the Sonata Admin Bundle.
Started as a fork of sonata-project/doctrine-mongodb-admin-bundle, modernised for PHP 8.4+, Symfony 7.3 / 7.4 / 8.0, doctrine/persistence 3 & 4, doctrine/mongodb-odm 2.6+ and doctrine/mongodb-odm-bundle 5.x.
⚠️ Heads up: this fork will diverge from upstream
This package is not a drop-in replacement for
sonata-project/doctrine-mongodb-admin-bundleand will not stay backwards-compatible with it.The 5.x line already breaks BC in places upstream has not (private
ModelManager::getDocumentManager, immutable-ishProxyQuery, dropped__callmagic, stricter type guards inModelFilter, etc.), and future releases will keep diverging — extending the public API, replacing parts that aren't worth keeping, and dropping things upstream still ships. If you need an exact upstream-compatible integration, stay onsonata-project/doctrine-mongodb-admin-bundle. If you want the modernized base and don't mind moving with us, you're in the right place.
| Branch | Github Actions | Code Coverage |
|---|---|---|
| 5.x |
Installation
composer require idct/sonata-admin-mongodb-bundle
Documentation
Upstream Sonata documentation still applies for the public API and configuration shape: docs.sonata-project.org/projects/SonataDoctrineMongoDBAdminBundle.
Fork-specific changes (modernisation, performance and correctness fixes, BC notes for the 5.x cut) are tracked in BEST_VERSION.md and CHANGELOG.md.
Running the tests locally
The test suite needs MongoDB and (for the Panther functional tests) a Firefox WebDriver. Both are wired up via docker-compose.yml:
docker compose up -d
PANTHER_SELENIUM_HOST=http://127.0.0.1:4444/wd/hub make test
Selenium also exposes noVNC at http://127.0.0.1:7900 (password secret) if you want to watch
the browser drive the suite.
Support
For bugs or feature ideas in this fork, please open an issue on the fork's GitHub repository.
For questions about Sonata Admin in general, the upstream StackOverflow tag remains the best place.
License
This package is available under the MIT license. The original copyright by Thomas Rabaix and every upstream contributor is preserved; see composer.json for the complete author roster.