Skip to content
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

Closed
halkyon opened this issue Jun 17, 2018 · 4 comments
Closed

Issues when bundled in a phar archive #103

halkyon opened this issue Jun 17, 2018 · 4 comments
Labels

Comments

@halkyon
Copy link

halkyon commented Jun 17, 2018

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@d74d176
Recommended 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 like phar: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 set useAsyncSending 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.

@robbieaverill
Copy link
Contributor

robbieaverill commented Mar 7, 2019

@halkyon there's some WIP for the next major version for using PSR-4 and relying on the composer autoloader. See #105.

A recommended approach for portability would be to replace the HTTP call code with Guzzle, which also supports sending async

+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.

@robbieaverill
Copy link
Contributor

See #111 for Guzzle

@GuySartorelli
Copy link
Contributor

@robbieaverill Did #111 resolve this? I think this issue should be closed.

@robbieaverill
Copy link
Contributor

Let's close it under the assumption that it does resolve this, and reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants