tuijncode / version
Version
v2.2.1
2024-11-08 07:47 UTC
Requires
- php: >=8.1.0
- symfony/http-client: ^6.4.14 || ^7.1
- symfony/http-foundation: ^6.4.14 || ^7.1
- vlucas/phpdotenv: ^5.6.1
README
With Version, you can retrieve various versions within your project, which is particularly useful if you have multiple projects and need to identify which ones require updates.
Releases
Install
Install the package via Composer:
composer require tuijncode/version
Add your token to the .env file:
TUIJNCODE_VERSION_TOKEN="your-token"
Additionally, add the following components to the .env file if you want to check the database:
TUIJNCODE_VERSION_PDO_DSN="your-dsn"
TUIJNCODE_VERSION_PDO_USERNAME="your-username"
TUIJNCODE_VERSION_PDO_PASSWORD="your-password"
Use one of the following options for DSN:
Add the PHP file version.php:
<?php require __DIR__ . '/vendor/autoload.php'; use Tuijncode\Version\RequestHandler; $requestHandler = new RequestHandler(); $response = $requestHandler->handleRequest(); $response->send(); ?>
Usage
https://example.com/version?token=your-token
Response (JSON)
{ "status": "OK", "versions": { "webserver": { "name": "Apache", "version": "Apache\/2.4.58 (Unix) mod_wsgi\/4.9.4 Python\/3.11 mod_fastcgi\/mod_fastcgi-SNAP-0910052141 OpenSSL\/1.1.1u" }, "database": { "name": "mysql", "version": "8.0.35" }, "php": { "name": "cgi-fcgi", "version": "8.2.20" } } }
Dashboard
Would you like to view all your projects in an online dashboard? We have successfully developed this solution and also offer installation support. https://davidvandertuijn.nl/oplossingen/versies