getherbert / herbert

The WordPress Plugin Framework:
http://getherbert.com/
634 stars 95 forks source link

Fatal error: Class Herbert\Framework\Application contains 1 abstract method and must therefore be #182

Open darklord1807 opened 7 years ago

darklord1807 commented 7 years ago

If you have done "composer update" and getting the below error:

Fatal error: Class Herbert\Framework\Application contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\Contracts\Foundation\Application::runningInConsole) in C:\htdocs\videoserver\ws_plugin\vendor\getherbert\framework\Herbert\Framework\Application.php on line 12

FIX:

In file vendor\getherbert\framework\Herbert\Framework\Application.php add this :

public function runningInConsole()
{

}
bradleyess commented 7 years ago

Thank you for this. Nice to see this framework is still getting used, could we band together and revive it? It's the best WP Plugin framework I've encountered, sad to see it no longer maintained.

darklord1807 commented 7 years ago

Now you should also add:

    public function getCachedPackagesPath()
    {

    }

in vendor\getherbert\framework\Herbert\Framework\Application.php

darklord1807 commented 7 years ago

@inthedeepend Really busy. I do not think will be able to help . But I love it and still using it. Maybe we can do a commit to fix these small issues.

tedsecretsource commented 6 years ago

The error message I was getting was:

( ! ) Fatal error: Class Herbert\Framework\Application contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (Illuminate\Contracts\Foundation\Application::runningInConsole, Illuminate\Contracts\Foundation\Application::runningUnitTests, Illuminate\Contracts\Foundation\Application::getCachedPackagesPath) in /home/vagrant/WordPress/plugins/RATp/vendor/getherbert/framework/Herbert/Framework/Application.php on line 12

So I added

    public function runningInConsole()
    {

    }

    public function runningUnitTests()
    {

    }

    public function getCachedPackagesPath()
    {

    }

But now I wonder if I need to actually put anything into those functions or if they get overriden somewhere down the line.

Love this project, really sad more people can't help.

tedsecretsource commented 6 years ago

FWIW, this was solved by setting "illuminate/container": "~5.1.0" in composer.json.