Perry Rylance

Personal & Professional blog

WatchfulAutoloadGenerator

I’m working on a specialist tool for a client at the moment which makes heavy use of Backbone.js and the WordPress REST API.

Readers may be familiar with the WordPress Query Monitor plugin, which is a superb general purpose monitoring and logging plugin, unfortunately this has no support for queries run in the scope of a REST request at present.

HTTP response headers when running REST Query Monitor

Rather than having to switch the general query log on and off for my database, and dealing with all the pitfalls and cumbersome workflow that go with that, I’m developing a small plugin named REST Query Monitor, which will capture requests and record any queries run in the scope of a REST request. It’s still conceptual, just a small project for the morning, but I expect to post results of this shortly, and will publish it to the WordPress plugin directory if it works satisfactorily.

There are plenty of Autoload generators out there, this particular project leverages Autoload by theseer with gratitude. This project simply facilitates a very easy setup and integrating this into gulp. Within one command and a couple of lines of code, you can easily have Autoload generation setup and watching your projects PHP directory for changes.

Autoload generation made easy

This system is already in use elsewhere but I’ve adapted it for NPM and added it to NPMJS.com today. Head over there to check it out, or go ahead and install it and start using it by running the following command:

npm install @perry-rylance/watchful-autoload-generator