PHPackages                             mosamirzz/poller - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. mosamirzz/poller

ActiveLibrary[Testing &amp; Quality](/categories/testing)

mosamirzz/poller
================

A very simple way to do a Polling mechanism using PHP.

1.0(3y ago)14MITPHPPHP ^8.1

Since Apr 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mohamed-samir907/poller)[ Packagist](https://packagist.org/packages/mosamirzz/poller)[ Docs](https://github.com/mosamirzz/poller)[ RSS](/packages/mosamirzz-poller/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP Poller
==========

[](#php-poller)

[![Latest Version on Packagist](https://camo.githubusercontent.com/277754a8c8201cc08a0b093bf88f7153cad3e41aa5a93784b504179348a0aee8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f73616d69727a7a2f706f6c6c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mosamirzz/poller)[![Total Downloads](https://camo.githubusercontent.com/cf6783d2fd51007f70d7e8c01c6a3ce67cf7285ff78be3c6c103ce2e1ed82fd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f73616d69727a7a2f706f6c6c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mosamirzz/poller)[![GitHub Actions](https://github.com/poller/mosamirzz/actions/workflows/main.yml/badge.svg)](https://github.com/poller/mosamirzz/actions/workflows/main.yml/badge.svg)

[![alt text](carbon.png)](carbon.png)

A very simple way to do a Polling mechanism using PHP.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mosamirzz/poller
```

Usage
-----

[](#usage)

```
$result = Poller::do(
    fn () => Http::get("https://ads-api.tiktok.com/api/status/get/", [
        "advertiser_id" => 12345678,
        "task_id" => 23456789,
    ])
)->every(seconds: 5)
    ->failAfter(attempts: 3)
    ->stopWhen(
        fn (mixed $result): bool => $result["status"] == "SUCCESS"
    )
    ->onFail(function (Throwable $e) {
        Log::error("Got an error", [
            "msg" => $e->getMessage(),
            "code" => $e->getCode(),
        ]);
    })
    ->start();
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mohamed Samir](https://github.com/poller)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com) by [Beyond Code](http://beyondco.de/).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1113d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8d2c594fd2fc1ff26195258817c14019d49061464450e46ec58788ed9728469?d=identicon)[samirzz](/maintainers/samirzz)

---

Top Contributors

[![mohamed-samir907](https://avatars.githubusercontent.com/u/40417075?v=4)](https://github.com/mohamed-samir907 "mohamed-samir907 (1 commits)")

---

Tags

laravellaravel-frameworkphpphp-frameworkphp8phpunitpollingpollermosamirzz

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mosamirzz-poller/health.svg)

```
[![Health](https://phpackages.com/badges/mosamirzz-poller/health.svg)](https://phpackages.com/packages/mosamirzz-poller)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
