how to fix issue when magento upgrade from 2.3.4 to 2.4.3? - upgrade

I'd like to upgrade magento from 2.3.4 to 2.4.3.
But I cannot upgrade it.
this is error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires magento/product-community-edition 2.4.3 -> satisfiable by magento/product-community-edition[2.4.3].
- magento/product-community-edition 2.4.3 requires php ~7.3.0||~7.4.0 -> your php version (7.2.34) does not satisfy that requirement.
Problem 2
- Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
- dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
I am using cpanel now. In cpanel I set php version is 7.4
PHP 7.4.33 (cli) (built: Nov 10 2022 11:12:07) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
what is the reason?

See if you're really using php 7.4 by typing php -v in the terminal. When you are sure that your php version is correct, delete the composer.lock file (make a backup beforehand). Try updating with the command:
composer require magento/product-community-edition:2.4.5 -W
If that doesn't work, post the contents of the composer.json file

If you are migrating from 2.3.4 to 2.4.3, you need to make the following and please follow these below steps:
1: Backup composer.json: Run the command
cp composer.json composer.json.bak
2: Upgrade your Magento: Run the commmand
composer require-commerce magento/<product> <version> --no-update [--interactive-root-conflicts] [--force-root-updates] [--help]
3: Update the dependecies:
composer update
For example, Specify the metapackage:
Magento Open Source: composer require-commerce magento/product-community-edition 2.4.4 --no-update
Adobe Commerce: composer require-commerce magento/product-enterprise-edition 2.4.4 --no-update
4: Composer Update: Run composer update
5: Update the database schema and data. bin/magento setup:upgrade
6: Disable Magento maintenance mode. bin/magento maintenance:disable
7: Restart Varnish. (Optional) Restart Varnish If you use it for page caching: service varnish restart
Please switch to PHP 7.4 first then check perform the upgrade.

Related

Update Magento2 version 2.4.3-p2 to 2.4.4

I have an issue with the upgrade of Magento from 2.4.3-p2 to 2.4.4.
Here my steps to reproduce:
composer require magento/product-community-edition 2.4.4 --no-update
composer update php-amqplib/php-amqplib
I have tried with option -W, but i get always this exception:
*Problem 1
- Root composer.json requires magento/product-community-edition 2.4.4, found magento/product-community-edition[2.4.4] but the package is fixed to 2.4.3-p2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Problem 2
- Root composer.json requires friendsofphp/php-cs-fixer 3.3.0, found friendsofphp/php-cs-fixer[v3.3.0] but the package is fixed to v2.18.7 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command......
Problem 3*
Could someone tell me, how can I start the upgrade with all dependencies?
Hint: This commande doesn't work "composer update -W"
Thanks alot
You can update the correct version on composer.json
Or just use the following command
composer require magento/product-community-edition 2.4.4 --update-with-all-dependencies
composer update php-amqplib/php-amqplib --with-all-dependencies

Install mongodb on mac os 10.15 for php7

