I have successfully updated my Laravel project from 5.4.* to 5.7.* however when I run the artisan command api:route it come returns this error:
In RouteListCommand.php line 71:
count(): Parameter must be an array or an object that implements
Countable
I have deleted the vendor folder and ran composer update.
composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"barryvdh/laravel-cors": "^0.11.2",
"bugsnag/bugsnag-laravel": "^2.0",
"dingo/api": "1.0.*#dev",
"doctrine/dbal": "^2.6",
"dompdf/dompdf": "^0.8.2
"laravel/framework": "5.7.*",
"laravel/socialite": "^3.0",
"laravel/tinker": "~1.0",
"pragmarx/google2fa-laravel": "^0.2.0",
"pusher/pusher-php-server": "^3.0",
"tymon/jwt-auth": "0.5.*"
"yajra/laravel-datatables-fractal": "^1.0",
"yajra/laravel-datatables-oracle": "~8.0",
"wpb/string-blade-compiler": "dev-laravel-5.7"
},
"require-dev": {
"barryvdh/laravel-dompdf": "^0.8.2",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "7.0"
},
Related
I did upgrade from 5.6 to 5.7 to 5.8 with no major problems, but I CAN'T upgrade from 5.8 to 6. Let's see some code:
My composer.json file:
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"arcanedev/log-viewer": "~4.7.0",
"davejamesmiller/laravel-breadcrumbs": "5.x",
"devmarketer/easynav": "^1.0",
"dompdf/dompdf": "^0.8.2",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.4",
"itsgoingd/clockwork": "^5.0",
"kylekatarnls/laravel-carbon-2": "^1.0.0",
"laracasts/flash": "^3.0",
"laravel/framework": "^6.0",
"laravel/passport": "^7.0",
"laravel/tinker": "^1.0",
"league/flysystem-aws-s3-v3": "~1.0",
"maatwebsite/excel": "^3.1",
"mpdf/mpdf": "^7.1",
"nesbot/carbon": "2.61.0 as 1.39.0",
"phpoffice/phpspreadsheet": "^1.2",
"pragmarx/google2fa-laravel": "^0.2.0",
"pusher/pusher-php-server": "~3.0",
"robbiep/cloudconvert-laravel": "2.*",
"santigarcor/laratrust": "5.0.*",
"sendgrid/sendgrid": "~7",
"symfony/css-selector": "^4.1",
"symfony/dom-crawler": "^4.1",
"tymon/jwt-auth": "1.0.*",
"unsplash/unsplash": "^2.4",
"yajra/laravel-datatables": "^1.5"
},
"require-dev": {
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0",
"squizlabs/php_codesniffer": "^3.2"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true,
"allow-plugins": {
"kylekatarnls/update-helper": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
And the error is:
Problem 1
- Root composer.json requires laravel/framework ^6.0 -> satisfiable by laravel/framework[v6.0.0, ..., 6.x-dev].
- arcanedev/log-viewer[4.7.0, ..., v4.7.x-dev] require arcanedev/support ~4.5.0 -> satisfiable by arcanedev/support[4.5.0].
- arcanedev/support 4.5.0 requires illuminate/support ~5.8.0 -> satisfiable by illuminate/support[v5.8.0, ..., 5.8.x-dev].
- Conclusion: don't install illuminate/support v5.8.36 (conflict analysis result)
- Root composer.json requires arcanedev/log-viewer ~4.7.0 -> satisfiable by arcanedev/log-viewer[4.7.0, ..., v4.7.x-dev].
I've looked on every forum I found on the internet (almost did!) but couldn't find a solution or any hints on what I could be doing wrong.
What could be wrong? Any hints?
Thanks in advance!
The error is caused by the following:
You want to install laravel/framework:^6.0, which comes with illuminate/support:^6.0.
One of your dependencies, arcanedev/log-viewer:~4.7.0 requires arcanedev/support:~4.5.0
And finally, arcanedev/support:~4.5.0 requires laravel's illuminate/support:^5.8.0.
This creates a conflict.
You have 2 ways to resolve the conflict.
Keep laravel at version 5.8
Update the arcanedev dependencies to a version where they work with laravel 6.
Based on arcanedev/log-support's packagist page, I think 5.2 should do it.
"require": {
"php": "^7.1.3",
"arcanedev/log-viewer": "^5.2.0",
"laravel/framework": "^6.0",
...
This is because arcanedev/log-viewer:^5.2.0 requires arcanedev/support:^5.0 which in turn requires illuminate/support:^6.0, removing the conflict.
As the Laravel 8 is not supported on PHP 7.0, I decided to go with lower version of Laravel. Because, we are not in the position of upgrading the server php version.
After reading the requirements here we found the latest Laravel version that is supported in PHP7.0 will be Laravel5.5.
we installed the version using composer. Below is the Laravel version in the server.
However, still the error shows in the nginx server as below
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.5".
The composer.json in the laravel root directory as below
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"symfony/thanks": "^1.0"
},
}
Any workaround to bring the application live?
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"symfony/thanks": "^1.0"
},
"platform" : {"php": "7.0.3"},
}
This fakes an environment. Maybe this helps.
I got this error when I'm trying to deploy my laravel project to GCP.
I deploy the same project in Heoku I don't have any problem and the project.
Step #1: [29-Aug-2020 20:37:05 UTC] [2020-08-29 20:37:05] local.ERROR: Please provide a valid cache path. {"exception":"[object] (InvalidArgumentException(code: 0): Please provide a valid cache path. at /app/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php:36)
My composer.json
"require": {
"php": "^7.1.3",
"ext-gd": "*",
"barryvdh/laravel-dompdf": "^0.8.6",
"bitfumes/laravel-multiauth": "^3.0",
"bodunde/geocoder": "^1.2",
"consoletvs/charts": "6.*",
"fideloper/proxy": "^4.0",
"fx3costa/laravelchartjs": "^2.7",
"fzaninotto/faker": "^1.4",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "^3.1",
"spatie/geocoder": "^3.5",
"twilio/sdk": "^6.9"
},
"require-dev": {
"filp/whoops": "^2.0",
"laravel/ui": "^1.1",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
Moving from laravel 6 to 7x getting this error, arcanedev/laravel-messenger 7.2.0 requires arcanedev/support ^5.1
This is the error while i run composer update
This is composer.json file
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"arcanedev/laravel-messenger": "7.2",
"cboden/ratchet": "^0.4.2",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.4",
"laravel/cashier": "^10.5",
"laravel/framework": "7.0.*",
"laravel/nexmo-notification-channel": "^2.3",
"laravel/tinker": "^2.0",
"php-imap/php-imap": "^4.1",
"pusher/pusher-php-server": "^4.0",
"spatie/laravel-permission": "^3.13.0",
"twilio/sdk": "^6.6",
"webklex/laravel-imap": "^1.4"
},
"require-dev": {
"facade/ignition": "^2.0",
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.9.1",
"laravel/ui": "^2.0.0",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
I can not post complete Composer.json file here getting this error while i posting my question, so i attached another screenshot of my composer.json file
screenshot of my composer.json file
Can anyone help me out? Thank you!
Trying to install laravel-image-optimizer plugin I got errors:
$ composer require spatie/laravel-image-optimizer
Using version ^1.4 for spatie/laravel-image-optimizer
./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
- The requested package spatie/browsershot (locked at 3.30.0, required as ^3.31) is satisfiable by spatie/browsershot[3.30.0] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
My composer.json :
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"alaouy/youtube": "^2.2",
"aloha/twilio": "^4.0",
"arrilot/laravel-widgets": "^3.12",
"beyondcode/laravel-websockets": "^1.0",
"cviebrock/eloquent-sluggable": "^4.5",
"davejamesmiller/laravel-breadcrumbs": "5.x",
"doctrine/dbal": "^2.8",
"elasticquent/elasticquent": "dev-master",
"facebook/graph-sdk": "^5.7",
"fideloper/proxy": "^4.0",
"google/apiclient": "^2.2",
"intervention/image": "^2.4",
"itsgoingd/clockwork": "^3.0",
"jrean/laravel-user-verification": "^7.0",
"laravel/framework": "5.8.*",
"laravel/socialite": "^3.2",
"laravel/tinker": "^1.0",
"laravelium/sitemap": "^3.1",
"maatwebsite/excel": "^3.1",
"mews/captcha": "^2.2",
"mews/purifier": "^2.1",
"proengsoft/laravel-jsvalidation": ">2.2.0",
"pusher/pusher-php-server": "~3.0",
"s-ichikawa/laravel-sendgrid-driver": "~2.0",
"snowfire/beautymail": "dev-master",
"socialiteproviders/instagram": "^3.0",
"spatie/browsershot": "^3.31",
"spatie/laravel-activitylog": "^3.1",
"spatie/laravel-backup": "^6.1",
"spatie/laravel-feed": "^2.1",
"spatie/laravel-newsletter": "^4.2",
"spatie/laravel-tags": "^2.1",
"spipu/html2pdf": "^5.2",
"themsaid/laravel-mail-preview": "^2.0",
"unisharp/laravel-filemanager": "^1.9",
"wboyz/laravel-enum": "^0.2.1",
"willvincent/feeds": "1.1.*",
"yajra/laravel-datatables-oracle": "^9.0.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.1",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"orangehill/iseed": "^2.6",
"phpunit/phpunit": "^7.0",
"xethron/migrations-generator": "^2.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
],
"post-update-cmd": [
"php artisan vendor:publish --provider=\"Proengsoft\\JsValidation\\JsValidationServiceProvider\" --tag=public --force"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
As I see here https://github.com/spatie/browsershot/releases
latest version of it is 3.31.0
and it my composer.json I have
"spatie/browsershot": "^3.31",
is a latest version, just as on spatie/browsershot/releases page.
Which steps have I to take ?
Thanks!
The package spatie/laravel-image-optimizer required the spatie/browsershot and you should`t require this separately. You can do:
composer remove spatie/browsershot;
composer require spatie/laravel-image-optimizer;
and this two modules will installed to your project