-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when bundled in a phar archive #103
Comments
@halkyon there's some WIP for the next major version for using PSR-4 and relying on the composer autoloader. See #105.
+1 for this. It could be done as a minor change, but might be easier to do it as in the master branch as a major change. |
See #111 for Guzzle |
@robbieaverill Did #111 resolve this? I think this issue should be closed. |
Let's close it under the assumption that it does resolve this, and reopen if necessary. |
First issue:
realpath()
usage does not work with phar, when called on__DIR__
. I have been running a fork with the following fix to get the class loading to work: halkyon@d74d176Recommended approach would be to go all in with composer PSR-4 autoloading, so these require statements can be removed entirely. This would break the ability to install raygun4php without composer, but I suspect it's not a popular way to install this client.
Second issue: async sending doesn't work, because RaygunClient shells out to
curl
and passes a cert path likephar:https:///path/to/cert.crt
which won't work because references to files inside a phar are "virtual" paths, not real filesystem ones. Workaround has to been to setuseAsyncSending
to false which works, because it uses php stream functions that support phar paths. A recommended approach for portability would be to replace the HTTP call code with Guzzle, which also supports sending async.The text was updated successfully, but these errors were encountered: