Use Composer on our shared
en:Use Composer on our shared
he:השתמש מלחין המשותפת שלנו
ro:Utilizaţi compozitor pe nostru comun
ru:Используйте композитор на нашей общей
pl:Użyj kompozytor na nasze wspólne
ja:我々 が共有の作曲家を使用します。
ar:استخدم الملحن على جهودنا المشتركة
zh:使用上我们共享的作曲家
de:Verwenden Sie Komponist auf unserer gemeinsamen
nl:Gebruik onze gedeelde componist
it:Compositore di uso sul nostro comune
pt:Use o compositor na nossa compartilhada
es:Uso Composer en nuestro compartido
fr:Utilier Composer sur nos offres mutualisées
What si JSON ?
JSON (JavaScript Object Notation) is a textual data format derived from the notation of JavaScript language objects. It allows you to represent structured information as XML allows.
The big strengths of JSON
- Considering it's a simple character string , JSON works in all environments and languages that can handle text.
- It is learned in 5 minutes, as its syntax is short to know.
- It is less verbose, therefore lighter than the XML while remaining readable to humans.
- It allows you to transmit all types of data (table, chain, whole, object...)
- Since it is almost universal; it is very simple to dialogue from one language to another via JSON (PHP to Javascript is a common example)
Compose is now integrated with Plesk (version 12.5 at the time of writing this tutorial, cf page associated with the site of Plesk)
In fact, it is now quick and easy to install the dependencies to yor r projects.
If you do not know call, you can find more information on the official : https://getcomposer.org/
Simply put, call allows you to set up and update the libraries used in your PHP projects through a single JSON format file : composer. JSON .
Relevant libraries are retrieved from the site https://packagist.org/ and the implementation of the dependencies is therefore quick and convenient.
If you use dial to your different developments, you gold-and-already know its operation.
In this tutorial we will see how to use call from Plesk.
You will find most of the PHP file composer. JSON frameworks (This is also the case for the various expaces projects PHP Github now ).
The composer. JSON file structure allows easy reading of the file and therefore can know what are the prerequisites necessary for the establishment of a framework or PHP project (version of PHP, necessary libraries, etc.) :
So let's create a file composer. json at the root of our service, in the directory httpdocs as below :
Note that you can also create and edit file composer. json through your FTP client if you want.
We now edit the file to inform the prerequisites and the libraries we need for our project :
We must now ask cope to interpret the JSON file that was created. To do this, we will go to the tab Applications and click on the button Scan (ou Analyze Depending on the used language ) so that Plesk search any file composer. json.
Research being terminated, you should then see the presence of a new application :
Then click on the name of your application to continue :
Finally, it you just click on the button Install Dependencies so compose repatriates your project dependencies :
Next the necessary dependencies, the establishment may be shorter or longer. You can also consult the progress by clicking on "View the utility output " in the pop-up in the bottom right of your screen :
Therefore, you will have something similar like this :
Once the operation is complete, the file vendor containing all the dependencies in your project will be created and complete (If the operation is performed without a hitch, if applicable, you will be notified through the pop up located at the bottom right of your screen ) :
You can then proceed to update dependencies returning in the application of your delivery tab and then click on the Update button dependencies as shown below :
Enable comment auto-refresher