composer content-mismatch length after update to latest 1.4.1 - laravel

My composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"alsofronie/eloquent-uuid": "^1.0",
"arcanedev/log-viewer": "^4.3",
"barryvdh/laravel-cors": "^0.8.5",
"bugsnag/bugsnag-laravel": "^2.4",
"cviebrock/eloquent-sluggable": "^4.1",
"doctrine/dbal": "^2.5",
"graham-campbell/binput": "^3.6",
"guzzlehttp/guzzle": "^6.2",
"intervention/image": "^2.3",
"laravel/framework": "5.4.*",
"laravel/socialite": "^3.0",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.4",
"laravelista/ekko": "^1.3",
"pda/pheanstalk": "^3.1",
"propaganistas/laravel-phone": "^2.8",
"spatie/laravel-collection-macros": "^2.0",
"spatie/laravel-fractal": "^3.3",
"stefensuhat/flash": "^2.5",
"stefensuhat/no-captcha": "^1.0",
"yajra/laravel-datatables-oracle": "^7.3"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true
}
}
Output of composer diagnose:
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
When I run this command:
composer update
I get the following output:
And I expected to update my package normally.
ALready tried this solution Composer Content-Length Mismatch but no luck.

Related

laravel-8: Why i cannot install Laravel/Breeze

When I tried to install laravel breeze, using command composer require laravel/breeze --dev, it gives me this error:
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, v8.43.0, 8.x-dev] but it conflicts with another require.
- Root composer.json requires laravel/breeze ^1.2 -> satisfiable by laravel/breeze[v1.2.0, v1.2.1, 1.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
My current version of laravel : laravel8.
I'm trying to add an users's authentification session on an existing application.
My composer.json file :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.2",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
You need to update your dependencies listed here
Maybe you will not find "laravel/ui" in your composer.json, if it's the case add to it manually as a property from the parent "require".
Then you have to save the file and run on the terminal the command: composer update
Follows below my composer.json file for reference:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.0",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.0"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.3",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.0|^9.3.3"
},
"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"
]
}
}
Best solution:
delete composer.lock file
Go to composer.json and add to "require" this: "laravel/breeze": "^1.1",
run composer install --ignore-platform-reqs
It's done
Your composer.lock file will generated again including installation

Cannot update laravel/passport

Actually Im trying to set API for my website on Laravel. I found that I need to add CreateFreshApiToken to Kernel.php in order to use it. Well, I wish could, but it doesn't exist. Then I have found I can get it via
composer require laravel/passport
I run it and have this one
composer require laravel/passport
./composer.json has been updated
Running composer update laravel/passport
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- artogrig/laravel-make-service[1.0.0, ..., 1.0.1] require illuminate/support ~5 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires artogrig/laravel-make-service ^1.0 -> satisfiable by artogrig/laravel-make-service[1.0.0, 1.0.1].
This is my comsposer.json:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"artogrig/laravel-make-service": "^1.0",
"cviebrock/eloquent-sluggable": "^7.0",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.5",
"laravel/framework": "^7.0",
"laravel/passport": "^4.0",
"laravel/socialite": "^3.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"tcg/voyager": "^1.4"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"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"
]
},
"repositories": {
"hooks": {
"type": "composer",
"url": "https://larapack.io"
}
}
}
I have no idea what to do with. Could someone help me, please!
Thanks!
The dependency artogrig/laravel-make-service only works with Illuminate\Support 5, for what this package does, create service classes and is unmaintained. I would simply just remove it and your dependencies would be fixed.

Upgrade Laravel version from 5.2.45 to 5.4

