kima92 / expector-patronum
This is my package expector-patronum
Fund package maintenance!
kima92
Requires
- php: ^8.1
- barryvdh/laravel-ide-helper: ^2.6
- illuminate/contracts: ^9.0|^10.0
- illuminate/notifications: ^9.0|^10.0
- laravel-notification-channels/webhook: ^2.5
- laravel/slack-notification-channel: ^3.0
Requires (Dev)
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
README
ExpectorPatronum is a Laravel-based system designed to manage and monitor task expectations and actual performances. It includes features like task scheduling, real-time monitoring, and integration with calendar interfaces for effective visualization and management.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Requirements
- PHP >= 8.2
- Laravel >= 9.0
- MySQL or a compatible database system
Installation
You can install the package via composer:
composer require kima92/expector-patronum
You can publish and run the migrations with:
php artisan vendor:publish --tag="expector-patronum-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="expector-patronum-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="expector-patronum-views"
Usage
Configure a new Plan (1 time) via /expector-patronum
path, or by code:
$group = Group::query()->create(['name' => 'bla', 'color' => 'green']); $expector = new Expector(); $plan = $expector->generatePlan('transmit 231', '0 20 * * *', $group, [['type' => StartedInTimeCheck::RULE_NAME]]);
Create next expectation days (this process is already scheduled every day to 20:00)
$expector->generateNextExpectations(CarbonImmutable::create(2024), CarbonImmutable::create(2024, day: 2));
Run the task
ExpectorPatronum::runTask('my Task', fn() => sleep(5));
General configurations via AppServiceProvider::register
Authorization With:
ExpectorPatronum::authWith(fn (Request $request) => !$this->app->environment('production') && $request->user())
Custom task identifier:
ExpectorPatronum::setExpectationUuidResolver(fn () => Str::uuid()->toString())
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Contributions to ExpectorPatronum are welcome. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for each feature or improvement.
- Submit a pull request with a clear description of the changes.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.