I have installed mongodb on my mac Catalina 10.15. I have php7.3 version installed as well. Now, I want to use the mongoClient() class with PHP. I tried composer require mongodb/mongodb but it says that the mongodb extension is missing :
Using version ^1.5 for mongodb/mongodb
./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
- mongodb/mongodb 1.5.1 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.5.0 requires ext-mongodb ^1.6 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.5 -> satisfiable by mongodb/mongodb[1.5.0, 1.5.1].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
So I tried to install the extension for php using the php doc and I get this error :
pear/install/mongodb/php_phongo.c -fno-common -DPIC -o .libs/php_phongo.o
/private/tmp/pear/install/mongodb/php_phongo.c:22:10: fatal error: 'php.h' file not found
#include <php.h>
^~~~~~~
1 error generated.
make: *** [php_phongo.lo] Error 1
ERROR: `make' failed
Any help ?
I also had the same issue after upgrading to MacOS Catalina
Run these two commands;
brew doctor
brew link --overwrite php
I fixed that by installing PHP7.3 using homebrew
here is a post that helped Install PHP 7.3 + xdebug on MacOS Catalina (with homebrew)
I also updated the macos to 10.15 catalina and started the setup. As same as error came during installing the mongodb driver
After Resolving my issue I updated the answer by given below steps:
Step 1:
Run the command: brew install php71
Step 2:
Edit httpd.conf under directory of /etc/apache2/httpd.conf
Add below line
LoadModule php7_module /usr/local/opt/php#7.1/lib/httpd/modules/libphp7.so
then check there should be no other php7_module enabled.
Also add these lines
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Step 3: Restart apache: sudo apachectl restart
Step 4:
If you need to have php#7.1 first in your PATH run:
echo 'export PATH="/usr/local/opt/php#7.1/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/php#7.1/sbin:$PATH"' >> ~/.bash_profile
For compilers to find php#7.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/php#7.1/lib"
export CPPFLAGS="-I/usr/local/opt/php#7.1/include"
Step 5:
To have launched start php#7.1 now and restart at login:
brew services start php#7.1
Step 6:
Open new terminal & check php version & it should be 7.1
Step 7:
Then run the command: sudo pecl install MongoDB
& it will install php mongodb driver successfully without any error.
Make sure all step should be followed!!
I did these steps to resolve my MongoDB driver issue for laravel project which not found.

Installation request for zofe/rapyd dev-master

After cloning & while doing composer update I am getting the error :
Installation request for zofe/rapyd dev-master
Conclusion: don't install intervention/image 2.4.2
.......
......
......
I am using xampp 7.2.8 , composer 1.7.1, Windows 10 in Virtualbox.
I have cloned the created database, but unable to run the composer update or php artisan migrate as mentioned in https://github.com/raylight75/cms#official-documentation .
Could someone help me ?
I have posted the same issue in https://github.com/raylight75/cms/issues/8
From the composer log you've posted, it looks like the package you are trying to install zofe/rapyd#dev-master is not compatible with the version of Laravel you're using.
The log you've posted also differs to the error you've posted in your question. There is no mention of intervention/image in the logs. Instead, the log is showing an issue with laravelcollective/html and nesbot/carbon.
Try installing the latest stable version by updating the composer.json file and changing the version from dev-master to ~2.2. The latest stable version is v2.2.7, while version 2.6.3 is pre-release, but supports Laravel 5.6.
The issue may also be fixed by updating your version of Laravel to v5.6. However, this is likely to be more work than just using a lower version of zofe/rapyd.

Zend Framework 3 [UnexpectedValueException] Invalid version string "^1.1.0"

I am trying to install Zend Framework 3 in Windows 7. I downloded the Skeleton from Git and run composer install. But getting the error
[UnexpectedValueException] Invalid version string "^1.1.0".
Details:
PHP Version 5.6.3,
XAMPP Version 5.6.3
I'm not sure what command you ran and why you downloaded the skeleton. The preferred way to install the skeleton is with composer:
composer create-project zendframework/skeleton-application path/to/install
More info can be found on https://framework.zend.com/downloads/skeleton-app

Xdebug bad Zend API Version Number

I am having trouble upgrading xdebug for MAMP. I was running version 2.2.0 and there was a known issue that I ran into: PhpStorm and Xdebug not breaking in Symfony2 Controller
I tried to upgrade to version 2.2.3 by following the instructions from http://xdebug.org/wizard.php
After downloading and extracting the xdebug tar I ran /Applications/MAMP/bin/php/php5.4.4/bin/phpize
Here is the output:
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
I then copied the modules/xdebug.so file into the mamp php5.4.4 extensions dir: `/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.
If I run /Applications/MAMP/bin/php/php5.4.4/bin/php -v I get the following:
Xdebug requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.
PHP 5.4.4 (cli) (built: Jul 4 2012 17:28:56)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
I have restarted MAMP and Apache and tried loading a page with phpinfo() and I do not see Xdebug listed. If I moved the old xdebug.so file back in place the error is removed and phpinfo() show xdebug as enabled
I managed to solve this issue by running
/Applications/MAMP/bin/php/php5.4.4/bin/pecl install xdebug At first I was seeing issues with the Zend API number using pecl. I followed this post: pecl installs for previous php version and set the following:
sudo /Applications/MAMP/bin/php/php5.4.4/bin/pear config-set php_ini /Applications/MAMP/bin/php/php5.4.4/conf/php.ini
sudo /Applications/MAMP/bin/php/php5.4.4/bin/pecl config-set bin_dir /Applications/MAMP/bin/php/php5.4.4/bin/
Not sure if these configs had something to do with it failing before
I have a MAMP server set up on a Mac Pro, I could not get xDebug to work. This was in my logs:
PHP Warning: PHP Startup: xdebug: Unable to initialize module
Module compiled with module API=20160303
PHP compiled with module API=20170718
These options need to match
in Unknown on line 0
This can be fixed by installing the latest xDebug.so. My problem with doing so was that is was writing to the wrong xDebug.so,not the MAMP server:
Build process completed successfully
Installing '/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so'
ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so (copy(/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so): failed to open stream: Operation not permitted)
The second line of #Shawn's answer was the solution:
sudo /Applications/MAMP/bin/php/php7.2.7/bin/pecl config-set bin_dir /Applications/MAMP/bin/php/php7.2.7/bin/
I was then able to build the latest xDebug.so to the right directory using pecl install xdebug.