Hi team I need help to upgrade my existing project which is on laravel 5.5 but i need to upgrade it on 7. So what i have to change so that my project run and may not affect by update version.
My composer.json file :
"require": {
"php": ">=7.0.0",
"barryvdh/laravel-dompdf": "^0.8.6",
"fideloper/proxy": "~3.3",
"intervention/image": "^2.4",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "~5.0",
"mews/captcha": "^2.1"
}
You can check some of the requirements at https://laravel.com/docs/7.x/upgrade, or may be you want to recreate a new project, you can check it out at https://laravel.com/docs/7.x/installation.
Related
Previously we are using GuzzleHttp 6.0 and PHP 7.0, Now we have updated our PHP version to 8.1 and also trying to update GuzzleHttp to latest 7.0 version. I am following its document to update GuzzleHttp. But I am getting errors shown in the image.
My composer code is below. Can anyone please help me regarding this
"require-dev": {
"phpunit/phpunit": "9.5.0",
"phpunit/dbunit": "4.0.0"
},
"require": {
"jwmickey/php-jwt": "dev-master",
"aws/aws-sdk-php": "3.19.30",
"pear/versioncontrol_git": "0.5.0",
"aws/aws-php-sns-message-validator": "1.1.0",
"endroid/qr-code": "^3.0",
"guzzlehttp/guzzle": "^7.0"
},
I am trying to deploy new things on our server.
It's failing every time i don't know why, every time i get:
[Instance: i-0767cd899da6be838] Command failed on instance.
Return code: 2 Output: (TRUNCATED)... see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. -
It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed.
For more detail, check /var/log/eb-activity.log using console or EB CLI.
Code Pipeline raise this message:
Deployment completed, but with errors:
During an aborted deployment, some instances may have deployed the new application version.
To ensure all instances are running the same version, re-deploy the appropriate application version.
Failed to deploy application.
Unsuccessful command execution on instance id(s) 'i-0767cd899da6be838'.
Aborting the operation.
[Instance: i-0767cd899da6be838] Command failed on instance.
Return code: 2 Output: (TRUNCATED)... see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. - It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed.
For more detail, check /var/log/eb-activity.log using console or EB CLI.
I checked /var/log/eb-activity.log and /var/log/httpd/error_log in elastic beans but they have nothing.
This is composer.json may help to track issue:
{
"require": {
"php": "7.2",
"algolia/algoliasearch-client-php": "^3.1",
"authy/php": "3.0.5",
"barryvdh/laravel-cors": "^0.11.3",
"barryvdh/laravel-translation-manager": "^0.5.3",
"berkayk/onesignal-laravel": "^1.0",
"cviebrock/eloquent-sluggable": "^4.6",
"darkaonline/l5-swagger": "5.7.*",
"doctrine/dbal": "2.10.1",
"dusterio/laravel-aws-worker": "^0.1.26",
"fideloper/proxy": "^4.0",
"google/apiclient": "^2.4",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.4",
"jenssegers/agent": "^2.6",
"laravel/framework": "5.7.*",
"laravel/scout": "^7.0",
"laravel/slack-notification-channel": "v1.0.3",
"laravel/socialite": "^4.4",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.7",
"league/flysystem-aws-s3-v3": "^1.0",
"maatwebsite/excel": "3.1.25",
"pusher/pusher-php-server": "^4.1",
"segmentio/analytics-php": "^1.7",
"sentry/sentry-laravel": "1.6.1",
"spatie/laravel-activitylog": "v2.8.4",
"spatie/laravel-medialibrary": "^6.19.0"
},
"minimum-stability": "dev"
}
Any help ?
I got my problem solved.
At first i tried to apply solutions at this post but it didn't solve my problem.
The only thing that solved my problem was by upgrading my composer version.
So i upgraded my composer from 1.8.0 to 2.1.3 by:
composer self-update 2.1.3
I had to do this in the elastic beanstalk configuration file:
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update 2.1.3
Hope this helps you guys one day.
Trying to install the Tymon/jwt-auth package and work with it, following the directions on the site: https://jwt-auth.readthedocs.io/en/develop/laravel-installation/ Doesn't seem like the publish configuration seems to do anything, I'm not seeing a config/jwt.php file, and the command php artisan jwt:secretdoesn't do anything useful, saying that there are no commands defined in the "jwt" namespace.
Does anyone have any info on getting JWT working on Laravel 5.7?
Verified that it is in the composer.json:
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"tymon/jwt-auth": "^0.5.12"
},
It would be nice to get this released soon you can just using this
"tymon/jwt-auth": "dev-develop"
That worked for my project
Go to composer.json. Add this to require: "tymon/jwt-auth": "^1.0.0". Then run php composer update. The version of jwt 0.5 is not suported by carbon 2.0. This worked for me with laravel 5.8.
I have a package which uses "satooshi/php-coveralls" package to calculate coverage on TravisCI. Coveralls composer.json requires:
"require": {
"php": ">=5.3.3",
"ext-json": "*",
"ext-simplexml": "*",
"guzzle/guzzle": "^2.8|^3.0",
"psr/log": "^1.0",
"symfony/config": "^2.1|^3.0",
"symfony/console": "^2.1|^3.0",
"symfony/stopwatch": "^2.0|^3.0",
"symfony/yaml": "^2.0|^3.0"
},
My package doesn't use any of those packages directly, but I am supporting PHP 5.4 which in turn requires that lower version of all them are used. Is there a way to tell composer to use guzzle/guzzle: ^2.8 rather then ^3.0, symfony/config: ^2.1 rather then ^3.0 etc. Currently when I run composer install, higher versions are installed so the build fails on PHP 5.4
There is a prefer-lowest option when running composer. Here are more details
https://evertpot.com/testing-composer-prefer-lowest/
You can use ~ ("tilde") for that..
"guzzle/guzzle": "~2.8",
which means
>= 2.8 < 3.0.0
also
"guzzle/guzzle": "^2.8",
should work
evenmore any higher versions of 2. but less than 3.
"guzzle/guzzle": "^2.*",
or
"guzzle/guzzle": "~2.*",
https://getcomposer.org/doc/articles/versions.md
How do I install Laravel DomPDF?
I updated my Laravel's composer.json from this:
"require": {
"laravel/framework": "4.2.*",
"maatwebsite/excel": " ~1.2.1"
},
To this:
"require": {
"laravel/framework": "4.2.*",
"maatwebsite/excel": " ~1.2.1",
"barryvdh/laravel-dompdf": "0.5.*"
},
And then ran this command:
composer update barryvdh/laravel-dompdf": "0.5.*
But it always throws "don't install laravel 4.2" like that and the composer fails to update.
How can I fix this?
The very first line from the GitHub project page readme says:
DOMPDF Wrapper for Laravel 5
The second one states:
For Laravel 4.x, check the 0.4 branch!
Which means you need to add the 0.4.* version to you composer.json, for the package to work with Laravel 4:
"require": {
"laravel/framework": "4.2.*",
"maatwebsite/excel": " ~1.2.1",
"barryvdh/laravel-dompdf": "0.4.*"
},
change this line
"barryvdh/laravel-dompdf": "0.4"
you not use packege laravel 5 for laravel 4