Composer (software)

Last updated
Composer
Developer(s) Nils Adermann,
Jordi Boggiano
Initial releaseMarch 1, 2012;12 years ago (2012-03-01) [1]
Stable release
2.8.3 [2]   OOjs UI icon edit-ltr-progressive.svg / 17 November 2024;31 days ago (17 November 2024)
Repository
Written in PHP
Operating system Cross-platform
Type Package manager
License MIT License
Website getcomposer.org

Composer is an application-level dependency manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. It was developed by Nils Adermann and Jordi Boggiano, who continue to manage the project. They began development in April 2011 and first released it on March 1, 2012. [1] Composer is strongly inspired by Node.js's "npm" and Ruby's "bundler". [3] The project's dependency solving algorithm started out as a PHP-based port of openSUSE's libzypp SAT solver. [4]

Contents

Composer runs from the command line and installs dependencies (e.g. libraries) for an application. It also allows users to install PHP applications that are available on "Packagist" [5] which is its main repository containing available packages. It also provides autoload capabilities for libraries that specify autoload information to ease usage of third-party code.

Syntax

Commands

Composer offers several parameters including : [6]

Libraries definition

Example of composer.json generated by the following command:

composer require monolog/monolog
{"require":{"monolog/monolog":"1.2.*"}}

Versions

The different authorized versions of the libraries are defined by: [7]

SymbolRole (placed before a version number)Example
>=allows to extend the number. Moreover, we can use: >, <, <=."php": ">=5.5.9" includes PHP 7.
!=excludes a version.
-defines a range of versions.
*extends to all subversions."symfony/symfony": "3.1.*" includes the 3.1.1.
~extends to the next versions of the same level."doctrine/orm": "~2.5" also concerns the 2.6, but neither the 2.4 nor the 3.0.
^same as tilde, only if there is a backward compatibility.

Supported frameworks

See also

Related Research Articles

The Comprehensive Perl Archive Network (CPAN) is a software repository of over 250,000 software modules and accompanying documentation for 39,000 distributions, written in the Perl programming language by over 12,000 contributors. CPAN can denote either the archive network or the Perl program that acts as an interface to the network and as an automated software installer. Most software on CPAN is free and open source software.

<span class="mw-page-title-main">Package manager</span> Software tools for handling software packages

A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.

<span class="mw-page-title-main">KDevelop</span> Integrated development environment

KDevelop is a free and open-source integrated development environment (IDE) for Unix-like computer operating systems and Windows. It provides editing, navigation and debugging features for several programming languages, and integration with build automation and version-control systems, using a plugin-based architecture.

Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.

<span class="mw-page-title-main">Mantis Bug Tracker</span> Bug tracking system

Mantis Bug Tracker is a free and open source, web-based bug tracking system. The most common use of MantisBT is to track software defects. However, MantisBT is often configured by users to serve as a more generic issue tracking system and project management tool.

Laminas Project is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based packages. The framework uses various packages by the use of Composer as part of its package dependency managers; some of them are PHPUnit for testing all packages, Travis CI for continuous Integration Services. Laminas provides to users a support of the model–view–controller (MVC) in combination with Front Controller solution. MVC implementation in Laminas has five main areas. The router and dispatcher functions to decide which controller to run based on data from URL, and controller functions in combination with the model and view to develop and create the final web page.

The FreeBSD Ports collection is a package management system for the FreeBSD operating system. Ports in the collection vary with contributed software. There were 38,487 ports available in February 2020 and 36,504 in September 2024. It has also been adopted by NetBSD as the basis of its pkgsrc system.

<span class="mw-page-title-main">ZYpp</span> Linux package management library

ZYpp is a package manager engine that powers Linux applications like YaST, Zypper and the implementation of PackageKit for openSUSE and SUSE Linux Enterprise. Unlike some more basic package managers, it provides a satisfiability solver to compute package dependencies. It is a free and open-source software project sponsored by SUSE and licensed under the terms of the GNU General Public License v2 or later. ZYpp is implemented mostly in the programming language C++.

