Installing Prestashop developer version - composer-php

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.

Related

How to update laravel 8 to 9?

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.

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.5"

I'm trying to upload a plain laravel v5.8 project to a server. It gives me this error
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.5".
I updated the Laravel version to v6 and it still throws the same thing.
Is there any possible solution I tried many but nothing happens. Thanks in advance.
I faced this problem using the new version of composer, didn't have seen this issue before, although this question is a bit old the solution can help someone else.
I did this working in a development machine, if you really need to change the PHP version running in your server this isn't for you.
This problem is related to a composer configuration when you run the command "composer install" if you need to work with the configuration you already have and don't want to make changes which could lead to other problems you should:
remove the packages you already have installed which includes this configuration from composer
sudo rm -r vendor
run the command again with this flag: --ignore-platform-reqs
composer install --ignore-platform-reqs
Now composer won't perform this check anymore and you are good to go!

Unable to download any pdf packages via composer for larvel 5.5

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

How to fix composer problems while trying to configure magento2

I am trying to install/configure magento2. I cloned it from GitHub with:
cd /var/www/html
git clone https://github.com/magento/magento2.git
After that I am trying to install Composer:
cd /var/www/html/magento2/
composer install -v
And I am getting this warning.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
I tried to install phpunit but it not helped. Any idea?
There is not much what you can do. You get this warning because Magento uses PHPUnit 6 as dev dependency. PHP 6 EOLed in February (see supported versions summary) and uses deprecated package phpunit/phpunit-mock-objects as one of its dependencies. The right way to fix this is to upgrade PHPUnit to 7.x or 8.x line, but this rather a job for Magento devs.
As a end user who just want to use Magento, you can safely ignore this warning - it is only a warning to bring your attention on fact, that you're using unmaintained package. This is not a big issues, since this is only a dev dependency, and you're probably not a Magento developer. You will not get this warning if you use --no-dev switch (which you should use for production installation anyway):
composer install --no-dev

Composer.json getting latest package version and

For each new project, I want to:
Get the latest versions of all packages inside composer.json
Once I have them I no longer want to get the latest - just the version of the first run.
I know I could manually specify latest versions from packagist.org, but Ideally I'd like this automated.
I hope this makes sense.
Thanks
the latest package:
"require": {
"namespace/libname": "#dev"
}
after install of this package, composer will dump all info (and version) to composer.lock. do not remove this file and do not use composer update.
always use composer install because this will force composer to look into composer.lock file for package version
Running composer require vendor/package will consult packagist.org for the most current released version and add both the latest release and the version requirement to get this release and compatible updates later.
This will install only stable versions.
After the initial install, you have two options:
composer install will again install the previously found packages.
composer update will look for updated packages that match the version requirement.
Never run update unattended. A developer should run this consciously and then run the test suite to determine if everything still works (or the continuous integration job does it if available). Especially only run install when deploying to production.

Resources