2017 © Pedro Peláez
 

library zf2-components-list-generator

Generate a list of Zend Framework 2 components used by a library

image

robertboloc/zf2-components-list-generator

Generate a list of Zend Framework 2 components used by a library

  • Tuesday, April 26, 2016
  • by robertboloc
  • Repository
  • 1 Watchers
  • 14 Stars
  • 2,813 Installations
  • PHP
  • 33 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

zf2-components-list-generator

Build Status Total Downloads License, (*1)

Generates a list of Zend Framework 2 components used by a project., (*2)

In your composer.json file instead of using "zendframework/zendframework" : "2.5.*" and so requiring the whole framework, use this script to get a list of used components, and require only those. Better yet, specify your composer file and the script will replace your "zendframework/zendframework" : "2.5.*" with the components used by your application., (*3)

For more info on why you should do this in your module/application read this blog post., (*4)

Table of contents

Installation

  1. Add this package to your composer.json file, in the require-dev section
    {
        "require-dev": {
            "robertboloc/zf2-components-list-generator": "dev-master"
        }
    }
  1. Run composer update

This will install the script into vendor/bin/zf2_components_list_generator.php, (*5)

Usage

Execute the CLI script providing some/all of the following options :, (*6)

--help | -h Get usage information.
--project | -p Path of the project to be scanned.
--composer | -c Path to the composer.json file to be updated. If not specified the output will be printed to the standard output.
--version | -v Use a specific version for the output., (*7)

For example calling the script using only the -p option:, (*8)

php vendor/bin/zf2_components_list_generator.php -p /projects/MyProject/

Will output something like:, (*9)

Replace "zendframework/zendframework" in your composer.json file with :
"zendframework/zend-mvc": "2.5.*",
"zendframework/zend-form": "2.5.*",
"zendframework/zend-db": "2.5.*",
"zendframework/zend-inputfilter": "2.5.*",
"zendframework/zend-view": "2.5.*",
"zendframework/zend-servicemanager": "2.5.*",
"zendframework/zend-loader": "2.5.*",
"zendframework/zend-stdlib": "2.5.*"

You can copy and paste this information directly into your composer file. If the -c option was used, the composer file will be updated automatically and the message will be :, (*10)

/projects/MyProject/composer.json updated

Roadmap

  • Detect canonicalized components

The Versions

26/04 2016

dev-master

9999999-dev https://github.com/robertboloc/https://github.com/robertboloc/zf2-components-list-generator

Generate a list of Zend Framework 2 components used by a library

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 generator components

26/04 2016

v1.0.0

1.0.0.0 https://github.com/robertboloc/https://github.com/robertboloc/zf2-components-list-generator

Generate a list of Zend Framework 2 components used by a library

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 generator components

26/04 2016

dev-feature-6

dev-feature-6 https://github.com/robertboloc/https://github.com/robertboloc/zf2-components-list-generator

Generate a list of Zend Framework 2 components used by a library

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 generator components

26/04 2016

dev-feature-vagrant

dev-feature-vagrant https://github.com/robertboloc/https://github.com/robertboloc/zf2-components-list-generator

Generate a list of Zend Framework 2 components used by a library

  Sources   Download

MIT

The Requires

 

The Development Requires

zf2 generator components