<span class="mw-page-title-main">Homebrew (package manager)</span> macOS CLI package manager in Ruby

Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple's operating system, macOS, as well as Linux. The name is intended to suggest the idea of building software on the Mac depending on the user's taste. Originally written by Max Howell, the package manager has gained popularity in the Ruby on Rails community and earned praise for its extensibility. Homebrew has been recommended for its ease of use as well as its integration into the command-line interface. Homebrew is a member of the Open Source Collective, and is run entirely by unpaid volunteers.

npm JavaScript package manager

npm is a package manager for the JavaScript programming language maintained by npm, Inc., a subsidiary of GitHub. npm is the default package manager for the JavaScript runtime environment Node.js and is included as a recommended feature in the Node.js installer.

Scratchbox 2 is a cross-compilation toolkit designed to make embedded Linux application development easier. It also provides a full set of tools to integrate and cross-compile an entire Linux distribution.

<span class="mw-page-title-main">Ember.js</span> JavaScript framework

Ember.js is an open-source JavaScript web framework that utilizes a component-service pattern. It is designed to allow developers to create scalable single-page web applications by incorporating common idioms, best practices, and patterns from other single-page-app ecosystem patterns into the framework.

mpv (media player) Free and open-source media player software

mpv is free and open-source media player software based on MPlayer, mplayer2 and FFmpeg. It runs on several operating systems, including Unix-like operating systems and Microsoft Windows, along with having an Android port called mpv-android. It is cross-platform, running on ARM, MIPS, PowerPC, RISC-V, s390x, x86/IA-32, x86-64, and some other by 3rd party.

CocoaPods is an application level dependency manager for Objective-C, Swift and any other languages that run on the Objective-C runtime, such as RubyMotion, that provides a standard format for managing external libraries. It was developed by Eloy Durán and Fabio Pelosin, who continue to manage the project with the help and contributions of many others. They began development in August 2011 and made the first public release on September 1, 2011. CocoaPods is strongly inspired by a combination of the Ruby projects RubyGems and Bundler.

<span class="mw-page-title-main">KDE Frameworks</span> Collection of libraries and software frameworks for the Qt framework

KDE Frameworks is a collection of libraries and software frameworks readily available to any Qt-based software stacks or applications on multiple operating systems. Featuring frequently needed functionality solutions like hardware integration, file format support, additional graphical control elements, plotting functions, and spell checking, the collection serves as the technological foundation for KDE Plasma and KDE Gear. It is distributed under the GNU Lesser General Public License (LGPL).

Grunt is a JavaScript task runner, a tool used to automatically perform frequent tasks such as minification, compilation, unit testing, and linting. It uses a command-line interface to run custom tasks defined in a file. Grunt was created by Ben Alman and is written in Node.js. It is distributed via npm. As of October 2022, there were more than 6,000 plugins available in the Grunt ecosystem.

<span class="mw-page-title-main">Pop PHP Framework</span> Free and open source PHP web framework

The Pop PHP Framework a free and open source PHP Web framework that was created by Nick Sagona. It is distributed under the BSD License and hosted on GitHub. The framework is intended to be utilized for rapid application development, with an emphasis on web applications.

<span class="mw-page-title-main">Deno (software)</span> Secure JavaScript and TypeScript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

RoadRunner is an open-source application server, load-balancer and process manager written in Golang (Go) and implemented by PHP 7. It is used in rapid application development to speed up the performance of large web applications for users. It is often used in conjunction with frameworks like Symfony, Laravel, and others to enhance the performance and responsiveness of PHP web applications.

References

  1. 1 2 Software release, github.com, Retrieved April 24, 2016.
  2. "Release 2.8.3". 17 November 2024. Retrieved 21 November 2024.
  3. Getting Started/Dependency management, getcomposer.org, Retrieved November 28, 2013.
  4. "composer/composer". Jun 23, 2020. Retrieved Jun 24, 2020 via GitHub.
  5. See packagist.org
  6. "Command-line interface / Commands". getcomposer.org.
  7. "Versions and constraints - Composer". getcomposer.org.