cronitorio / cronitor-php Goto Github PK
View Code? Open in Web Editor NEWPHP Client for Ping API
Home Page: https://cronitor.io
License: MIT License
PHP Client for Ping API
Home Page: https://cronitor.io
License: MIT License
Hi @nathanielks,
I hope you've been well! We'd like to start taking responsibility for providing Cronitor supported open-source client libraries. Our Github account would host the clients and take a more active roll in the development of all clients. We'd like to start with Ruby, Python, Java, PHP, Elixir, Javascript, and Bash - https://cronitor.io/docs/open-source-libraries - as well as open-source our own Go client.
Our goal is to help standardize documentation, nomenclature, feature development, and testing, as well as keeping the APIs current, and, in some cases, adding or consolidating Ping and Monitor APIs.
Ideally, we'd like to transfer ownership of existing libraries for continuity. We'll clearly note original client authors on the README. And any maintainers who would like to continue contributing to the projects will continue to have maintainer access. Would you be interested in helping us do this for the PHP library?
Hello,
When I composer install with this library as a dependency I get the following warnings :
Class Cronitor\ValidationException located in ./vendor/cronitor/cronitor-php/lib/Exception.php does not comply with psr-4 autoloading standard. Skipping.
Class Cronitor\ConfigurationException located in ./vendor/cronitor/cronitor-php/lib/Exception.php does not comply with psr-4 autoloading standard. Skipping.
This could be an issue for strict autoloaders
This can be fixed by splitting the two exceptions in two files that are correctly named.
Lines 7 to 9 in 9da2280
The visibility of these constants is only available in PHP 7.1.
Hello,
I was following the guide to install Cronitor's PHP SDK in my Laravel 6x application when I realize that your example code of how Use Laravel's built in task hooks to wrap Artisan commands with telemetry events has an incorrectly syntax.
$taskName = 'emails:send'
$monitor = $cronitor->monitor($taskName);
$schedule->command($taskName)
->daily()
->before(function() { $monitor->ping(['state' => 'run']) })
->onSuccess(function() { $monitor->ping(['state' => 'complete']) })
->onFailure(function() { $monitor->ping(['state' => 'fail']) });
That code returns an error of missing ;
The right syntax should be:
$taskName = 'emails:send';
$monitor = $cronitor->monitor($taskName);
$schedule->command($taskName)
->daily()
->before(function() { $monitor->ping(['state' => 'run']); })
->onSuccess(function() { $monitor->ping(['state' => 'complete']); })
->onFailure(function() { $monitor->ping(['state' => 'fail']); });
I've looked through the docs, and I cannot see what the minimum PHP version is?
What is the minimum PHP version?
Problem 1
- Root composer.json requires cronitor/cronitor-php ^1.1 -> satisfiable by cronitor/cronitor-php[1.1.0, 1.1.1].
- cronitor/cronitor-php[1.1.0, ..., 1.1.1] require symfony/yaml ^4.4|^5.2 -> found symfony/yaml[v4.4.0-BETA1, ..., 4.4.x-dev, v5.2.0-BETA1, ..., 5.4.x-dev] but it conflicts with your root composer.json require (^6.0).
We need support for symfony/yaml:^6.0
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.