PHP composer xdebug warning

后端 未结 6 1135
傲寒
傲寒 2021-01-31 04:24

New to PHP. Working on a PHP project and have xdebug enabled to be able to debug my php applications. The production server does not have xdebug enabled because it is handled by

6条回答
  •  失恋的感觉
    2021-01-31 05:01

    Create a file named php-composer.ini somewhere with the following content (the minimum php config for composer):

    extension_dir = "D:/php/ext/" ;according to your system
    extension=php_openssl.dll
    memory_limit=-1 ;optional
    

    Now create a file named cmz.bat with the following contents. (edit paths accordingly)

    @ECHO OFF
    php -c "D:\php-composer.ini" "C:\ProgramData\ComposerSetup\bin\composer.phar" %*
    

    add this file to your system path or your project root. Now use cmz instead of composer and you will not see that message and hopefully the composer speed would be increased.

    note: Some package need specific php extensions. you need to add them to php-compsoer.ini file or appending --ignore-platform-reqs switch to cmz.bat file

提交回复
热议问题