W
W
WebDev2019-07-30 18:17:45
PHP
WebDev, 2019-07-30 18:17:45

Why does PhpStorm require curl and json extension to be installed?

Curl and json_encode calls are highlighted, on hover it says that there are no corresponding extensions in composer.json.
There is also an "add" button that added the following to composer.json:
"ext-curl": "*",
"ext-json": "*"
What are these extensions and why are they needed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Ninazu, 2019-07-30
@kirill-93

An extension is additional modules in PHP, they implement specifically in your case work with CURL and JSON.
Find out connected modules
https://www.php.net/manual/ru/function.extension-l...
List of all modules
https://www.php.net/manual/ru/extensions.alphabeti...
If they are installed on your server, it is not a fact that they will be installed on another server. Therefore, PHPStorm recommends adding them to the composer rules so that if deployed on another server, the composer will tell you that the extensions are missing.
If the inspector pisses you off, you can turn off this notification.
5d4061ba05631701466003.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question