This repository was archived by the owner on Apr 7, 2020. It is now read-only.
Commit 21c442f
committed
bug #12 Fix formatter (theofidry)
This PR was merged into the master branch.
Discussion
----------
Fix formatter
Closes #11
The fix is not perfect as this won't work if another kind of PHP object is passed in the context, how this should handle the most common case.
The idea is like for the dates, we format the exceptions by serializing them. However if the serialization fails, e.g. because an unserializable class is found in the stack trace like a `Closure`, we transform the exception into a normalized array based on the `Throwable` API.
A few other things have been included:
- Added a `.gitignore` project: while `vendor` is debatable `composer.lock` is less, in any case I think there is little harm in including this.
- Replaced the usage of deprecated parameters in `Yaml::dump()` in favour of their new equivalent `Yaml::DUMP_OBJECT`
Note that I only tested locally on my project as there is not proper test on the repo.
Commits
-------
9b428a3 Fix formatter2 files changed
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
367 | 368 | | |
368 | | - | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
380 | 418 | | |
381 | 419 | | |
382 | 420 | | |
| |||
0 commit comments