简体   繁体   English

Symfony-手动将phpxmlrpc添加到供应商

[英]Symfony - manually add phpxmlrpc to vendor

I need to use XML-RPC on my project. 我需要在项目上使用XML-RPC。 I have found a library phpxmlrpc ( http://phpxmlrpc.sourceforge.net/ ) and I need to add it to vendor. 我找到了一个库phpxmlrpc( http://phpxmlrpc.sourceforge.net/ ),我需要将其添加到供应商。 I have copied the files in vendor folder (/vendor/phpxmlrpc/) and I need to see the xmlrpc_client class in my Controller. 我已将文件复制到供应商文件夹(/ vendor / phpxmlrpc /)中,并且需要在Controller中查看xmlrpc_client类。 But I am not able to manage how to edit autoload.php to see the class, after a few attemps I am still getting "Attempted to load class "xmlrpc_client" from the global namespace. Did you forget a "use" statement?" 但是经过几次尝试后,我仍然无法管理如何编辑autoload.php来查看该类,但是我仍然得到“尝试从全局名称空间中加载类” xmlrpc_client”。您是否忘记了“ use”语句?” so I am pretty sure that there is some mess in my structure. 所以我很确定我的结构有些混乱。 I would really appreciate any help. 我真的很感谢您的帮助。

You must use a composer install tools for integrate 3third party code in your project a lot of possible time. 您必须使用composer安装工具在很多可能的时间中将3第三方代码集成到项目中。

For XML-RPC you have this bundle : Symfony-rpc-bundle 对于XML-RPC,您具有以下捆绑包: Symfony-rpc-bundle

When you install with composer install your bundle a lot of tricks run in your project symfony. 使用composer安装时,请在项目symfony中运行许多技巧。 Don't forget to add this bundle in your AppKernel.php file. 不要忘记将此捆绑包添加到您的AppKernel.php文件中。

With this your code for XML-RPC is more upkeeping and stable. 有了这个,您的XML-RPC代码将更加维护和稳定。

A bit late with the answer, I fear, but phpxmlrpc can now be installed using Composer as you would do with any other package. 恐怕答案还有些晚,但是现在可以像使用其他任何软件包一样使用Composer安装phpxmlrpc。

When checking out info about that library, just make sure that you look up the latest version on GitHub and not any more on SourceForge. 签出有关该库的信息时,只需确保您在GitHub上查找了最新版本,而在SourceForge上则没有了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM