v2: Updates

* Simplifies & beautifies everything
* Introduces a new Class system.
* Errors are defaulted to AWS's handler.
* New function names & more efficient handling.
* Should fix a majority of the errors.

Please read the README for more!
This commit is contained in:
Devang Srivastava 2020-09-28 15:32:51 +05:30
commit e6d7753dc8
1095 changed files with 45088 additions and 2911 deletions

View file

@ -224,7 +224,9 @@ class TraceMiddleware
{
if ($a === $b) {
return;
} elseif (is_array($a)) {
}
if (is_array($a)) {
$b = (array) $b;
$keys = array_unique(array_merge(array_keys($a), array_keys($b)));
foreach ($keys as $k) {
@ -249,7 +251,9 @@ class TraceMiddleware
{
if (is_scalar($value)) {
return (string) $value;
} elseif ($value instanceof \Exception) {
}
if ($value instanceof \Exception) {
$value = $this->exceptionArray($value);
}
@ -286,7 +290,13 @@ class TraceMiddleware
{
if ($this->config['scrub_auth']) {
foreach ($this->config['auth_strings'] as $pattern => $replacement) {
$value = preg_replace($pattern, $replacement, $value);
$value = preg_replace_callback(
$pattern,
function ($matches) use ($replacement) {
return $replacement;
},
$value
);
}
}