Unable to understand why I cannot install laravel-datatables - php

I'm mantaining an old project, started with laravel 5.4, and now lifted up to laravel 8.
It's all working.
Now I'm in need to install laravel-datatables.
Looking at doc, I discarded v10 because it requires Laravel 9+
For same reason, I discarded also v9
So I'm trying to install laravel-datatables v8
composer require yajra/laravel-datatables-oracle:^8.0
I got this
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires yajra/laravel-datatables-oracle 8.0 -> satisfiable by yajra/laravel-datatables-oracle[v8.0.0].
- yajra/laravel-datatables-oracle v8.0.0 requires illuminate/database 5.4.*|5.5.* -> found illuminate/database[v5.4.0, ..., 5.5.x-dev] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I am not able to understand which package/require is conflicting with this package.
This my package.json
"require": {
"php": "^7.3|^8.0",
"ext-json": "*",
"barryvdh/laravel-dompdf": "^0.8.1",
"buzz/laravel-google-captcha": "^2.1",
"carlos-meneses/laravel-mpdf": "^2.1",
"davidepastore/codice-fiscale": "^0.7.1",
"doctrine/dbal": "^3.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.3",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.2",
"league/flysystem-sftp": "~1.0",
"maatwebsite/excel": "^3.1",
"nowakowskir/php-jwt": "^2.0",
"oriceon/toastr-5-laravel": "^1.0.0",
"pragmarx/google2fa-laravel": "^1.4",
"pragmarx/recovery": "^0.2.0",
"ramsey/uuid": "^4.1",
"sentry/sdk": "^3.1",
"sentry/sentry-laravel": "^2.4",
"shalvah/laravel-jsend": "^2.3",
"snowfire/beautymail": "^1.1"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
Same problem with v7
Please note: we cannot, for internal policy, use -dev branches
Trying to install v9 ...
Problem 1
- Root composer.json requires yajra/laravel-datatables-oracle 9 -> satisfiable by yajra/laravel-datatables-oracle[v9.0.0].
- yajra/laravel-datatables-oracle v9.0.0 requires illuminate/database 5.8.* -> found illuminate/database[v5.8.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.

As written in the error message: yajra/laravel-datatables-oracle in v8 is only compatible with Laravel v5, and you are using Laravel v8.
Try to use composer require yajra/laravel-datatables-oracle:^9.0 - this version is compatible with Laravel v5 to v8. Next time you are facing such a problem, have a look at the constraints of different versions of the package. Packagist has a pretty nice overview of the compatible versions, for example at https://packagist.org/packages/yajra/laravel-datatables-oracle#v9.21.2 where you can see the dependencies for the latest v9 version of that datatables package

I accepted answer from Nico Haase because it helped me found the solution, but this is the exact solution for my exact case
composer require yajra/laravel-datatables-oracle:^9.*
It installed the 9.21.x version and it's compatibile with my actual set of package

Related

How can i fix problem of "illuminate/filesystem conflicting version" while installing laravel breeze?

I am trying to install Laravel breeze but having this error:
$ composer require laravel/breeze --dev
Using version ^1.2 for laravel/breeze
./composer.json has been updated
Running composer update laravel/breeze
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/breeze[v1.2.0, ..., 1.x-dev] require illuminate/filesystem ^8.42 -> found illuminate/filesystem[v8.42.0, v8.42.1, 8.x-dev] but it conflicts with another require.
- Root composer.json requires laravel/breeze ^1.2 -> satisfiable by laravel/breeze[v1.2.0, 1.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Here is my composer.json (i.e. fresh install of laravel):
"require": {
"php": "^7.3|^8.0",
"doctrine/dbal": "^3.1",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
Can anyone please help me out?
You can tell composer to update your packages which conflicts with the target package requirements using --with-dependencies and --with-all-dependencies commands. Read more
So, you can tell composer to update your package to resolve the conflicts.
composer require laravel/breeze --dev -w

MacsiDigital/laravel-zoom Install failed in Laravel 7

I tried to install https://github.com/MacsiDigital/laravel-zoom via composer. It gives me an error with guzzlehttp/guzzle version conflict.
Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.0.1]
How can I fix this?
This is my composer file.
"php": "^7.2.5"
"biscolab/laravel-recaptcha": "^4.1",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^7.0",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.1",
"queueworker/sansdaemon": "^1.2",
"softinklab/laravel-keyvalue-storage": "^1.3",
"spatie/laravel-permission": "^3.13",
"yajra/laravel-datatables-oracle": "~9.0"
Output (trimmed)
$ composer require macsidigital/laravel-zoom
Using version ^4.0 for macsidigital/laravel-zoom
./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.
Found a temporary fix. Downgrade your guzzle to 6.5.5 and install.
Issue raised in repo: https://github.com/MacsiDigital/laravel-api-client/issues/5

Error in installation laravel medialibrary 8.1

Hi everyone I'm trying to install media library in laravel 7.4 but it have bellow error:
Problem 1
- Installation request for symfony/console 5.0.1 -> satisfiable by symfony/console[v5.0.1].
- Installation request for spatie/laravel-medialibrary ^8.1 -> satisfiable by spatie/laravel-medialibrary[8.1.0].
- Can only install one of: symfony/process[v5.0.1, 4.4.x-dev].
- Can only install one of: symfony/process[4.4.x-dev, v5.0.1].
- Can only install one of: symfony/process[4.4.x-dev, v5.0.1].
- Conclusion: install symfony/process 4.4.x-dev
- Installation request for symfony/process 5.0.1 -> satisfiable by symfony/process[v5.0.1].
Whats wrong with this package, As here link explains the package I resolve requirements :
"require": {
"php": "^7.2.5",
"cyrildewit/eloquent-viewable": "^5.2",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/socialite": "^4.3",
"laravel/tinker": "^2.0",
"morilog/jalali": "^3.1",
"santigarcor/laratrust": "^5.2",
"symfony/console": "5.0.1",
"symfony/process": "5.0.1"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
The Medialibrary package requires exif extension . Enable this extension from the php.ini file.

Unable to update a laravel project from 5.5 to 5.7

I recently started working on a project that was originally in Laravel 5.2 which I successfully upgraded to Laravel 5.5 however now I'm trying to upgrade once again to Laravel 5.7 but when I do a composer update it gets stuck at Resolving dependencies through SAT. Here is the required and required-dev section of composer.json file:
"require": {
"php": "^7.2.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.5.0",
"unisharp/laravel-ckeditor": "^4.5",
"barryvdh/laravel-debugbar": "^3.1",
"milon/barcode": "^5.2",
"barryvdh/laravel-dompdf": "^0.8.0",
"hisorange/browser-detect": "2.*",
"sentry/sentry-laravel": "^0.7.0",
"laravel/cashier": "~6.0",
"dingo/api": "1.0.*#dev"
},
"require-dev": {
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^7.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*",
"xethron/migrations-generator": "dev-l5",
"way/generators": "dev-feature/laravel-five-stable"
},
Not sure what could be the problem.... Is there something missing?
The issue is likely to do with one of the pages you're trying to install / update. If composer install -vvv doesn't give you any information on what package might be causing the error, you'll need to troubleshoot by trying to install each package individually using:
composer require unisharp/laravel-ckeditor:4.5
composer require barryvdh/laravel-debugbar:3.1
...
Eventually, composer will tell you which package is causing the issue. Once you identify the packages, you'll need to check that the version you're trying to install is compatible with Laravel 5.7. Tweak the version number in the composer require ... command line until you find one that works (could be higher or lower).

Composer conflicts and Symfony 3

I'm totally new to composer and symfony, and i've started a symfony3 project. Things where going well, but now composer won't update my dependancies. I've been searching a solution for 3 hours.
Here is my console log:
Problem 1
- sonata-project/admin-bundle dev-master requires sonata-project/block-bundle 3.x-dev#dev -> satisfiable by sonata-project/block-bundle[3.x-dev] but these conflict with your requirements or minimum-stability.
- sonata-project/admin-bundle dev-master requires sonata-project/block-bundle 3.x-dev#dev -> satisfiable by sonata-project/block-bundle[3.x-dev] but these conflict with your requirements or minimum-stability.
- Installation request for sonata-project/admin-bundle dev-master -> satisfiable by sonata-project/admin-bundle[dev-master].
And my composer.json requirements:
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"friendsofsymfony/user-bundle": "dev-master",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master"
},
If you can find the problem, and explain it to me, you're going to be my hero!
By default, composer installs only stable versions of packages, even if you ask a dev version for one of them, by defining the minimum-stability to stable.
To tell composer that you allow installation of development versions (such as dev-master),
Add the following line after your requirements:
"minimum-stability": "dev"
Note: It's actually mandatory to work with last versions of sonata bundles.

Categories