PHPackages                             shineunited/conductor-gitignore-addon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shineunited/conductor-gitignore-addon

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

shineunited/conductor-gitignore-addon
=====================================

Addon for Conductor to support managing project gitignore file.

1.0.1(2y ago)05.4k2MITPHPPHP &gt;=8.0

Since Nov 16Pushed 2y ago3 watchersCompare

[ Source](https://github.com/shineunited/conductor-gitignore-addon)[ Packagist](https://packagist.org/packages/shineunited/conductor-gitignore-addon)[ RSS](/packages/shineunited-conductor-gitignore-addon/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (8)Versions (17)Used By (2)

shineunited/conductor-gitignore-addon
=====================================

[](#shineunitedconductor-gitignore-addon)

[![License](https://camo.githubusercontent.com/ee2b3ad7110a547f198a7cf2b996a17cb301d26a6fd3948fd142b2b6c26ba799/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7368696e65756e697465642f636f6e647563746f722d67697469676e6f72652d6164646f6e)](https://github.com/shineunited/conductor-gitignore-addon/blob/main/LICENSE)[![Latest Version](https://camo.githubusercontent.com/2a92579e258cc08347d52e62f2a7e3f71a14d118538b9e118a084b9ebffe6113/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7368696e65756e697465642f636f6e647563746f722d67697469676e6f72652d6164646f6e3f6c6162656c3d6c6174657374)](https://packagist.org/packages/shineunited/conductor-gitignore-addon/)[![PHP Version](https://camo.githubusercontent.com/520cae60e20c732ff504a1873ab6d14095e604efdc650267b1c1fa8dd66c8873/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7368696e65756e697465642f636f6e647563746f722d67697469676e6f72652d6164646f6e2f7068703f6c6162656c3d706870)](https://www.php.net/releases/index.php)[![Main Status](https://camo.githubusercontent.com/7d8121d60a7c1e1f1403e5552c2026923672ddd54d46ecaf7460e97fed5a9885/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7368696e65756e697465642f636f6e647563746f722d67697469676e6f72652d6164646f6e2f6275696c642e796d6c3f6272616e63683d6d61696e266c6162656c3d6d61696e)](https://github.com/shineunited/conductor-gitignore-addon/actions/workflows/build.yml?query=branch%3Amain)[![Release Status](https://camo.githubusercontent.com/0efba6bcdf69c3e98091284570f2139295c2f888025acdd227f02fd332e0f987/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7368696e65756e697465642f636f6e647563746f722d67697469676e6f72652d6164646f6e2f6275696c642e796d6c3f6272616e63683d72656c65617365266c6162656c3d72656c65617365)](https://github.com/shineunited/conductor-gitignore-addon/actions/workflows/build.yml?query=branch%3Arelease)[![Develop Status](https://camo.githubusercontent.com/2ddccaafd16b04023a1571abea5f02a5fc296042d15319dc823b4cffd758dd70/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7368696e65756e697465642f636f6e647563746f722d67697469676e6f72652d6164646f6e2f6275696c642e796d6c3f6272616e63683d646576656c6f70266c6162656c3d646576656c6f70)](https://github.com/shineunited/conductor-gitignore-addon/actions/workflows/build.yml?query=branch%3Adevelop)

Description
-----------

[](#description)

In conjunction with Conductor, this addon will automatically modify the project's .gitignore file to exclude paths installed with the Conductor or specified explicitly by other packages.

Installation
------------

[](#installation)

To add conductor-gitignore-addon, the recommended method via composer.

```
$ composer require shineunited/conductor-gitignore-addon
```

Configuration
-------------

[](#configuration)

The gitignore addon uses the Conductor configuration framework to parse parameters in the 'extra' section of the project's composer.json file.

### Parameters

[](#parameters)

###### gitignore.ignore-lockfile

[](#gitignoreignore-lockfile)

(boolean) If true, add the composer lockfile (composer.lock) to the gitignore file. Defaults to false.

###### gitignore.ignore-pharfile

[](#gitignoreignore-pharfile)

(boolean) If true, add the composer pharfile (composer.phar) to the gitignore file. Defaults to true.

###### gitignore.ignore-vendordir

[](#gitignoreignore-vendordir)

(boolean) If true, add the entire vendor directory to the gitignore file. Defaults to true.

###### gitignore.ignore-packages

[](#gitignoreignore-packages)

(boolen) If true, automatically add any packages installed with conductor installers outside of the vendor directory to the gitignore file. Defaults to true.

### Example

[](#example)

```
{
	"name": "example/project",
	"type": "project",
	"extra": {
		"gitignore": {
			"ignore-lockfile": true,
			"ignore-pharfile": false,
			"ignore-vendordir": true,
			"ignore-packages": true
		}
	}
}
```

Usage
-----

[](#usage)

### GitignoreProvider Capability

[](#gitignoreprovider-capability)

In addition to the automatically added gitignore rules based on the project's config, a composer plugin can explicitly add various rules via the GitignoreProvider capability.

#### Example Plugin

[](#example-plugin)

The plugin must implement Capable and provide the GitignoreProvider capability.

```
