Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buggyzap/ector_checker
https://github.com/buggyzap/ector_checker
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/buggyzap/ector_checker
- Owner: buggyzap
- License: mit
- Created: 2023-10-09T09:32:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-29T02:25:46.000Z (9 months ago)
- Last Synced: 2024-04-29T03:33:44.594Z (9 months ago)
- Language: PHP
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Ector Checker
[![Latest Version on Packagist](https://img.shields.io/packagist/v/ector/checker.svg?style=flat-square)](https://packagist.org/packages/ector/checker)
[![Tests](https://img.shields.io/github/actions/workflow/status/buggyzap/ector_checker/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/buggyzap/ector_checker/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/ector/checker.svg?style=flat-square)](https://packagist.org/packages/ector/checker)Composer dependency to check if a Ector instance is valid.
## Installation
You can install the package via composer:
```bash
composer require ector/checker
```## Usage
### Setup class as a symfony service
```yaml
# config/admin/services.yml
services:
_defaults:
public: trueector.checker:
class: 'Ector\Checker\Checker'
```### Inject the Ector/Checker via symfony container in module __construct
```php
if ($this->checker === null && $this->context->controller instanceof AdminController) {
$this->checker = $this->get("ector.checker");
}
```### Run the healtcheck in right hook
```php
public function hookActionAdminControllerInitAfter($params)
{
$controller = $params["controller"];
$this->checker->healthCheck($controller);
}
```## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Credits
- [DGCAL SRL](https://github.com/buggyzap)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.