Clockwork 3.1 released with editor links and better exceptions

2018-12-03

A new minor Clockwork version is now available, shortening the wait for the next major release in early 2019. Clockwork 3.1 comes with improvements to exception UI, stack traces linking to editor, new vanilla PHP integration and more.

Improved exceptions UI

We often reach for Clockwork when things go wrong, but the display of exceptions was not quite good enough. To improve this, logged exceptions will now show the message, exception type, code and proper stack trace from the exception.

For server error responses we now show the last logged exception right in the request tab. Both request and log tab also support chained exceptions.

Improved exceptions UI

Editor links, authenticated user

Stack traces in Clockwork provide a lot of insight into the application runtime. Now they are even more convenient with editor links. Simply select your favorite code editor in the new settings popover. Clicking on paths in stack traces will now open the file right on the referenced line. You can also set up path mapping if you are developing inside a virtual machine.

Editor links settings

Please note, while I was testing this feature I found a bug in Chrome that might lead to editor links not working or even crash on click. As a workaround you can run your dev tools undocked. Web UI and Firefox versions are not affected. Please star my Chrome bug report to help getting this resolved. Thanks!

While we are saving most big new features for Clockwork 4, as another small improvement you can now find info about current authenticated user in the session tab.

New vanilla integration

While it was always possible to use Clockwork in vanilla PHP apps, it was not obvious how to do so. The new vanilla integration now makes it easy to use Clockwork not only with plain PHP apps, but also unsupported or custom frameworks and PSR-7 compatible apps.

Check out documentation for the new vanilla integration to learn how to use Clockwork in your vanilla app.

Performance improvements

Clockwork 3 introduced a much improved serializer, which comes with an unfortunate drawback - higher performance impact. While we provide a good defaults that work for most, not all apps are made the same. If you are running into memory issues using Clockwork, you can now configure certain aspects of the serialization to lessen the performance impact.

Filtered URIs implementation was also improved, Clockwork will now add almost no overhead for those URIs.

Compatibility with Laravel Telescope was improved, Clockwork and Telescope will now ignore each other, making both tools useable in the same project for extra debugging.

Other fixes

Numeric keys in arrays were lost on serialization, this was fixed. Private properties from parent classes had wrong prefix, no more. Numeric "0" values will now be rendered correctly in pretty-printed data.

Clockwork::subrequest method is now deprecated in favor of a new Clockwork::addSubrequest method with slightly different signature. You can now also pass a start/end time or duration to add the subrequest to timeline.

With Clockwork 3.1 out of the door, work begins on the next major release, Clockwork 4. Currently scheduled for early 2019, this is a great time to request new features on GitHub or email at info@underground.works.