When developing websites or extensions for Joomla, sometimes tasks arise that have already been solved by someone. In the development world, such solutions are designed as libraries - sets of files and classes that make it possible to simply plug them into your script and use code written and well-tested by other developers. These can be php libraries for image processing, working with PDF, connecting to third-party services via the REST API, and much, much more.
PHP libraries are convenient because they can be accessed from anywhere in the Application: from a plugin, component model, module, etc. This article explains how to properly connect a third-party PHP SDK to your project.
Composer
Joomla does not support working with Composer directly. In order to use the library in your work, you need to "wrap" it in a Joomla extension type library
and install it. In serious projects, the approach of fixing versions of all components of the project is adopted: the code has been checked more than once, tested and allowed to work in the production.
You create a package with your library, install it wherever you need it. As new versions of the library are released, you update your wrapper and get all the advantages of working with Joomla extensions: updating extensions in the standard way, including through the CLI. View the Changelog of the extension in the admin area BEFORE updating, etc.