Closed Firesphere closed 3 years ago
The commands are prefixed with an @
, to prevent it from throwing an error on it's own if the file doesn't exist or it doesn't have read access.
Or, possibly, file_get_contents etc. does not have execution permissions.
You could probably abstract the GIT file logic into a private method on SentryLogger
e.g. getGitfileContents()
and then in one fell-swoop include the extra data:
Incomplete pseudo-code:
public function defaultExtra() : array
{
$ref = $this->getGitfileContents($head[1]);
$this->client->getOptions()->setRelease($ref);
return [
'Peak-Memory' => $this->getPeakMemory(),
'Commit Message' => $ref = $this->getGitfileContents('COMMIT_EDITMSG'),
];
}
Good point :+1:
I've added some coverages etc. as well, so you could set up CodeClimate/CodeCov/Scrutinizer-CI (Free for OSS projects)
I did some code updates
Ping @phptek
Yeah, I've seen it. Been sick and busy recently.
Ow, apologies! Get well soon!
This work needs to be rebased against master
(My fault, for being sick and then just plain tardy). Once you've attended to the comments above, please squash the x3 commitss. Thanks!
I totally did not have time. I've put it on my to do list for this week, to fix everything up properly!
Nope, time said no :/
Closing this in favour of using Composer\InstalledVersions::getRootPackage()
called in SentryLogger::getAppInfo()
in 4.0.0-alpha2
and above. This gives us the project name, branch and commit hash.
Partially fixes #6 and adds the last commit message as an extra bit of information.