Skip to content

why it's not working in laravel 7.0 version #2006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shailesh5152 opened this issue Apr 1, 2020 · 15 comments
Closed

why it's not working in laravel 7.0 version #2006

shailesh5152 opened this issue Apr 1, 2020 · 15 comments
Labels

Comments

@shailesh5152
Copy link

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.

@Smolevich
Copy link
Contributor

See #1974

@Smolevich
Copy link
Contributor

Check extension php -m

@shailesh5152
Copy link
Author

Check extension php -m
It's showing this

PS C:\xampp\htdocs\example> php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]

@Smolevich
Copy link
Contributor

@shailesh5152 install mongodb extension

@shailesh5152
Copy link
Author

@shailesh5152 install mongodb extension

I installed it

C:\Users\hp>php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mongodb
mysqli

but I am also facing same problem after entering this below command

composer require jenssegers/mongodb

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don't install jenssegers/mongodb v3.6.3
- Conclusion: don't install jenssegers/mongodb v3.6.2
- Conclusion: don't install jenssegers/mongodb v3.6.1
- Conclusion: remove laravel/framework v7.4.0
- Installation request for jenssegers/mongodb ^3.6 -> satisfiable by jenssegers/mongodb[v3.6.0, v3.6.1, v3.6.2, v3.6.3].
- Conclusion: don't install laravel/framework v7.4.0

@Smolevich
Copy link
Contributor

Smolevich commented Apr 2, 2020

Show your composer.json, please

@shailesh5152
Copy link
Author

Show your composer.json, please

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0",
"mongodb/mongodb": "^1.6"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"laravel/ui": "^2.0",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}

@scanmaster
Copy link

scanmaster commented Apr 2, 2020

I'm getting the same issue although it looks like the package needs Laravel 5.8 to 6.8:

  • jenssegers/mongodb v3.6.0 requires illuminate/events ^5.8|^6.0 -> satisfiable by illuminate/events[5.8.x-dev, 6.x-dev, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.2, v6.18.3, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0].

Edit: I read through #1974 and see it won't be available to Laravel 7.x till version 4. No problem, I'll stick with MySQL for now. :)

@vesper8
Copy link

vesper8 commented Apr 5, 2020

Does anyone have a fork with Laravel 7 compatibility added that's ready to use right now and works with the 3.6 branch?

@Smolevich
Copy link
Contributor

@vesper8 , we have using of 7 laravel in development branch, but we don't test on bugs and not implement new features

@vesper8
Copy link

vesper8 commented Apr 5, 2020

@Smolevich Any estimation when 4.0 will be released? Is it a week away? a month? more? Thanks

@ghost
Copy link

ghost commented Apr 8, 2020

I'm having the same issue and this is as fur as I can get at the moment. There's no support for Laravel 7 apparently at the moment

@Smolevich
Copy link
Contributor

@Smolevich Any estimation when 4.0 will be released? Is it a week away? a month? more? Thanks

We don't discuss about time new release

@vesper8
Copy link

vesper8 commented Apr 8, 2020

@PRINCE-254 you can use it with Laravel 7 if you change it to "jenssegers/mongodb": "dev-develop", in your composer.json

I'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.

@jaggu07
Copy link

jaggu07 commented Jul 30, 2020

you can use "jenssegers/mongodb": "^4" in Laravel 7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants