Clockwork - php dev tools in your browser - server-side component

Overview

Clockwork is a development tool for PHP available right in your browser. Clockwork gives you an insight into your application runtime - including request data, performance metrics, log entries, database queries, cache queries, redis commands, dispatched events, queued jobs, rendered views and more - for HTTP requests, commands, queue jobs and tests.

This repository contains the server-side component of Clockwork.

Check out on the Clockwork website for details.

Installation

Install the Clockwork library via Composer.

$ composer require itsgoingd/clockwork

Congratulations, you are done! To enable more features like commands or queue jobs profiling, publish the configuration file via the vendor:publish Artisan command.

Note: If you are using the Laravel route cache, you will need to refresh it using the route:cache Artisan command.

Read full installation instructions on the Clockwork website.

Features

Collecting data

The Clockwork server-side component collects and stores data about your application.

Clockwork is only active when your app is in debug mode by default. You can choose to explicitly enable or disable Clockwork, or even set Clockwork to always collect data without exposing them for further analysis.

We collect a whole bunch of useful data by default, but you can enable more features or disable features you don't need in the config file.

Some features might allow for advanced options, eg. for database queries you can set a slow query threshold or enable detecting of duplicate (N+1) queries. Check out the config file to see all what Clockwork can do.

There are several options that allow you to choose for which requests Clockwork is active.

On-demand mode will collect data only when Clockwork app is open. You can even specify a secret to be set in the app settings to collect request. Errors only will record only requests ending with 4xx and 5xx responses. Slow only will collect only requests with responses above the set slow threshold. You can also filter the collected and recorded requests by a custom closure. CORS pre-flight requests will not be collected by default.

New in Clockwork 4.1, artisan commands, queue jobs and tests can now also be collected, you need to enable this in the config file.

Clockwork also collects stack traces for data like log messages or database queries. Last 10 frames of the trace are collected by default. You can change the frames limit or disable this feature in the configuration file.

Viewing data

Web interface

Open your.app/clockwork to view and interact with the collected data.

The app will show all executed requests, which is useful when the request is not made by browser, but for example a mobile application you are developing an API for.

Browser extension

A browser dev tools extension is also available for Chrome and Firefox:

Toolbar

Clockwork now gives you an option to show basic request information in the form of a toolbar in your app.

The toolbar is fully rendered client-side and requires installing a tiny javascript library.

Learn more on the Clockwork website.

Logging

You can log any variable via the clock() helper, from a simple string to an array or object, even multiple values:

clock(User::first(), auth()->user(), $username)

The clock() helper function returns it's first argument, so you can easily add inline debugging statements to your code:

User::create(clock($request->all()))

If you want to specify a log level, you can use the long-form call:

clock()->info("User {$username} logged in!")

Timeline

Timeline gives you a visual representation of your application runtime.

To add an event to the timeline - start it with a description, execute the tracked code and finish the event. A fluent api is available to further configure the event.

// using timeline api with begin/end and fluent configuration
clock()->event('Importing tweets')->color('purple')->begin();
    ...
clock()->event('Importing tweets')->end();

Alternatively you can execute the tracked code block as a closure. You can also choose to use an array based configuration instead of the fluent api.

// using timeline api with run and array-based configuration
clock()->event('Updating cache', [ 'color' => 'green' ])->run(function () {
    ...
});

Read more about available features on the Clockwork website.

