Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Added auto user detection and more config options #12

Merged
merged 6 commits into from
Sep 7, 2016
Merged

Conversation

GrahamCampbell
Copy link
Contributor

This brings us up to feature parity with the symfony notifier other than automatically detecting the strip path and project root, however, that has been mitigated in the docs, but, I do have an idea for how to properly fix that. Will PR after this has gone through.

@GrahamCampbell
Copy link
Contributor Author

Ok, done the path stuff here too.

return;
}

$base = realpath(__DIR__.'/../../../../');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoa :O

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t there be directory separators here instead of concatenating forward slashes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, lol. SIlex has no way to know the app path, which is why I didn't add this originally, but Simon said it would be nice to have this working if we could, so I went with this.

This works on the assumption that the structure is vendor/bugsnag/bugsnag-silex/src/AbstractServiceProvider.php, and then the rest of the project is in the same directory as vendor, including an src folder with the main app code in it.

The nice thing about realpath is it will return false if the path doesn't exist, so if someone has messed with the directories, then we should be ok. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's ok. PHP should normalize the slashes within the realpath function.

@kattrali kattrali merged commit 18e58c2 into master Sep 7, 2016
@GrahamCampbell GrahamCampbell deleted the config branch September 7, 2016 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants