xrdebug / php

Official PHP client library for xrDebug
https://xrdebug.com
Apache License 2.0
222 stars 6 forks source link

XR doesn't exist in bin #77

Closed oscarmorrison closed 1 year ago

oscarmorrison commented 1 year ago

Installed using: composer require --dev chevere/xr

(also tried without --dev)

it installs psr7 in main deps (which I don't really want)

but nothing in the bin:

ls vendor/bin image

xr command not found

rodber commented 1 year ago

You can provide the server by several ways, you are referring to the dependency server:

composer require --dev chevere/xr-server

And I wrongly believe that using composer require --dev chevere/xr (or without --dev) did included chevere/xr-server. I need to fix the docs.

it installs psr7 in main deps (which I don't really want)

❯ composer why nyholm/psr7
chevere/chevere 2.0.6 requires nyholm/psr7 (^1.5)

The package nyholm/psr7 is required by Writer, used here to handle dump message as a stream. I enjoy working with strings using streams for reasons, but feel free to contribute a stream-free implementation here and I will move Writer from the chevere/chevere package which will cause to drop the dependency here.

oscarmorrison commented 1 year ago

@rodber

Thanks for the update. So to be clear I need to install xr and xr server?

I don't understand why it's getting added as a composer main req. It can be / should be a package requirement. And at very least added to dev reqs only

rodber commented 1 year ago

XR is a server side debugger, it needs a server and a client. This is the client package, the one you add in your project.

XR server is a dev requirement in this package, I've no intention on making it a main requirement. For the server you can pick among a dependency server, a source server and a docker server, suit your needs.