Download the PHP package justinholtweb/craft-rat without Composer

On this page you can find all versions of the php package justinholtweb/craft-rat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-rat

Rat for Craft CMS 5

Track which users made edits to all content types on your Craft CMS site. Rat logs every element save with user attribution, changed fields, and timestamps — then surfaces that history in a dashboard widget and per-element sidebar panel.

Full documentation: craft-rat.com

Requirements

Installation

Open your terminal and run:

Or install via the Craft control panel under Settings > Plugins.

Features

Automatic Edit Tracking

Rat listens for saves on all element types and logs who made the change, what fields were modified, and whether the element was created or updated. Drafts, revisions, propagating saves, and bulk resaves are automatically filtered out.

Supported element types:

Dashboard Widget

Add the Recent Edits widget to your dashboard to see a live feed of edit activity across the site. Each row shows the user, element name (linked to its edit page), element type, action (created or edited), and a relative timestamp. The display limit is configurable from 1 to 100.

Element Sidebar

Every element edit page gets an Edit History panel in the sidebar showing the last 10 edits with user photos, action type, changed fields, and timestamps. A "View more..." link loads additional history via AJAX.

Multi-Site Support

Edits are tracked per site, so multi-site installs get accurate per-site history.

Permissions

Edit history is only ever shown to users who could open the element themselves. Rat defers to Craft's own canView check, so section permissions, peer-entry rules, and site access all apply:

Admins see everything, including edits to elements that have since been deleted.

How It Works

Rat registers a single Element::EVENT_AFTER_SAVE listener on the base Element class, so all element types are covered without needing individual listeners. Each save is recorded to a rat_editlog database table with the element ID, site ID, user ID, element type, label, and a JSON list of changed field names.

The sidebar uses Element::EVENT_DEFINE_SIDEBAR_HTML to inject edit history into every element edit page. The widget is registered via Dashboard::EVENT_REGISTER_WIDGET_TYPES.

Cleanup

Rat includes a cleanupOldLogs method that removes records older than a given number of days (default 90). This is not scheduled automatically — call it from a console command or cron job if needed:

Configuration

Rat works out of the box with no configuration. Install and go.

Development

The repo ships with a DDEV environment so the test suite has a PHP runtime and a database without needing a full Craft install:

Tests

Two Codeception suites:

The unit suite can also be run directly through PHPUnit via ddev exec vendor/bin/phpunit.

Test database credentials live in tests/.env and point at the DDEV database container. They only ever address the throwaway test schema, which the suite drops and recreates on every run.

License

See LICENSE.md.


All versions of craft-rat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package justinholtweb/craft-rat contains the following files

Loading the files please wait ...