Search by

elkuku / kuku-sf-system-tools-bundle

elkuku

System tools for Symfony

Package info

github.com/elkuku/SFSystemToolsBundle

Type:symfony-bundle

pkg:composer/elkuku/kuku-sf-system-tools-bundle

Statistics

Installs: 1 535

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.7.3 2026-12-01 22:32 UTC

This package is auto-updated.

Last update: 2026-12-01 22:35:56 UTC


README

A small Symfony bundle with system pages for a project:

  • /system/info/: the Symfony and PHP versions as JSON, optionally the database version and the last deploy, for monitoring tools such as the KuKu project checker.
  • About (optional): cards with the Symfony version and its maintenance dates, PHP settings and extensions, the database (platform, server version and whether the configured serverVersion matches it, if Doctrine DBAL is installed) and the server (host, OS, web server, free disk space, load). Values that need attention are flagged. The output of the about console command is below, folded.
  • Deploy log (optional): the runs of bin/deploy from its log file. A calendar marks the days with runs in the color of their status (deployed, finished with errors, did not finish); next to it are the details of one run, the newest by default: when it ran, the other runs of that day, and its output split into the deploy steps, with [OK] lines in green and errors in red.

Installation

composer require elkuku/kuku-sf-system-tools-bundle

System info

config/routes/kuku_sfsysteminfo.yaml:

_kuku_sfsysinfo:
  resource: '@KuKuSFSystemToolsBundle/config/routes.yaml'
  prefix: /system/info

The versions are hidden (N/A) unless you expose them in config/packages/kuku_sfsysteminfo.yaml:

kuku_sf_system_tools:
  expose_sf_version: true
  expose_php_version: true
  expose_db_version: true    # adds db_platform and db_version, needs Doctrine DBAL
  expose_last_deploy: true   # adds last_deploy, read from admin.deploy_log

The endpoint is public, so only expose what you are fine with anyone seeing. With everything exposed:

{
  "sf_version": "8.1.11",
  "php_version": "8.5.13",
  "db_platform": "mariadb",
  "db_version": "12.3.4-MariaDB-deb12",
  "last_deploy": {"at": "2026-11-23T15:45:02+00:00", "status": "ok"}
}

db_platform is one of mariadb, mysql, postgresql, sqlite, sqlserver or oracle, and db_version is what the server reports. Both are null if the database can't be reached. last_deploy is the newest run of the deploy log: at is its start (null if its date line can't be read) and status is ok, errors or unfinished; it is null without a deploy log. The keys are left out when not exposed.

About and deploy log pages

They need symfony/twig-bundle and symfony/security-bundle (and symfony/console for the About page). Enable them in the bundle configuration; all settings are optional:

kuku_sf_system_tools:
  admin:
    role: ROLE_ADMIN                                     # who may see the pages
    base_template: base.html.twig                        # needs a "title" and a "body" block
    deploy_log: '%kernel.project_dir%/var/log/deploy.log' # where bin/deploy writes its log

Import the routes with the prefix you want:

_kuku_sfsys_admin:
  resource: '@KuKuSFSystemToolsBundle/config/routes/admin.yaml'
  prefix: /system

This gives /system/about (route kuku_sf_system_about) and /system/logview (route kuku_sf_system_logview). The pages use Bootstrap 5.3 markup and work in light and dark mode; the deploy log only uses links, no JavaScript. It takes the query parameters run (the run's position in the log, oldest first) and month (Y-m).

Deploy log format

The log is read as runs: a run starts with a line beginning with >>>===, followed by a line with the date, and ends with a line beginning with <<<===. This is what the bin/deploy script of elkuku/symfony-utils writes. A run without its end line is shown as "did not finish", and output outside any run is shown on its own.

Development

composer install
vendor/bin/phpunit tests