I am working on an existing application and the application is in laravel framework(version 5.2.45).And now i have to upgrade it to the version(5.4).I have follow the upgrade version step from laravel official documentation. Below is the steps which i have done :
1) Update the version number in laravel composer.json file in "laravel/framework" key.
2) Then after run the command composer update.
3) After that during executing the command i face error and the solution of that is to add the below line in composer.json file.
"minimum-stability": "dev",
"prefer-stable": true,
4) Then after again i execute the command composer update.Now i am facing the issue which i have attached in the below image :
Here is the code of composer.json file :
{
"name": "ozdemirburak/laravel-5-simple-cms",
"description": "Simple Laravel 5 content management system for starters.",
"keywords": [
"framework",
"laravel",
"cms"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.4.*",
"laravelcollective/html": "5.2.*",
"baum/baum": "~1.1",
"kris/laravel-form-builder": "1.6.*",
"laracasts/flash": "~1.3",
"mews/purifier": "~2.0",
"cviebrock/eloquent-sluggable": "~3.1.4",
"barryvdh/laravel-elfinder": "0.3.*",
"spatie/laravel-analytics": "~1.1",
"yajra/laravel-datatables-oracle": "~6.0",
"pingpong/modules": "~2.1",
"caffeinated/menus": "~2.0",
"fisharebest/laravel-assets": "~1.0",
"caffeinated/themes": "2.0.5",
"teepluss/theme": "dev-master",
"roumen/sitemap": "2.6.*",
"maatwebsite/excel": "^2.1",
"intervention/image": "^2.3",
"laravel/socialite": "^2.0",
"xinax/laravel-gettext": "^3.1",
"omnipay/paypal": " *",
"mews/captcha": "^2.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*",
"phpspec/phpspec": "~2.1",
"doctrine/dbal": "~2.5",
"squizlabs/php_codesniffer": "~1.5",
"laracasts/generators": "~1.1.3",
"barryvdh/laravel-ide-helper": "~2.0",
"barryvdh/laravel-debugbar": "~2.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"Modules\\": "modules/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize",
"php artisan elfinder:publish"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"preferred-install": "dist"
}
}
Note : For the current error i also found a solution in the stackoverflow and i implement that thing but still i am getting this error.
Thanks in advance!
You should update step by step, in your case update to 5.2 => 5.3 and after that 5.3 => 5.4 Please check laravel official documentation.
According to the error output:
"caffeinated/themes": "2.0.5" is locked to Laravel 5.1/5.2.
Upgrade that first.
Then the rest should follow.

Laravel: Class 'SocialiteProviders\Manager\ServiceProvider' not found

I am getting the following error when I trying to use Socialite with Laravel and extending it with SocialiteProviders. I have tried other solutions but nothing seems to get rid of this error. Does anyone have any suggestions??? Thanks.
ERROR: Class 'SocialiteProviders\Manager\ServiceProvider' not found
File: Composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"arcanedev/log-viewer": "~4.7.0",
"barryvdh/laravel-cors": "^0.11.3",
"beyondcode/laravel-mailbox": "^1.2",
"browner12/helpers": "^2.1",
"chumper/zipper": "^1.0",
"fideloper/proxy": "^4.0",
"intervention/image": "^2.5",
"laravel/framework": "5.8.*",
"laravel/socialite": "^4.3",
"laravel/tinker": "^1.0",
"league/flysystem-sftp": "^1.0",
"phpmailer/phpmailer": "^6.0",
"socialiteproviders/facebook": "^1.0",
"socialiteproviders/generators": "^4.5",
"socialiteproviders/github": "dev-master",
"socialiteproviders/google": "^3.0",
"socialiteproviders/instagram": "^3.0",
"socialiteproviders/linkedin": "^3.1",
"socialiteproviders/manager": "^3.4",
"socialiteproviders/twitter": "^3.0",
"socialiteproviders/vkontakte": "^4.0",
"socialiteproviders/youtube": "^3.0",
"stripe/stripe-php": "^6.40",
"toin0u/geocoder-laravel": "^4.1",
"tymon/jwt-auth": "1.0.*",
"zanysoft/laravel-zip": "^1.0"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5",
"infyomlabs/laravel-generator": "5.8.x-dev",
"laravelcollective/html": "^5.8.0",
"infyomlabs/adminlte-templates": "5.8.x-dev",
"infyomlabs/swagger-generator": "dev-master",
"appointer/swaggervel": "dev-master",
"doctrine/dbal": "~2.3"
},
"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"
]
}
}
File app.php
'providers' => [
\SocialiteProviders\Manager\ServiceProvider::class,
],
'aliases' => [
'Socialite' => Illuminate\Socialite\Facades\Socialite::class,
],
File: EventServiceProvider.php
protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// add your listeners (aka providers) here
'SocialiteProviders\\Facebook\\FacebookExtendSocialite#handle',
'SocialiteProviders\\GitHub\\GitHubExtendSocialite#handle',
'SocialiteProviders\\Google\\GoogleExtendSocialite#handle',
'SocialiteProviders\\Instagram\\InstagramExtendSocialite#handle',
'SocialiteProviders\\LinkedIn\\LinkedInExtendSocialite#handle',
'SocialiteProviders\\PayPal\\PayPalExtendSocialite#handle',
'SocialiteProviders\\Twitter\\TwitterExtendSocialite#handle',
'SocialiteProviders\\VKontakte\\VKontakteExtendSocialite#handle',
'SocialiteProviders\\YouTube\\YouTubeExtendSocialite#handle',
],
Registered::class => [
SendEmailVerificationNotification::class,
],
];
File: AuthController.php
namespace App\Http\Controllers\Web;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Socialite;
class AuthController extends Controller
{
...
Newbie issue.... Composer self "Killed". Fixed the issue by adding swap memory before running composer.
UPDATED to include the command I used to add swap and fix the problem.
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1

laravel-image-optimizer conflicts with spatie/browsershot

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

Resources