blumilksoftware / blt

Behat+Laravel toolbox. Still in progress.
https://packagist.org/packages/blumilksoftware/blt
MIT License
4 stars 0 forks source link

#3 - app() helper refactor #7

Closed krzysztofrewak closed 3 years ago

krzysztofrewak commented 3 years ago

I took the shortcuts because I couldn't remove app() helper in any solid way. I just created Application trait and added it into other feature traits:

trait Application
{
    protected function getContainer(): Container
    {
        return app();
    }
}

It's not perfect solution, but without contexts ran via service container we won't be able to do this any other way.

I also moved Laravel dependencies to dev-dependencies. I believe that this will be more friendly for using BLT with different versions of Laravel, as package's dev-dependencies are not downloaded to main project.

I also created (and preliminary tested) a Toolbox class with all the features included.

It should close #3.