https://github.com/buggyzap/ector_checker
https://github.com/buggyzap/ector_checker
Last synced: 3 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 (about 1 year ago)
- Last Synced: 2025-01-15T12:14:20.143Z (5 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
[](https://packagist.org/packages/ector/checker)
[](https://github.com/buggyzap/ector_checker/actions/workflows/run-tests.yml)
[](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.