Comments
  • Multiple X-Clockwork-Id header

    Multiple X-Clockwork-Id header

    Our backend makes multiple call in one request to our API.

    For example for a /user backend call, our backend will call 2 API route, one for the user languages and an other one for the user preferences.

    So we have a list of X-Clockwork-id unique header, but it's not handled by the Chrome extension.

    Is it planned to add this feature?

    opened by L3o-pold 26
  • array_combine(): Both parameters should have an equal number of elements is back

    array_combine(): Both parameters should have an equal number of elements is back

    It happens randomly in Grav 1.7 admin with v4.1.7 …/vendor/itsgoingd/clockwork/Clockwork/Storage/FileStorage.php line 285

    Parameters for me are:

    array:8 [▼
      0 => "id"
      1 => "time"
      2 => "method"
      3 => "uri"
      4 => "controller"
      5 => "responseStatus"
      6 => "responseDuration"
      7 => "type"
    ]
    
    array:11 [▼
      0 => "1582548042-5053-611931862"
      1 => "1582548042.501"
      2 => "POST"
      3 => "/admin/pages/core/modular/_callout.json1582891095-7666-622537541"
      4 => "1582891095.76"
      5 => "GET"
      6 => "/plugins/shortcode/ui"
      7 => ""
      8 => "200"
      9 => "87.949991226196"
      10 => "request"
    ]
    
    opened by mahagr 16
  • Symfony 4/5 support does not work

    Symfony 4/5 support does not work

    Hello,

    First, thanks for this project that seems really cool for debugging application.

    Now, the issue i've found with either Symfony 4 (4.4.3) or Symfony 5 (5.0.3). The code need some patches to be really up and running ! (I could provide some PR to solve it)

    I've tested either Firefox or Chrome extensions with same results :

    • Extension display always
    Error loading request metadata.
    Server returned an error response.
    

    While, i found no error in Symfony Profiler or error_log file.

    How can we debug and see what happens. Help will be greatly appreciated.

    Some screenshots from Chrome 79.0.3945.130 ((64 bits) I've also tested it with Firefox 72.0.2 (64 bits) that give the same results.

    clockwork_chrome_symfony symfony_profiler_2840c9

    opened by llaville 14
  • Clockwork Enhancement Ideas

    Clockwork Enhancement Ideas

    Apologies if this is not the correct place, but the Feature Ideas issue #321 was closed.

    We are incorporating Clockwork in Grav CMS as an option over the existing PHPDebugBar. We've already got it added and working in our 1.7 branch (https://github.com/getgrav/grav/tree/1.7), but we've run into a few issues and limitations. We're using the latest dev-master version and I know you are working on the 4.0 release so maybe some things could be taken into consideration for that release?

    • Grav is flat file based, so references to database timings are not relevant. Would be nice if the extension didn't display those timings if they were not set, or perhaps an option to remove them?

    Image 2019-06-05 at 10 38 59 AM

    • An option to control the order of the Clockwork tabs would be a nice to have as we like to put the Performance tab first, before Request.

    • The expandable tree view of data in the Log tab is great but would be awesome to have more options (like open all nodes, close all nodes, etc) as it's useful to output complex data in there, but a pain to dig in on every request.

    • Possibility to have count badges on tabs? This would be very useful to show at a glance the number of items in a custom tab.

    • Profiler support is cool, but the Xdebug profiler is super slow compared to XHProf. Support for XHProf for profiler would be a welcome addition. (https://github.com/tideways/php-xhprof-extension)

    • Grav uses Twig rather than Laravel Blade, but I implemented the Twig Profiler into Views via a new Timeline(), however it doesn't actually show a timeline, just the data. I think this is not fully finished as your site doesn't show one either?

    Image 2019-06-05 at 11 13 25 AM

    • UserData field support for objects/arrays similar to the log tab?

    We would also be willing to get our hands dirty and offer up some PRs on this when time permits, but wanted to put these things out there first to see if you are willing to consider them. Cheers!

    opened by rhukster 14
  • Clockwork Chrome tab empty

    Clockwork Chrome tab empty

    Hi.

    I'm running last versions of clockwork and laravel and the chrome tab is empty (no errors, no queries, nothing)

    However, the log is saving fine.

    What am I missing?

    Thx.

    opened by Luddinus 14
  • Blank Output in Chrome

    Blank Output in Chrome

    Hello, I installed Clockwork for Chrome and set the provider and alias in Laravel. I extended the Basecontroller too.

    I see in the app/storage/clockwork folder json-files filling up. I read already the other closed issue "blank output". But disabling other profiler don't help me.

    Trying this URL: http://my_host/__clockwork/1385391368.3305.1545016532 I get only a header, but no response:

    Request URL:http://my_host/__clockwork/1385391368.3305.1545016532
    Request Method:GET
    Status Code:200 OK
    Request Headersview source
    Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    Accept-Encoding:gzip,deflate,sdch
    Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
    Cache-Control:no-cache
    Connection:keep-alive
    Cookie:laravel_session=eyJpdiI6IlplQ3BVbkd3dDVhcGRzb0xYaW8rWVhuMFFNTFppNFhJcThERHg5VDBZaEk9IiwidmFsdWUiOiJjSUNlZE1Nc3JMR1k2Ykw3d2JSdkpCaUdjYlIwVTBDMk9ubU5LSFdjdDNxMFRCWk1cL3ExWjkzTmVEYStwbGNNMldlYzkxc293NDgzVTFcL3R4Z21qeXNRPT0iLCJtYWMiOiJjOTcwMDFkNTBhOWFhZGQ4NGQzZDI4OWVjNGY3M2E4ZTJkODRmNDYwYWVjNjdmZTE3YTAzMzQxNmJhZWU4ZDMzIn0%3D
    Host:my_host
    Pragma:no-cache
    User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36
    Response Headersview source
    Connection:Keep-Alive
    Content-Type:text/html
    Date:Fri, 17 Jan 2014 07:56:57 GMT
    Keep-Alive:timeout=5, max=100
    Server:Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8y DAV/2 PHP/5.4.4
    Transfer-Encoding:chunked
    X-Powered-By:PHP/5.4.4
    

    Can you help me please? I want to use your tool!

    opened by patrikkernke 14
  • New User - runtime errors

    New User - runtime errors

    Hi,

    Trying out your package (looks good but...) getting some errors. From your console:

    isdb.test/__clockwork/1520887890-8195-1931755551 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

    extensions::messaging:121 Uncaught Error: Message length exceeded maximum allowed length. at PortImpl.postMessage (extensions::messaging:121:13) at Port.publicClassPrototype.(anonymous function) [as postMessage] (extensions::utils:138:26) at responseCallback (extensions::messaging:210:16) at XMLHttpRequest.xhr.onreadystatechange (chrome-extension://dmggabnehkmmfmdffgajcflpdjlnoemp/assets/javascripts/chrome/background.js:29:4)

    Any ideas?

    Thx DJK

    opened by kapsoft 12
  • Clockwork not parsing file in chrome debugger

    Clockwork not parsing file in chrome debugger

    I dont see any output in the Chrome debugger (but the file is definitely created) Do I need to configure a path as to where CW looks for files for parsing?

    http://d.pr/i/iYlP

    opened by mikeerickson 12
  • Laravel + Clockwork + Chrome not working

    Laravel + Clockwork + Chrome not working

    So after many hours of frustration here's where I'm at.

    1. Brand new installation of Laravel 4 (v4.1.21)
    2. Added "itsgoingd/clockwork": "1.*" to my composer.json file.
    3. Ran composer update and Clockwork (v1.4.4) installed.
    4. I added the 'Clockwork\Support\Laravel\ClockworkServiceProvider' to my providers array, and added 'Clockwork' => 'Clockwork\Support\Laravel\Facade', to my aliases array.
    5. I added the following to my app/filters.php file:
    App::before(function($request)
    {
    Event::fire('clockwork.controller.start');
    });
    
    
    App::after(function($request, $response)
    {
    Event::fire('clockwork.controller.end');
    });
    
    1. Ran a composer dump-autoload -o for good measure.
    2. Next I boot up laravel using php artisan serve and we're running on (localhost:8000).
    3. I hit localhost:8000 in chrome, check the headers and here's where things get strange :)

    The headers read:

    X-Clockwork-Id:1392079506.9878.449334262 X-Clockwork-Version:1.4.2

    Note: Composer installed Clockwork v1.4.4 , which is weird?

    This is from my composer.lock file:

        "name": "itsgoingd/clockwork",
            "version": "v1.4.4",
            "source": {
                "type": "git",
                "url": "https://github.com/itsgoingd/clockwork.git",
                "reference": "2d39c88ba507fde4bd21b11971e429762303224c"
            }
    

    I hit the clockwork tab in Chrome (Version 32.0.1700.107) and nothing appears.

    I do at this point have .json' files inapp/storage/clockwork` containing all the correct data that should be being displayed by the Chrome extension.

    A few points where I feel the issue could be laying are:

    1. The use of PHP's built-in web server?
    2. Using SQLite as the database driver of choice?
    3. Chrome on Ubuntu LInux (which I am using).

    I've seen other's mention that white space has been an issue for them, but this isn't the case here. I'll be interested to see if there's a solution to this.

    opened by JasonMortonNZ 12
  • Not showing SQL values when using ODBC driver

    Not showing SQL values when using ODBC driver

    I'm using Laravel 5.3 with ODBC driver and sqlserver connection but somehow clockwork is not show the values that are passed in the SQL quires.

    I'm attaching screenshot from chrome extension about the current situation.

    You can see both "ticket_user_id" = and "password" = and are blanks ?

    image

    opened by abhimanyu003 11
  • Struggling to install under CodeIgniter

    Struggling to install under CodeIgniter

    I've attempted to install Clockwork in a fresh copy of CodeIgniter 2.1.4, using Composer, and I'm unable to get it working correctly.

    I've followed the instructions to the letter, but when I load a test controller, I get the message:

    Fatal error: Class 'Clockwork\Support\CodeIgniter\Hook_Clockwork_Register' not found in /application/config/hooks.php 
    

    It's as if Composer isn't loading Clockwork correctly, but I've installed a separate Composer package under the same test site, and this works fine. I am new to Composer, though, so I may have missed an important step; do I have to manually load Clockwork anywhere, or is Composer (and the CodeIgniter hook) designed to do this for me?

    opened by sevenpointsix 11
  • Profile is not present for current request.

    Profile is not present for current request.

    I am receiving the error "Profile is not present for current request." in the Profiler tab in Clockwork despite Profiler showing as enabled in phpinfo() and the following code in my php.ini file

    [PHP] zend_extension="/usr/lib/php/20210902/xdebug.so" xdebug.remote_enable=1 xdebug.remote_autostart=1 xdebug.mode=profile xdebug.start_with_request=yes xdebug.log=/etc/php/8.1/fpm/xdebug.log

    Any input for potential reasons would be much appreciated.

    Thank you!

    opened by HeadStudios 0
  • Feature/help request: Log groups

    Feature/help request: Log groups

    Is there a way to group logs?

    I mean like the JS console.group()

    maybe it already exists and I am missing?

    I found event(), but this is only for timing

    Maybe it could be enough to add a parallel event graphical representation, as a lateral line/indent in Log view, without changing the function interfaces, so, with event() ->begin() and end(), one could both track times and track enter/exit from code area/functions in text logs

    opened by LucaColombi 1
  •  ErrorException Attempt to read property

    ErrorException Attempt to read property "subject" on null LaravelNotificationsDataSource.php:177

    I have this code below that I use to send multiple notifications to agents which works fine without clockwork being enabled but as soon as I enable clockwork the code fails with this error ErrorException Attempt to read property "subject" on null LaravelNotificationsDataSource.php:177

    I'm not sending email notification, it's a database notification.

    $cardTrade  = App\Models\CardTrade::with(['card_code.card', 'handler', 'submitted_by', 'history'])
                        ->findOrFail($card_trade_id);
    
     $amount = $cardTrade->getProcessedAmount();
    
        $agents = App\Models\User::where('account_type', 'AG')->get();
    
     Illuminate\Support\Facades\Notification::send($agents, new App\Notifications\TradeAction(
            "IncomingNewCardTrade",
            "User requested to trade {$amount->formatted} {$cardTrade->getCardName()} card.",
            $cardTrade
        ));
    
    opened by faraweilyas 0
  • Clockwork tries to create storage/clockwork folder even it's not enabled

    Clockwork tries to create storage/clockwork folder even it's not enabled

    Hi guys,

    We use clockwork in our local and it works great. However when we did a release in server, it caused issue. We have different server users for request and backend task and the default clockwork folder permission is 644 so it has permission issue.

    Except for the permission issue, what I don't understand is the clockwork is not enabled in server, so why it still tries to write the index file(or check the file is writable)?

    Thanks. Gordon

    opened by gitstashgithub 1
  • Disable web ui route /__clockwork for production environments

    Disable web ui route /__clockwork for production environments

    Hello.

    I was recently looking for an alternative to barryvdh/debugbar as it doesn't work with the app that I'm working on. Our stack is Laravel API with a react/next frontend.

    I happened to find Clockwork which integrates perfectly with our app.

    One concern is that we're using nginx. Since it's the first time I'm personally using nginx we have to register our routes in our config. Unfortunately, we're not differentiating our nginx conf file between dev and production and my lead doesn't want for /__clockwork to make it to production.

    I have enabled the Web UI for clockwork. Our concern is that we don't want it enabled in production only for development.

    As I was digging through the code I found CLOCKWORK_WEB and I set it false in our .env file. When I try to access /__clockwork I get a 404. I was wondering if there was another way where if someone in production attempted to access /__clockwork it would just redirect them to /

    I did have another solution that I am running by my lead and am awaiting his response. But I was wondering if there was any solution that you could offer as my lead and I would really enjoy having the /__clockwork route enabled but only for our local environments.

    Any feedback would be greatly appreciated.

    I was also wondering if there is no solution that you can offer if we could possibly provide a PR for a solution. Of course to be approved by you provided you deem it a good solution.

    Thank you for your time. Looking forward to hearing from you.

    opened by wsalazar 6
  • Bug when using eloquent Strict mode

    Bug when using eloquent Strict mode

    Now in Laravel 9.35 you can use shouldBeStrict(), which enables:

    🙅‍♂️ No lazy loading

    ❗ Exceptions when assigning non-fillable attributes

    🕵️ Exceptions accessing attributes that weren't retrieved or don't exist

    The problem now, it's that clockwork uses the method getKey(): itsgoingd/clockwork/Clockwork/DataSource/EloquentDataSource.php(201): Illuminate\\Database\\Eloquent\\Model->getKey()

    Now all the queries without the attribute 'id' selected fail. For example:

    MyModel::query()
          ->select(['name', 'observations'])
          ->get();
    

    This query fails:

    The attribute [id] either does not exist or was not retrieved for model [App\Models\MyModel]
    
    opened by Sergiobop 3
Releases(v5.1.4)
  • v5.1.4(Jan 30, 2022)

    • added Laravel 9 support
    • added support for manually registering Clockwork middleware in Laravel
    • fixed some failing tests might not been collected in Laravel (reported by ajcastro, thanks!)
    • fixed not respecting the collect tests setting in Laravel (reported by SimBig, thanks!)
    • fixed some deprecation warnings on PHP 8.1 (implemented by usernotnull, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v5.1.3(Jan 30, 2022)

    • added PSR to the default filtered namespaces from stack traces in the Laravel integration
    • fixed not being able to log non-string values when using psr/log >=2.0 (reported by Wit3, thanks!)
    • fixed some deprecation warnings on PHP 8.1 (reported by Pinnokkio, thanks!)
    • fixed wrong redirect when accessing web ui with an url including a trailing slash (implemented by ssnepenthe, thanks!)
    • fixed update-token could be leaked via the Clockwork rest api (implemented by ssnepenthe, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v5.1.2(Jan 30, 2022)

  • v5.1.1(Nov 1, 2021)

    • added support for psr/log 2.0 (used in recent Laravel versions) (implemented by byGits, thanks!)
    • improved timeline api event run method to return the return value of passed closure
    • improved collecting Laravel database queries to not quote integers (implemented by thisiskj, thanks!)
    • improved toolbar details link to always be absolute and work with subdirectories (reported by superDuperCyberTechno, thanks!)
    • fixed some depecation warnings on PHP 8.1 (implemented by gharlan, thanks!)
    • fixed collecting Laravel database queries to produce correct queries when bindings contain question marks (reported by woshixiaobai, thanks!)
    • fixed filtering collected and recorded requests by closure (implemented by ssnepenthe, thanks!)
    • fixed some inconsistencies in the Clockwork metadata api
    • fixed some web UI assets being server with wrong mime-types (implemented by ssnepenthe, thanks!)
    • fixed missing method on storage interface and missing default parameter value in sql storage (implemented by ssnepenthe, thanks!)

    BREAKING

    • timeline api event run method now returns the return value of passed closure instead of the event instance
    Source code(tar.gz)
    Source code(zip)
  • v5.1.0(Aug 7, 2021)

    • added initial support for Laravel Octane
    • added support for Web UI in the vanilla integration
    • added support for collecting Laravel cache queries without values (implemented by akalongman, thanks!)
    • added ability to filter Laravel routes from particular namespaces (idea by hailwood, thanks!)
    • improved collecting of request URL to include full URL including the query string
    • improved Clockwork Browser payload to include Web UI path
    • updated Clockwork App (5.1)
    • fixed logging falsy values via Clockwork::log (reported by Karmalakas, thanks!)
    • fixed PHP 8 incompatibility when processing some Laravel notifications (implemented by nanaya, thanks!)
    • fixed request body being collected even when already parsed into POST data
    • fixed collecting request URLs with non-standard ports
    Source code(tar.gz)
    Source code(zip)
  • v5.0.8(Aug 7, 2021)

    • fixed crash when collecting Laravel mailables built via MailMessage (implemented by cbl, thanks!)
    • fixed crash when collecting artisan command in Lumen (reported by 2Attack, thanks!)
    • fixed crash when collecting database queries in Laravel with connection implementation not using PDO (implemented by lenssoft, thanks!)
    • fixed crash when HTTP request body contains valid json which does not contain array (eg. a number) (reported by Mradxz, thanks!)
    • fixed collected jobs dispatched from other jobs not having a correct parent job set (implemented by josvar, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v5.0.7(Mar 14, 2021)

    • changed delay listening to events until the app is booted (improves comatibility with some other packages)
    • changed default settings to enable toolbar (separately installed component)
    • changed default except requests filter to include debugbar api (implemented by edgardmessias, thanks!)
    • fixed wrong type-hint for the timeline event run method (reported by hferradj, thanks!)
    • fixed on-demand mode not working in Laravel (reported by yemenifree, thanks!)
    • fixed crash when collecting Laravel notifications with recipient names (reported by iainheng, thanks!)
    • fixed possible crashes and other issues when collecting Laravel notifications (reported by beekmanbv, thanks!)
    • fixed crash when creating runnable queries in DBAL data source (implemented by N-M, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v5.0.6(Mar 14, 2021)

  • v5.0.5(Mar 14, 2021)

    • added support for toolbar in the vanilla integration (idea by reeslo, thanks!)
    • added support for client metrics in the vanilla integration
    • improved PSR-7 support in the vanilla integration
    • fixed toolbar might not work when not collecting database models
    • fixed crash collecting Slack and Nexmo notifications (reported by abalozz, thanks!)
    • fixed timeline api usage not being updated in the Slim integration leading to crash (reported by jiaojie1989, implemented by seanhamlin, thanks!)
    • fixed api path being interpreted as regex in the vanilla integration (implemented by pqr, thanks!)
    • fixed Symfony storage not being updated for latest storage api (implemented by auchanhub, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v5.0.4(Dec 1, 2020)

  • v5.0.3(Dec 1, 2020)

  • v5.0.2(Dec 1, 2020)

    • fixed data sources not being initialized for extended data requests (reported by tmishutin, thanks!)
    • fixed inconsistent handling of time and duration arguments in various Request::add* methods (reported by mahagr, thanks!)
    • updated Clockwork App (5.0.2)
    Source code(tar.gz)
    Source code(zip)
  • v5.0.1(Dec 1, 2020)

    • fixed performance issues related to collecting stack traces for Eloquent models actions (reported by mstaack, thanks!)
    • fixed collecting database and unsupported Laravel notifications (implemented by YannikFirre, thanks!)
    • fixed log and timeline sorting leading to invalid metadata format
    • updated Clockwork App (5.0.1)
    Source code(tar.gz)
    Source code(zip)
  • v5.0.0(Dec 1, 2020)

    • added collecting of client-metrics and web-vitals
    • added collecting of Eloquent models actions and retrieved, created, updated and deleted models counts
    • added collecting of Laravel notifications
    • added reworked timeline api
    • added configurable web ui path (default changed to /clockwork)
    • added toolbar support
    • added on-demand mode (with optional secret)
    • added option to collect error requests only (requests with 4xx and 5xx responses)
    • added option to specify slow threshold and collect slow requests only
    • added option to sample collected requests (collect only 1 in x requests)
    • added option to collect only specified urls
    • added option to not collect pre-flight requests (enabled by default)
    • added option to filter collected and recorded requests by closure
    • added Laravel controller timeline event
    • added support for updating existing requests
    • added Slim 4 support
    • updated to Clockwork App 5.0
    • improved reworked the central Clockwork class api
    • improved requests recording to use a terminate callback
    • improved global log instance to live on the request instance
    • improved global timeline instance to live on the request instance
    • improved Symfony routes registration to register web ui paths only when enabled
    • improved SQL storage to be more compatible with different PDO error modes
    • improved Clockwork rest api with only/except filters
    • improved handling of corrupted index records in file storage
    • improved cleaned up the code-base, added and improved comments, use modern php features
    • removed Laravel total, initalization, boot and run timeline events
    • removed legacy clockwork.controller events
    • removed duplicate file/line information from collected metadata
    • fixed authentication route not being registered when web ui is disabled
    • fixed database queries not being collected for queue jobs
    • fixed multi-line database queries not being counted properly (implemented by edgardmessias, thanks!)
    • fixed StackFrame not processing Windows paths correctly

    BREAKING

    • multiple changes to the Laravel config file, please review and re-publish
    • minimal required PHP version is now 5.6 (previously 5.5)
    • the timeline api was reworked, please see documentation for details
    • the global log instance was moved to request instance, please see documentation for details
    • the central Clockwork class api was reworked, old api is available but deprecated
    • changed Slim middleware namespaces
    Source code(tar.gz)
    Source code(zip)
  • v4.1.8(Dec 1, 2020)

  • v4.1.7(Dec 1, 2020)

    • fixed a rare crash in Eloquent duplicate queries detection (reported by mstaack, thanks!)
    • fixed code-style in the Laravel config (implemented by fgilio, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v4.1.6(Jul 24, 2020)

    • added support for filtering collected requests by method to Laravel integration (options requests filtered by default) (idea by mortenscheel, thanks!)
    • added support for filtering collected requests by uri and method to vanilla integration
    • fixed handling of failed file operations on index file in file storage (reported by staabm, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v4.1.5(Jul 24, 2020)

  • v4.1.4(Jul 24, 2020)

    • added support for a time property to the Request:add* apis, defaults to "current time - duration"
    • fixed crash when collecting console commands with array arguments or options in the Laravel integration (implemented by mortenscheel, thanks!)
    • fixed default storage directory being one level too deep in vanilla integration
    Source code(tar.gz)
    Source code(zip)
  • v4.1.3(Jul 24, 2020)

  • v4.1.2(Jul 24, 2020)

  • v4.1.1(Jul 24, 2020)

    • added ext-json to composer.json require section (idea by staabm, thanks!)
    • fixed Clockwork being initialized too soon in Laravel integration leading to possible crashes (reported by tminich, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v4.1(Jul 24, 2020)

    • added support for command type requests with command specific metadata (commandName, commandArguments, commandArgumentsDefaults, commandOptions, commandOptionsDefaults, commandExitCode, commandOutput)
    • added support for collecting executed artisan commands in Laravel integration
    • added support for queue-job type requests with queue-job specific metadata (jobName, jobDescription, jobStatus, jobPayload, jobQueue, jobConnection, jobOptions)
    • added support for collecting executed queue-jobs in Laravel integration (also supports Laravel Horizon)
    • added support for test type requests with test specific metadata (testName, testStatus, testStatusMessage, testAsserts)
    • added support for collecting test runs in Laravel integration using PHPunit
    • added support for disabling collection of view data when collecting rendered views (new default is to collect views without data)
    • added Twig data source using the built-in Twig profiler to collect more precise Twig profiling data
    • added support for setting parent requests on requests
    • improved collecting of database queries, cache queries, dispatched queue jobs and redis commands to also collect time
    • improved the data sources filters api to allow multiple filter types
    • improved collecting of Laravel views to use a separate data source
    • improved Eloquent data source to have an additional "early" filter applied before the query is added to query counts
    • improved Eloquent data source now passes raw stack trace as second argument to filters
    • improved Laravel data source to work when response is not provided
    • improved Laravel events data source to include Laravel namespace in the default ignored events
    • improved Laravel views data source to strip view data prefixed with __
    • improved PHP data source to not set request time for cli commands
    • improved serializer to ommit data below depth limit, support debugInfo, jsonSerialize and toArray methods (partially implemented by mahagr, thanks!)
    • improved log to allow overriding serializer settings via context, no longer enabled toString by default
    • improved Request class now has pre-populated request time on creation
    • improved StackTrace helper with limit option, last method, fixed filter output keys
    • improved Lumen queue and redis feature detection
    • improved vanilla integration to allow manually sending the headers early (implemented by tminich, thanks!)
    • fixed Symfony support, added support for latest Symfony 5.x and 4.x (reported by llaville, thanks!)
    • removed dark theme for the web UI setting (now configurable in the Clockwork app itself)
    • updated to Clockwork App 4.1

    BREAKING

    • multiple new settings were added to the Laravel config file
    • DataSourceInterface::reset method was added, default empty implementation is provided in the base DataSource class
    • LaravelDataSource constructor arguments changed to reflect removing the views collecting support
    Source code(tar.gz)
    Source code(zip)
  • v4.0.17(Jul 24, 2020)

    • improved performance and memory usage when doing file storage cleanup (reported by ikkez, thanks!)
    • fixed crash after running file storage cleanup
    • fixed typo in clockwork:clean argument description
    Source code(tar.gz)
    Source code(zip)
  • v4.0.16(Jul 24, 2020)

  • v4.0.15(Jul 24, 2020)

  • v4.0.14(Nov 25, 2019)

  • v4.0.13(Oct 20, 2019)

    • fixed stack traces processing not handling call_user_func frames properly leading to wrong traces (reported by marcus-at-localhost, thanks!)
    • fixed wrong stack traces skip namespaces defaults leading to wrong traces
    • fixed vanilla integration config file missing and no longer used settings
    Source code(tar.gz)
    Source code(zip)
  • v4.0.12(Oct 13, 2019)

    • added a simple index file locking to the file storage
    • improved handling of invalid index data in the file storage
    • fixed Laravel data source crash when running without auth service (implemented by DrBenton, thanks!)
    Source code(tar.gz)
    Source code(zip)
  • v4.0.11(Oct 13, 2019)

The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t

Symfony 7.1k Jan 1, 2023
Ray server is a beautiful, lightweight php app build on Laravel that helps you debug your app. It runs without installation on multiple platforms.

RayServer is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app. It runs without installation on multiple platforms.

Pavel Buchnev 310 Jan 2, 2023
Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app.

A server for debugging more than just Laravel applications. Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps d

Buggregator 311 Jan 4, 2023
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. Th

Renato Cassino 190 Dec 3, 2022
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source library that allows a developer to debug in php direct in terminal, without necessary

Renato Cassino 190 Dec 3, 2022
Generate Laravel test factories from your existing models

Laravel Test Factory Generator php artisan generate:model-factory This package will generate factories from your existing models so you can get starte

Marcel Pociot 923 Dec 16, 2022
Test your routes without hassle

Laravel Api Tester Live demo Try it out: laravel-api-tester.asva.by Docs Those are short and easy to read. Take a look. Interface FAQ Installation Req

Yauheni Prakopchyk 343 Nov 6, 2022
An artisan command to tail your application logs

Easily tail your logs This package offers an artisan command to tail the application log. It supports daily and single logs on your local machine. To

Spatie 677 Dec 29, 2022
Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

PHP Console server library PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things u

Sergey 1.4k Dec 25, 2022
PHP APM (Alternative PHP Monitor)

APM (Alternative PHP Monitor) APM (Alternative PHP Monitor) is a monitoring extension enabling native Application Performance Management (APM) for PHP

Patrick Allaert 310 Dec 4, 2022
Zipkin PHP is the official PHP Tracer implementation for Zipkin

Zipkin PHP is the official PHP Tracer implementation for Zipkin, supported by the OpenZipkin community. Installation composer require openz

Open Zipkin 250 Nov 12, 2022
Debug bar for PHP

PHP Debug Bar Displays a debug bar in the browser with information from php. No more var_dump() in your code! Features: Generic debug bar Easy to inte

Maxime Bouroumeau-Fuseau 4k Jan 8, 2023
Xdebug — Step Debugger and Debugging Aid for PHP

Xdebug Xdebug is a debugging tool for PHP. It provides step-debugging and a whole range of development aids, such as stack traces, a code profiler, fe

Xdebug 2.8k Jan 3, 2023
Kint - a powerful and modern PHP debugging tool.

Kint - debugging helper for PHP developers What am I looking at? At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug

null 2.7k Dec 25, 2022
😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.

Tracy - PHP debugger Introduction Tracy library is a useful helper for everyday PHP programmers. It helps you to: quickly detect and correct errors lo

Nette Foundation 1.6k Dec 23, 2022
PHP Benchmarking framework

PHPBench is a benchmark runner for PHP analogous to PHPUnit but for performance rather than correctness. Features include: Revolutions: Repeat your co

PHPBench 1.7k Jan 2, 2023
The Interactive PHP Debugger

The interactive PHP debugger Implemented as a SAPI module, phpdbg can exert complete control over the environment without impacting the functionality

Joe Watkins 841 Oct 9, 2022
Dontbug is a reverse debugger for PHP

Dontbug Debugger Dontbug is a reverse debugger (aka time travel debugger) for PHP. It allows you to record the execution of PHP scripts (in command li

Sidharth Kshatriya 709 Dec 30, 2022
PHP Debug Console

PHP Console A web console to try your PHP code into Creating a test file or using php's interactive mode can be a bit cumbersome to try random php sni

Jordi Boggiano 523 Nov 7, 2022