fuel / oil

Fuel PHP Framework - Fuel v1.x Oil command-line package
http://fuelphp.com/docs/packages/oil/intro.html
106 stars 67 forks source link

Removed "static" from task fn generation #200

Closed cboden closed 11 years ago

cboden commented 11 years ago

Removed keyword static from oil's generation class. Newly generated tasks will match the documentation.

I ran into the issue where I had created an abstract class for my task to extend with parameters in the __construct - my ::run tried to instantiate new static('a', 'b') only to have oil error out.

Because my oil generated static methods I didn't think oil would also instantiate the class.

WanWizard commented 11 years ago

refine doesn't call methods statically, it uses call_user_func_array() on an instance. So indeed the static keyword has no business here.