XF 2.0 Conflicts with using XenForo 2.0 in Symfony app

x3sphere

Active member
Hi,

My app is built on Symfony and I'm trying to include XF as a service. This worked fine in 1.5, but because 2.0 uses some Symfony components, it seems the vendor libraries in 2.0 are overriding the ones already loaded by Symfony itself. This is causing errors like:

Code:
An exception occurred: [Error] Call to undefined method Symfony\Component\VarDumper\Dumper\HtmlDumper::setDisplayOptions() in /path/var/cache/dev/appDevDebugProjectContainer.php on line 3736

The VarDumper in the latest version of symfony has that function, but the version included in XF doesn't.

So I guess my question is, is there a way to make the vendor libraries loaded by XF contained to the XF namespace only? Or am I looking at this the wrong way?

Thanks for any help.

This is the code I'm using to initialize XF, btw:

Code:
        $fileDir = '/path/forums';
        require_once($fileDir . '/src/XF.php');

        XF::start($fileDir);
 
Unfortunately the limits are really with PHP there -- there wouldn't be any way to isolate all of the XF code if you're running it within other PHP code. The only real option to do that would involve running the XF code in a separate PHP process some how (eg, wrapping what you need in a REST API type thing).

If the current Symfony API is a superset (and thus doesn't have BC breaks), then you might be able to override our autoloader to call the new versions of classes.
 
Back
Top Bottom