The project has a built-in Composer dependency manager, which downloads the necessary dependencies after the first installation of the Aleksmir Core framework. By the way, if you install Aleksmir Core from a zip archive, then you don't have to download the dependencies. This is useful if your hosting does not allow you to run programs on the command line.
Composer comes with a handy class autoloader, located in the file /vendor/autoload.php . It allows you to connect PHP class files automatically without the need to use operators to insert code, such as include(), require().
The Composer program itself is located in the /vendor/composer directory. The settings are located in the composer files.json and composer. lock. Basic settings in the composer.json file:
"name": "aleksmir / core"
- project name;
aleksmir-manufacturer, core - core of the Aleksmir Core framework
Setting "license": "MIT" - license type
Setting "minimum-stability": "dev" - the dev stability level is specified
The "psr-4" key indicates that the namespace is mapped to a subdirectory structure; the namespace prefix Aleksmir\\ points to the modules directory.
The key "files" < /strong> indicates that at the beginning of the program launch, you need to upload a file modules/Core/Helpers/helpers.php, which contains helper functions
The `require ' block contains a list of packages that the Aleksmir Core framework depends on:
The composer.lock file stores the versions of packages that are installed.