Silly v1.5.1 Release Notes

Release Date: 2016-09-16 // over 7 years ago
  • 👻 #27, #28, #29: Throw an explicit exception when commands are registered as static calls to non static method calls.

    Wrong way:

    $this-\>application-\>command('greet', ['MyClass', 'foo']);class MyClass {public function foo() { ... }}
    

    👻 That will now correctly throw an exception.

    This should be used instead:

    $this-\>application-\>command('greet', [new MyClass(), 'foo']);
    

    📄 Or you can use dependency injection with an autowiring container (http://mnapoli.fr/silly/docs/dependency-injection.html), for example with PHP-DI: http://mnapoli.fr/silly/docs/dependency-injection.html That way you don't have to change your code.