我们也遇到了同样的问题,并尝试了一种实际可行的黑客解决方案。
步骤1)查找并替换Symfony\\Process 到SymfonyMyPrefix\\Process 在项目文件夹中。
步骤2)查找并替换namespace Symfony; 到namespace SymfonyMyPrefix; 在项目文件夹中。
步骤3)打开autoload_files.php 由编写器创建的文件,并重命名返回数组索引,例如:
//From
return array(
\'7b11c4dc42b3b3023073cb14e519683c\' => $vendorDir . \'/symfony/../../***.php\',
\'8a9dc1de0ca7e01f3e08231539562f61\' => $vendorDir . \'/someotherlibifneed/../../***.php\',
);
//TO
return array(
\'7b11c4dc42b3b3023073cb14e519683cMYPREFIX\' => $vendorDir . \'/symfony/../../***.php\',
\'8a9dc1de0ca7e01f3e08231539562f61MYPREFIX\' => $vendorDir . \'/someotherlibifneed/../../***.php\',
);
步骤4)打开
autoload_static.php 由composer创建的文件,并重命名文件数组索引,例如:
//From
return array(
\'7b11c4dc42b3b3023073cb14e519683c\' => $vendorDir . \'/symfony/../../***.php\',
\'8a9dc1de0ca7e01f3e08231539562f61\' => $vendorDir . \'/someotherlibifneed/../../***.php\',
);
//TO
return array(
\'7b11c4dc42b3b3023073cb14e519683cMYPREFIX\' => $vendorDir . \'/symfony/../../***.php\',
\'8a9dc1de0ca7e01f3e08231539562f61MYPREFIX\' => $vendorDir . \'/someotherlibifneed/../../***.php\',
);
Note: Make sure that array indexes are the same as that of the array indexes on step 3.
就是这样。。!这将有助于避免与其他WP插件发生冲突。