Run command
php composer.phar update --ignore-platform-reqs
php composer.phar require magento/product-community-edition 2.3.7 --no-update
/applications/krmrsukxsw/public_html/w/vendor/magento/framework/Setup/Declaration/Schema/Db/DefinitionAggregator.php
Install and Download Magento 2 in Blank directory
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.2 .
Once the download is complete then create DB and run below command in root directory.
bin/magento setup:install \
--base-url=http://local.motoris.com \
--db-host=localhost \
--db-name=motoris \
--db-user=root \
--db-password=Mysql123+ \
--admin-firstname=admin \
--admin-lastname=admin \
--admin-email=admin@admin.com \
--admin-user=admin \
--admin-password=Admin123+1 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1
To Update Magento 2
First run
php composer.phar require magento/product-community-edition 2.3.7 --no-update
Then
php composer.phar update --ignore-platform-reqs
Enable omni squareup module
Sample Data install
Run command
php composer2.phar require magento/module-sample-data
Then Run to add sample data
php bin/magento sampledata:deploy
Check already saved magento2 keys
php composer2.phar config --global --list | grep repo.magento.com
Unset keys
php composer2.phar config --global --unset auth.http-basic.repo.magento.com
On localhost check keys
nano ~/.composer/auth.json
Add keys
php composer2.phar config --global --auth.http-basic.repo.magento.com 97bcf80c958fc09e3a5c6c0e5be17fb0 dd688c9f5d
a66a420ee663f980d1de50
Add keys for locahost
php composer2.phar config --auth http-basic.repo.magento.com 97bcf80c958fc09e3a5c6c0e5be17fb0 dd688c9f5da66a420ee
663f980d1de50