Composer fails to download PHP Codesniffer to plugin

I am getting an error when trying to install the squizlabs/php_codesniffer package via composer into my WordPress plugin.

I am using Flywheel for the local server, with composer 1.8.6 installed globally at /usr/local/bin/composer.phar

I have also tried using the composer file locally in the plugin folder, but I still get the same error. This is the command I run while in the plugin directory

composer require --dev squizlabs/php_codesniffer

Topic composer Wordpress

Category Web


I managed to fix the error by updating openssl as @Sally Cj said. I was still using Mac OS El Capitan, so I tried the Homebrew method of updating it, but that didnt fix it.

I eventually ended up just upgrading to the latest "Mojave" OS version, and it works 100% now.

enter image description here

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.