Coder Social home page Coder Social logo

ncou / packageversions-composer-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ocramius/packageversions

0.0 1.0 0.0 244 KB

:package: Composer addon to efficiently get installed packages' version numbers

License: MIT License

Shell 0.28% PHP 99.72%

packageversions-composer-plugin's Introduction

Package Versions

This utility provides quick and easy access to version information of composer dependencies.

This information is derived from the composer.lock file which is (re)generated during composer install or composer update.

$version = \PackageVersions\Versions::getVersion('ocramius/package-versions');

var_dump($version); // 1.0.0@0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33

Build Status Scrutinizer Code Quality Code Coverage Downloads Packagist Dependencies

Installation

composer require ocramius/package-versions

It is suggested that you use an optimized composer autoloader (to prevent autoload I/O when accessing the PackageVersions\Versions API) in your composer.json:

...
    "config": {
        "optimize-autoloader": true
    },
...

In case you manually generate your autoloader via the CLI use the --optimize flag:

composer dump-autoload --optimize

Use-cases

This repository implements PackageVersions\Versions::getVersion() in such a way that no IO happens when calling it, because the list of package versions is compiled during composer installation.

This is especially useful when you want to generate assets/code/artifacts that are computed from the current version of a certain dependency. Doing so at runtime by checking the installed version of a package would be too expensive, and this package mitigates that.

Professional Support

Professionally supported ocramius/package-versions is available through Tidelift.

You can also contact the maintainer at [email protected] for looking into issues related to this package in your private projects.

packageversions-composer-plugin's People

Contributors

aydinhassan avatar carusogabriel avatar d42ohpaz avatar enumag avatar holtkamp avatar jean85 avatar kstanley-uncc avatar majkl578 avatar malukenho avatar ocramius avatar ostrolucky avatar samsonasik avatar staabm avatar stof avatar thadafinser avatar tomcyr avatar weshooper avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.