---
description: https://getcomposer.org/
---

# Composer

## The Basics

### Introduction

Download [page](https://getcomposer.org/download/)

<details>

<summary>Example of <code>composer.json</code></summary>

```json
{
  "name": "your-vendor-name/package-name",
  "description": "A short description of what your package does",
  "keywords": ["Word", "Composer", "Package"],
  "license": "MIT",
  "authors": [
    {
      "name": "Your Name",
      "email": "test@test.com",
      "homepage": "https://github.com/kleninmaxim"
    }
  ],
  "require": {
    "illuminate/collections": "^10.9"
  },
  "autoload": {
    "psr-4": {
      "Core\\": "Core/",
      "Http\\": "Http/"
    }
  },
  "require-dev": {
    "pestphp/pest": "^2.5"
  },
  "config": {
    "allow-plugins": {
      "pestphp/pest-plugin": true
    }
  },
  "autoload": {
    "psr-4": {
      "YourClassName\\": "src/"
    }
  },
  "autoload-dev": {
    "psr-4": {
      "YourClassName\\Tests\\": "tests/"
    }
  }
}
```

</details>

## Digging Deeper

### Packagist

Web page: [packagist](https://packagist.org/)

### Commands

* `composer outdated -D` - show you the list of packages, current version and latest version
* `composer search <any-package-you-want-to-find>` - search package in packagist

