PHPackages                             bpartner/tasks - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bpartner/tasks

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bpartner/tasks
==============

Make callable task easy

2.3.2(2y ago)0203MITPHPPHP ^7.2|^8.0

Since Oct 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/bpartner/tasks)[ Packagist](https://packagist.org/packages/bpartner/tasks)[ Docs](https://github.com/bpartner/tasks)[ RSS](/packages/bpartner-tasks/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (13)Used By (0)

Make callable task easy
=======================

[](#make-callable-task-easy)

[![Latest Version on Packagist](https://camo.githubusercontent.com/39c7d4958ea106733bb86bbde21131a268024202c1e83c411c506f65a26794ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62706172746e65722f7461736b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bpartner/tasks)[![Total Downloads](https://camo.githubusercontent.com/dbfcb05097c183a13fc8ded7091c68bb2261f92e6f4aeeccb5cb3dd102ab1fd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62706172746e65722f7461736b732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bpartner/tasks)

Use this trait for easy call your task

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

[](#installation)

You can install the package via composer:

```
composer require bpartner/tasks
```

Usage
-----

[](#usage)

Create task

```
namespace App\Test;

use Bpartner\Tasks\Tasks;

class Task extends Tasks
{
     /**
     * @param \Illuminate\Support\Fluent $object        #for Laravel
     *
     * @return mixed
     */
    public function __invoke($object)
    {
        // TODO: Implement __invoke() method.
    }
}
```

Use Task with CallableTrait in any class

```
use Illuminate\Support\Fluent;
use Illuminate\Http\Request;

class Controller
{
    use CallableTrait;

    public function index(Request $request)
    {
        $data = new Fluent($request->all());

        return $this->run(\App\Test\Tasks::class, $data);
    }
}
```

### Run pipeline from tasks

[](#run-pipeline-from-tasks)

To start the sequence of your tasks, you must first add a trait `use PipelineTaskTrait;` to all tasks.

Implement handle method in task.

Anywhere in the code where the CallableTrait is used, you need to create an array from the sequence of tasks,

and call `$this->runPipe($data, $pipes);` method.

```
namespace App\Test;

use Bpartner\Tasks\Tasks;
use Bpartner\Tasks\PipelineTaskTrait;

class Task extends Tasks
{
    use PipelineTaskTrait;

     /**
     * @param \Illuminate\Support\Fluent $object
     *
     * @return mixed
     */
    public function __invoke($object)
    {
        // TODO: Implement __invoke() method.
    }

    /**
     * @param \Illuminate\Support\Fluent $content
     * @param \Closure                   $next
     *
     * @return mixed
     */
    public function handle(Fluent $content, Closure $next): Fluent
    {
        //Check or modify $content

        return $next($content);
    }

}

//----------------------------------------------

use Illuminate\Support\Fluent;
use Illuminate\Http\Request;

class Controller
{
    use CallableTrait;

    public function index(Request $request)
    {
        $data = new Fluent($request->all());
        $pipes = [
            \App\Test\Task::class,
            \App\Test\Task2::class
        ];

        return $this->runPipe($data, $pipes);
    }
}
```

### Changelog

[](#changelog)

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

Credits
-------

[](#credits)

- [Alexander Zincheko](https://github.com/bpartner)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity70

Established project with proven stability

 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

Every ~172 days

Recently: every ~351 days

Total

10

Last Release

854d ago

Major Versions

1.1.1 → 2.02019-10-21

PHP version history (3 changes)1.0PHP ^7.1

2.2PHP ^7.2

2.3.2PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/41556cf93fd356db054066226b59fd32e9c20686db7de5cdc689dc204e5d7208?d=identicon)[bpartner](/maintainers/bpartner)

---

Top Contributors

[![bpartner](https://avatars.githubusercontent.com/u/11382071?v=4)](https://github.com/bpartner "bpartner (34 commits)")

---

Tags

Tasksbpartner

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bpartner-tasks/health.svg)

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

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[wilianx7/php-recurring

PHP library to make getting dates easier when working with recurring tasks.

1045.0k](/packages/wilianx7-php-recurring)

PHPackages © 2026

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