laravel-mongodb: why it's not working in laravel 7.0 version
It gives a lots of issues
Problem 1 - mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system. - Installation request for mongodb/mongodb (locked at 1.6.0, required as ^1.6) -> satisfiable by mongodb/mongodb[1.6.0].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run php --ini
inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content. PS C:\xampp\htdocs\example> pecl install mongodb ^CTerminate batch job (Y/N)? y PS C:\xampp\htdocs\example> composer require jenssegers/mongodb:dev-develop ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.
Problem 1 - mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system. - mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb is missing from your system. - Installation request for mongodb/mongodb (locked at 1.6.0, required as ^1.6) -> satisfiable by mongodb/mongodb[1.6.0].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run php --ini
inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (6 by maintainers)
@Prince-254 you can use it with Laravel 7 if you change it to
"jenssegers/mongodb": "dev-develop",
in your composer.jsonI’ve done this and haven’t run into any issues yet.
On a side note, I’ve decided to abandon using MongoDB in my project alongside MySQL. It seemed like a good idea at the time but now that Mysql 5.7 / 8 has excellent support and performance dealing with and querying JSON fields, Laravel has built-in JSON field support inside Eloquent… and Mysql now supports GeoSpatial queries… it’s no longer worth the extra overhead and complexity of supporting MongoDB both from a Laravel point of view and from a server deployment point of view. I ported my code to a pure MySQL solution in the last two days and it was surprisingly painless and simple. I thank the developers of this excellent package over the years, it’s just no longer for me going forward.
@Smolevich Any estimation when 4.0 will be released? Is it a week away? a month? more? Thanks