Search by

meandor / stirling-mysql

meandor

A MySQL wrapper for the sterling-microservice

Package info

github.com/meandor/stirling-mysql

pkg:composer/meandor/stirling-mysql

Statistics

Installs: 143

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 2

0.3.0 2026-10-25 17:22 UTC

This package is auto-updated.

Last update: 2026-10-25 17:24:46 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock CI

A MySQL Database wrapper for the stirling-microservice

This library uses mysqli for database access. Please make sure you have mysqli enabled and ready to work on your server.

Tools

The main script to do everything is

./bin/go

To see a list of arguments:

./bin/go help

To execute all tests:

./bin/go test

To scan the code and its dependencies for vulnerabilities, secrets and misconfigurations with Trivy (runs inside Docker, no binary to install — the image is pulled automatically on first run):

./bin/go security-check

This scans composer.lock (including dev dependencies) for known vulnerabilities. It is a dependency scan, not a scan of your PHP source code.

To check the code style with PHP CS Fixer (validates, does not change files):

./bin/go lint-check

To auto-fix the code style with PHP CS Fixer:

./bin/go lint

To statically analyse the code with PHPStan (level 4, checks src/):

./bin/go static-analysis

To check that no method exceeds the configured cyclomatic complexity threshold (uses PHPMD):

./bin/go complexity

To run lint-check, static-analysis, mutation-check, security-check, the complexity check and the tests all at once:

./bin/go check

The tests and mutation-check need a MySQL server. The defaults are 127.0.0.1:3306, user root, an empty password and the database test.

Usage

This library only works in conjunction with the stirling-microservice.

If you don't specify a config json (default.json) for your Config class with the following lines

{
    "dbHost": "<ip address>",
    "dbUser": "<my username>",
    "dbPassword": "<my password>",
    "dbName": "<my database name>",
    "dbPort": <port>
}

a default config will be used to try to establish a database connection.

The default is:

{
    "dbHost": "127.0.0.1",
    "dbUser": "root",
    "dbPassword": "",
    "dbName": "database",
    "dbPort": 3306
}