2017 © Pedro Peláez
 

library easy-upgrades

A simple trait to make it easier to upgrade things

image

navarr/easy-upgrades

A simple trait to make it easier to upgrade things

  • Wednesday, August 31, 2016
  • by navarr
  • Repository
  • 0 Watchers
  • 0 Stars
  • 5,033 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

Easy Upgrades!

"Wow, I didn't know I needed this" - Everyone, ever, (*1)

How to install

composer require navarr/easy-upgrades

Holy crap, that's it?, (*2)

OF COURSE IT IS! What year do you think it is?!, (*3)

How to use

In your class, use CallableUpdateTrait;, like so:, (*4)

class SomeCrappyClass
{
    use CallableUpdateTrait;

    public function somethingTriggeredExternally($currentVersion, $futureVersion)
    {
        $this->runAt('2.0.0', $currentVersion, function() {
            echo 'Hello, 2.0.0!',PHP_EOL;
        });
    }
}

Basically, using CallableUpdateTrait gives you the runAt method. Neat stuff!, (*5)

Wait, this only contains one class that does practically nothing

Yes, but now you don't have to write it into every project, or every module, or whatever., (*6)

Why this?

It's a common function I wish I had in Magento 2 - so I made it. It doesn't need Magento, or have any dependencies. It just does what it says on the tin., (*7)

The Versions

31/08 2016

dev-master

9999999-dev

A simple trait to make it easier to upgrade things

  Sources   Download

MIT

30/08 2016

v1.0.0

1.0.0.0

A simple trait to make it easier to upgrade things

  Sources   Download

MIT