2017 © Pedro Peláez
 

library crap

Define aliases for your favorite Composer packages.

image

geekish/crap

Define aliases for your favorite Composer packages.

  • Wednesday, June 13, 2018
  • by hannahwarmbier
  • Repository
  • 3 Watchers
  • 80 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 7 Open issues
  • 8 Versions
  • 17 % Grown

The README.md

crap: Composer Require Aliased Packages

Latest Version on Packagist ![Software License][ico-license] Build Status Coverage Status ![Quality Score][ico-code-quality] Total Downloads, (*1)

Define aliases for your favorite packages, making usage as simple as crap require monolog., (*2)

, (*3)

Install

PHP 5.6+ or 7.0+ required., (*4)

Because using multiple global Composer packages can create dependency conflicts, I recommend using consolidation/cgr over composer global require:, (*5)

``` bash cgr geekish/crap, (*6)


If you _don't_ mind descending into global dependency hell: ``` bash composer global require geekish/crap

Usage

To define your aliases (version constraints are optional):, (*7)

``` bash crap alias monolog monolog/monolog:^1.21, (*8)


To use your aliases: ``` bash crap require monolog crap update monolog crap remove monolog

To remove an alias:, (*9)

``` bash crap unalias monolog, (*10)


View a list of defined alias: ``` bash crap list

These commands simply find your aliases, and call the Composer commands with the real package names. If you provided a version constraint when defining your alias, crap will use this by default. You may provide a version constraint on the require and update commands; this will override any default., (*11)

The commands project, require, update, and remove all accept the same options/flags as the Composer commands that they call. For reference, see Composer's Commands documentation., (*12)

Why?

I'm lazy. I tried to create global shell aliases for packages that I used often. It worked, but if I typed out the full package name, I would get monolog/monolog/monolog/monolog. I also tried to write a Composer plugin, but there was no way to override the incoming package argument. So, I wrote crap., (*13)

Oh, the name? I was going to call it cra, and call the main class Crapp. Then I thought of the acronym, and it was just too good not to use., (*14)

Yes, it is totally inspired by Spongebob's POOP., (*15)

Change log

Please see CHANGELOG for more information what has changed recently., (*16)

Testing

After a composer install, to run the unit tests via phpunit:, (*17)

bash composer test, (*18)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*19)

Security

If you discover any security related issues, please email hannahwarmbier@gmail.com instead of using the issue tracker., (*20)

Credits

License

The MIT License (MIT). Please see License File for more information., (*21)

The Versions