2017 © Pedro Peláez
 

composer-installer plugin-installer

A composer installer for CakePHP 3.0+ plugins.

image

cakephp/plugin-installer

A composer installer for CakePHP 3.0+ plugins.

  • Sunday, December 24, 2017
  • by cakephp
  • Repository
  • 35 Watchers
  • 18 Stars
  • 1,614,001 Installations
  • PHP
  • 210 Dependents
  • 0 Suggesters
  • 12 Forks
  • 3 Open issues
  • 19 Versions
  • 11 % Grown

The README.md

CakePHP Plugin Installer

Build Status Latest Stable Version Total Downloads Software License, (*1)

A composer installer for installing CakePHP plugins., (*2)

This installer ensures your application is aware of CakePHP plugins installed by composer in vendor/., (*3)

Usage

Your CakePHP application should already depend on cakephp/plugin-installer, if not in your CakePHP application run:, (*4)

composer require cakephp/plugin-installer:*

Your plugins themselves do not need to require cakephp/plugin-installer. They only need to specify the type in their composer config:, (*5)

"type": "cakephp-plugin"

Multiple Plugin Paths

If your application uses multiple plugin paths. In addition to configuring your application settings you will also need to update your composer.json to ensure the generated cakephp-plugins.php file is correct:, (*6)

// Define the list of plugin-paths your application uses.
"extra": {
    "plugin-paths": ["plugins", "extra_plugins"]
}

Plugin Setup

For the installer to work properly ensure that your plugin's composer config file has a proper autoload section. Assuming your plugin's namespace is "MyPlugin" the autoload section would be like:, (*7)

"autoload": {
    "psr-4": {
        "MyPlugin\\": "src"
    }
}

Not strictly necessary for the working of the installer but ideally you would also have an "autoload-dev" section for loading test files:, (*8)

"autoload": {
    "psr-4": {
        "MyPlugin\\": "src"
    }
},
"autoload-dev": {
    "psr-4": {
        "MyPlugin\\Test\\": "tests",
        "Cake\\Test\\" : "vendor/cakephp/cakephp/test"
    }
}

If your top level namespace is a vendor name then your namespace to path mapping would be like:, (*9)

"autoload": {
    "psr-4": {
        "MyVendor\\MyPlugin\\": "src"
    }
},
"autoload-dev": {
    "psr-4": {
        "MyVendor\\MyPlugin\\Test\\": "tests",
        "Cake\\Test\\" : "vendor/cakephp/cakephp/test"
    }
}

Generating Manually

If you need to generate cakephp-plugins.php separately, you can simply run the dumpautoload command:, (*10)

composer dumpautoload

You cannot use --no-scripts with dumpautoload or cakephp-plugins.php will not generate., (*11)

If you don't want to re-generate the entire autoload dump, you can run just the scripts:, (*12)

composer run-script post-autoload-dump

Please see composer documentation for details., (*13)

The Versions

24/12 2017

dev-master

9999999-dev

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

24/12 2017

1.1.0

1.1.0.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

21/03 2017

1.0.0

1.0.0.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

28/04 2016

0.0.15

0.0.15.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

27/04 2016

0.0.14

0.0.14.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

27/04 2016

0.0.13

0.0.13.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

10/06 2015

0.0.12

0.0.12.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

06/02 2015

0.0.11

0.0.11.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

05/02 2015

0.0.10

0.0.10.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

04/02 2015

dev-revert-25-patch-1

dev-revert-25-patch-1

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

01/02 2015

0.0.9

0.0.9.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

23/01 2015

0.0.8

0.0.8.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

23/01 2015

0.0.7

0.0.7.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

17/01 2015

0.0.6

0.0.6.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

16/01 2015

0.0.5

0.0.5.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

15/01 2015

0.0.4

0.0.4.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

15/01 2015

0.0.3

0.0.3.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

15/01 2015

0.0.2

0.0.2.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires

29/08 2014

0.0.1

0.0.1.0

A composer installer for CakePHP 3.0+ plugins.

  Sources   Download

MIT

The Development Requires