Magento install on MacOs: Failed to set PHP CodeSniffer installed_paths Config - php

I was trying to install Magento 2 on MacOS 10.15 using https://alpineinc.com/2020/05/install-magento-2-locally-on-a-mac/.
I use the command:
php composer.phar create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2 --ignore-platform-reqs
but I receive: Failed to set PHP CodeSniffer installed_paths Config.
I tried with php composer.phar global require "squizlabs/php_codesniffer=* and brew install php-code-sniffer, but I get the same error.

Related

failed to install laravel via composer, failed to install symfony

i just installed laravel for the first time and got this error, i have reinstalled Composer many times but it doesn't work, maybe you guys can help me out
PHP version 8.2
i installed laravel global installer, but it shows symfony things error, i have reinstalled composer but it doesn't work
please see this url ( installation laravel)
first: install composer on OS (Linux , Windows or MAC)
If you have already installed Composer, you must be clear chache in composer:
php composer.phar clear-cache
or this command:
composer clear-cache
then Using installation via composer:
composer create-project laravel/laravel example-app

How to install custom version of symfony?

I want to install specific version of symfony with composer:
composer create-project symfony/website-skeleton blog 4.2.9
composer create-project symfony/website-skeleton:4.2.9 blog
In --help there are :
php composer.phar create-project vendor/project target-directory [version]
php composer.phar create-project vendor/project:version target-directory
But I get an error :
[InvalidArgumentException]
Could not find package symfony/website-skeleton with version 4.2.9.
Although it exists https://symfony.com/blog/symfony-4-2-9-released
It doesn't. Check https://packagist.org/packages/symfony/website-skeleton
You must request for exact version eg. 4.2.9.1

Laravel 5.5 fail when serve

5 project and after install Laravel and make php artisan serve it fails.
PHP Warning: require(/var/www/html/sidbrint/vendor/autoload.php):
failed to open stream: No such file or directory in
/var/www/html/sidbrint/artisan on line 18
PHP Fatal error: require():
Failed opening required '/var/www/html/sidbrint/vendor/autoload.php
(include_path='.:/usr/share/php') in /var/www/html/sidbrint/artisan on
line 18
I'm using an Ubuntu Server and I don't know hat to do.
When I install Laravel I use composer create-project --prefer-dist laravel/laravel blog "5.5.*"
If I don't put the version, it installs the 5.4 version, that works fine, but I need version 5.5 because is LTS.
Try using this it might solve your issue
composer update --no-scripts
composer update
is required as the vendor files are missing.
Seems that I needed some PHP packages, so I installed them:
sudo apt-get install php-dev php-mcrypt php-gd php-mbstring php-xml php-common php-zip apache2-dev libapache2-mod-php mysql-server composer npm
After this I executed composer create-project --prefer-dist laravel/laravel blog "5.5.*" and worked fine.
I have consulted this:
How to Install Laravel 5.5 on Ubuntu 16.04 with Apache

How to install Laravel 5.2

I am installing the Laravel framework in directory /var/html/www, using command
php composer.phar global require "laravel/installer"
It changes installation directory automatically, shown message is:
Changed current directory to /home/.composer
What is the reason? Do I need to add any other command?
This is because you installed the Laravel installer with global, which makes it globally available for all projects and installs it to /home/.composer.
This should be all right because it is only Laravel's installer and not a Laravel project which should be created in a later step (see below) and this should be installed in your /var/html/www then.
Run the following command in your /var/html/www to create a new project (doesn't need Laravel installer):
composer create-project --prefer-dist laravel/laravel YourProjectName 5.2
or use the Laravel installer
laravel new YourProjectName
For more info how to install Laravel see the documentation here.
Let use
composer create-project --prefer-dist laravel/laravel project_name "5.2.*"
1) change the permission of your directory to allow CRUD.
Open Terminal and paste this command
sudo chmod -R o+rw /var/html/www
2) update the package manager cache by running:
sudo apt-get update
3) cd to your directory to check if composer json does exist
cd /var/html/www
and type
composer
4) To install composer in your directory run
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
5) To test if it's installed run
composer
6) Now install laravel 5.2 in your directory (/var/html/www)
composer create-project laravel/laravel ProjectName 5.2 --prefer-dist

Cant install dependencies with composer in Jetbrains

I'm trying to install dependencies with composer in JetBrains, but I keep getting the following error when I try to add a dependency...
C:\wamp\bin\php\php5.3.13\php.exe
C:\wamp\www\composer.phar> require aws/aws-sdk-php:2.6.0 -n --no-progress
Failed to install

Categories