Glossary · E-commerce
Composer
- Area
- E-commerce
- Related
- Security advisory, Dependency, Repository, Lock file, Symfony
Composer is a tool for dependency management in PHP: a project declares the libraries it depends on, and Composer installs and updates them.
All a project needs to get started with Composer is a file called composer.json. According to the Composer documentation on basic usage, the file describes the project's dependencies
Dependency
A dependency is a third-party software package that a project builds on and needs in order to run; packages required by a dependency count as dependencies too. Read in the glossary → and can hold other metadata as well. Composer works project by project. It installs packages into a directory inside the project, such as vendor, and by default installs nothing globally.
The same file can also state which versions of server software a project requires. Composer handles this through platform packages, which represent software installed on the server, such as PHP
PHP
PHP is a widely used, general-purpose, open-source scripting language that is especially suited to web development; the name is a recursive acronym for 'PHP: Hypertext Preprocessor'. itself and its extensions. The exact package versions installed are recorded elsewhere, in the lock file
Lock file
A lock file records the exact versions of all packages installed in a project, so that every installation ends up in the same state; with Composer it is composer.lock. Read in the glossary → . The command composer audit compares the installed packages with security advisories
Security advisory
A security advisory is a published notice about a vulnerability in a software component that names the affected versions and, where available, the first fixed version. Read in the glossary → .
In our Shopware 5
Shopware
Shopware is e-commerce software from shopware AG in Schöppingen, Germany; the vendor says its current product, Shopware 6, is a complete redevelopment of Shopware 5. Read in the glossary → work, the composer.json that ships with the shop system tells us which PHP versions a shop allows. Our standard approach is to leave that file as it is. The dependencies we update go into our own Composer manifest instead: a second file, kept apart from the shipped one. We run composer audit on those updated dependencies as well.
Where the term appears
See also
-
Security advisory
A security advisory is a published notice about a vulnerability in a software component that names the affected versions and, where available, the first fixed version.
E-commerce
-
Dependency
A dependency is a third-party software package that a project builds on and needs in order to run; packages required by a dependency count as dependencies too.
E-commerce
-
Repository
A repository (on GitHub, for example) holds a software project with all its files, its documentation and the revision history of every file.
E-commerce
-
Lock file
A lock file records the exact versions of all packages installed in a project, so that every installation ends up in the same state; with Composer it is composer.lock.
E-commerce
-
Symfony
Symfony is an open-source PHP framework, a ready-made foundation for web applications, released under the MIT licence and developed by its community to a fixed release schedule.
Cross-cutting
Sources
-
Composer Documentation: Introduction (opens in a new tab)
Composer (getcomposer.org) accessed
-
Composer Documentation: Basic usage (opens in a new tab)
Composer (getcomposer.org) accessed
-
Composer Documentation: Command-line interface / Commands (audit) (opens in a new tab)
Composer (getcomposer.org) accessed