We are slowly migrating our current system to Symfony2, but the majority of the codebase is still in an inhouse framework. I want to leverage some functionality built in Symfony2 from within classes in the old legacy framework. Is there an easy way to access a Symfony2 service from outside of the Symfony framework?
class MyOldClass extends SomethingOld
{
public function getSomethingViaSymfony()
{
$service = new SomeSymfonyService();
$results = $service->getResults();
}
}
My assumption is that this would be a failure, for the dependencies wouldn't be injected.