PHPackages                             stagem/zfc-progress - 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. stagem/zfc-progress

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

stagem/zfc-progress
===================

ZF Progress Module

3103PHP

Since Jun 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/stagemteam/zfc-progress)[ Packagist](https://packagist.org/packages/stagem/zfc-progress)[ RSS](/packages/stagem-zfc-progress/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

ZF2 Progress Module
===================

[](#zf2-progress-module)

This module is part of Stagem ecosystem and main goal is logging any change registered in `Context`.

Requirements
------------

[](#requirements)

- `Popov\ZfcEntity` module
- `Popov\ZfcUser` module

Logging principle is based on execution context. Conditionally realisation can describe follows (for different modules):

- item status is changing in `Status Context`;
- grid is changing in `Grid Context`;
- mail is sending in `Mail Context`;
- item is saving in `Saver Context`.

You can imagine any other `Context` and describe this in config or even implement custom realisation.

Usage
-----

[](#usage)

Module has low coupling and develop with *Event Driven* in mind.

Base config include three main *action* names which is listened on all interfaces: *edit, change, sync*. You can extend this list simply add your own interface/action name in config:

```
// config/module.config.php

'progress' => [
    'listeners' => [
        '*' => ['edit', 'change', 'sync']
    ]
]

```

Module has `ContextInterface` for convenience realisation of custom logging **Context**.

```
// config/module.config.php

'progress' => [
	__NAMESPACE__ => [
		'context' => Service\Progress\StatusContext::class,
	]
],

```

Advanced usage
--------------

[](#advanced-usage)

Suppose, you need implement logging in `Status` context. For this register new context in `Status` module and declare in services

```
namespace Stagem\ZfcStatus;

'progress' => [
	__NAMESPACE__ => [
		'context' => Service\Progress\StatusContext::class,
	]
],
'service_manager' => [
	'invokables' => [
		Service\Progress\StatusContext::class => Service\Progress\StatusContext::class,
	],
	'delegators' => [
		Service\Progress\StatusContext::class => [
			\Stagem\Translator\Service\Factory\TranslatorDelegatorFactory::class
		]
	],
],
```

Context realisation

```
namespace Magere\Status\Service\Progress;

use Zend\Mvc\I18n\Translator;
use Zend\I18n\Translator\TranslatorAwareTrait;
use Stagem\ZfcProgress\Service\ContextInterface;
use Stagem\ZfcStatus\Model\Status;

/**
 * @method Translator getTranslator()
 */
class StatusContext implements ContextInterface
{
    use TranslatorAwareTrait;

    protected $event;

    public function setEvent($event)
    {
        $this->event = $event;
    }

    public function getEvent()
    {
        return $this->event;
    }

    public function getItem()
    {
        return $this->event->getTarget();
    }

    public function getExtra()
    {
        return [
            'newStatusId' => $this->getEvent()->getParam('newStatus')->getId(),
            'oldStatusId' => $this->getEvent()->getParam('oldStatus')->getId(),
        ];
    }

    public function getMessage()
    {
        $translator = $this->getTranslator();
        /** @var Status $newStatus */
        $newStatus = $this->getEvent()->getParam('newStatus');
        /** @var Status $oldStatus */
        $oldStatus = $this->getEvent()->getParam('oldStatus');

        $prefix = $translator->translate(
            'Status change',
            $this->getTranslatorTextDomain(),
            $translator->getFallbackLocale()
        ) . ':';

        $template = $translator->translate(
            '%s from %s to %s',
            $this->getTranslatorTextDomain(),
            $translator->getFallbackLocale()
        );

        return sprintf($template, $prefix, $oldStatus->getName(), $newStatus->getName());
    }
}
```

Following execution rely on `Progress` module with has registered `ProgressListener`and which listen all events `['edit', 'change', 'sync'']` one of which run `Status` module.

Also you simply can register custom event name if pre registered is inopportune:

```
'progress' => [
    'listeners' => [
        Service\Api\InvoiceSoapService::class => ['syncInvoice'],
    ]
],

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72.2% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7dbdbd3abed25e11e97a69bc611daa3fe33ad5d1805f2fb32d491c888c4dfb51?d=identicon)[Serhii Popov](/maintainers/Serhii%20Popov)

---

Top Contributors

[![popovserhii](https://avatars.githubusercontent.com/u/1991183?v=4)](https://github.com/popovserhii "popovserhii (13 commits)")[![stagemteam](https://avatars.githubusercontent.com/u/37902825?v=4)](https://github.com/stagemteam "stagemteam (5 commits)")

### Embed Badge

![Health badge](/badges/stagem-zfc-progress/health.svg)

```
[![Health](https://phpackages.com/badges/stagem-zfc-progress/health.svg)](https://phpackages.com/packages/stagem-zfc-progress)
```

###  Alternatives

[maherelgamil/arabicdatetime

Easy and useful tool to generate arabic or hijri date with multi-language support for laravel

414.5k](/packages/maherelgamil-arabicdatetime)

PHPackages © 2026

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