Here is my composer.json file. Whats line need to be updated ?
https://pastebin.pl/view/7e924024
thank you for help me
Upgrading Laravel requires a bit more steps then just updating composer, however they aren't too complicated. Here is the guide along with all the steps:
https://laravel.com/docs/9.x/upgrade#upgrade-9.0
To answer the question, for composer you would make the following changes (from the documentation):
You should update the following dependencies in your application's composer.jsonfile:
laravel/framework to ^9.0
nunomaduro/collision to ^6.1
In addition, please replace facade/ignition with "spatie/laravel-ignition": "^1.0" in your application's composer.json file.
Furthermore, the following first-party packages have received new major releases to support Laravel 9.x. If applicable, you should read their individual upgrade guides before upgrading:
Vonage Notification Channel (v3.0) (Replaces Nexmo)
Finally, examine any other third-party packages consumed by your application and verify you are using the proper version for Laravel 9 support.
Note: this will only upgrade composer, there are more changes that you should review in the documentation provided above so that you can fully upgrade to Laravel 9 correctly.
You may download the latest version of composer from https://getcomposer.org/download/ then uninstall the current installed composer and make sure to remove all caches. then install the latest version.
Go to your folder where you want to create your laravel project using any command-line tool and type composer create-project laravel/laravel example-app or refer to https://laravel.com/docs/9.x
for more help on laravel installation or upgrade.
The point is to update Composer itself by downloading a fresh copy from the website and making sure to remove all caches.
This is what worked for me.
Related
Is there a way to install Breeze (via composer) into a new Laravel v7 project?
Whenever I try composer require laravel/breeze --dev
I get failure with message:
Cannot use laravel/breeze's latest version v1.17.0 as it requires php ^8.0.2 which is not satisfied by your platform.
./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.
I don't want to use v9 of laravel or php8 due to work on older code.
I created v7 laravel project via composer: composer create-project laravel/laravel:7.* example_app_name
Is there a similar command for previous versions of Breeze? And if so, which version would apply?
No, it should not be possible. Even version 0.0.1 requires Laravel 8.
If you upgrade to Laravel 8 (8.42 minimum version), you should be able to install breeze up to version 1.10
I wonder if anyone has experiencing installing Prestashop 1.7 dev version on Windows 10? I cloned the developer vbersion of Prestashop from the official git repo and initiated the install. The install asks me to run the command "php composer.phar install" so I did and get the following error when I do:
Problem 1
- composer/installers is locked to version v1.7.0 and an update of this package was not requested.
- composer/installers v1.7.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint.
Use the option --with-all-dependencies to allow updates and removals for packages currently locked to specific versions.
You are using a snapshot build of Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report an issue to them to ask them to support Composer 2. To work around this you can run Composer with --ignore-platform-reqs, but this will also ignore your PHP version and may result in bigger problems down the line.
I am running the latest version of composer on Windows 10 and am at a complete loss on how to proceed any further therefore any help would be appreciated.
According to the Prestashop team their development build is not yet compatible with Composer 1.10.5 hence the errors I encountered.
Thanks.
i am using laravel 5.5 with php 7.0 version, I want to generate a pdf, i tried to install many pdf packages, but unable to install because of php 7.0 version, it requires min 7.1 to install any packages, i tried to find packages for 7.0 verision, but failed.
can anyone help me how to install package for php 7.0 veriosn
Below is the error, that i am getting,
Your requirements could not be resolved to an installable set of packages.
Problem 1 - nwidart/laravel-modules 4.1.0 requires php >=7.1 -> your PHP version (7.0.33) does not satisfy that requirement.
There are only 2 solutions out of this, You either upgrade your PHP version to 7.1 or downgrade your package versions which uses PHP7.0
If you tell me what packages are you using,I could help you out find the packages. Let me know what your use case is exactly, or why your cant upgrade to PHP7.1
Also it is important to note that PHP7.0 includes security vulnerabilities fixed in PHP7.1, So consider upgrading your framework to at-least Laravel 5.8
Edit:
here is a package for pdp utilities in laravel 5.5 -> https://github.com/niklasravnsborg/laravel-pdf
For laravel5.5 you will have to manually link the packages as auto discovery will not work.
Edit 2:
here is the problem, When you use composer require barryvdh/laravel-dompdf the composer installs the latest package which is 0.8.4 (compatible with PHP7.1 and higher), What you need to do instead is add the package manually to the composer file and then bind the version 0.8.3 like this under the require object -> "barryvdh/laravel-dompdf": "0.8.3" and then run composer update/install in the terminal
I found that web.config is included when I install Laravel with:
composer create-project --prefer-dist laravel/laravel blog
but not when I install Laravel using the Laravel installer, with:
laravel new blog
(as per https://laravel.com/docs/5.8/installation)
I've subsequently found a few other differences e.g. devDependencies versions in package.json, some config settings in broadcasting.php, cache.php, database.php.
Can anyone explain to me what is responsible for this difference? Is one install method 'better' than the other?
Thanks
Chris
The difference between both commands is that the composer command uses packagist to get the latest package from GitHub the first time or a cached version, while laravel new blog downloads a zip file from the Laravel server which has the latest version and uses that. Both commands run the so called 'after install' scripts, creating an environment file and setting the application key.
When you don't want a cached version but a new one using composer, run composer clear-cache first, to delete the local cache composer creates.
If you want to see the difference for yourself, compare the composer.json of the base Laravel project (https://www.github.com/laravel/laravel) and the NewCommand.php file in the src directory of the Laravel installer (https://www.github.com/laravel/installer)
Edit
After running both commands, the only difference I could really find was the order in which some things are done, but both generate a working system. Fun thing I noticed is that laravel new project comes with a yarn.lock file, but without a readme.md and composer composer create-project vice versa.
I am creating an open source project written in PHP and I'm starting to use Travis CI for testing on PHP versions 5.4, 5.5, 5.6 and HHVM.
The tests for 5.5, 5.6 and HHVM pass without any issues, but I get an error on PHP 5.4.
The error is listed here: https://travis-ci.org/CodeRichard/simple-config/jobs/58154496
I noticed it had something to do with the PHPUnit package which I use for local development and pulled in using Composer. This version requires symfony/yaml ~2.1|~3.0. After a bit of googling, I found out the pipe symbol is used as an OR symbol. This bit confuses me a little.
When I read ~2.1|~3.0 I assume it'll try to pull in one and if it fails, the other. I know symfony/yaml 3.* requires PHP 5.5.9, whereas 2.* requires 5.3.9.
What I don't understand is why it fails. Isn't it supposed to pull in symfony/yaml 2.* instead?
Right now, I'm requiring PHPUnit 4.6.* for development. The requirement for PHPUnit is PHP 5.3.3. However, Composer fails when trying Travis CI is trying to test for PHP 5.4. This makes absolutely no sense. If it would crash on PHP 5.4 and PHPUnit 4.6 requires symfony/yaml 3.0, shouldn't the requirement be 5.5?
I know I can just downgrade PHPUnit to 4.5, but I wish to remain up to date, so I'd rather not.
That error message is simple: Composer cannot install a component that got recorded in the composer.lock file, but doesn't match the requirements of THIS PHP:
symfony/yaml 3.0.x-dev requires php >=5.5.9
This will not work with PHP 5.4.
Downgrading your development machine to 5.4 and run composer update again will fix it.
Running composer update instead of composer install in Travis CI will also fix it. If you decide to do this, you should also run Travis with composer update --prefer-lowest to test that your declared minimum versions are correctly working.
You should also try to avoid "minimum-stability":"dev", unless you are really sure that you need bleeding-edge packages. Currently you are using no other packages, so it's not necessary to deal with the issues of unstable dev versions.
Remove composer.lock
This is what I have in my .travis.yml
# ...
before_script:
- rm composer.lock
- composer install --no-interaction --prefer-source
# ...
Issue: #2823