PHPackages                             sfneal/actions - 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. sfneal/actions

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

sfneal/actions
==============

Abstraction layers for utilizing the 'Action' pattern in PHP applications

2.1.0(2y ago)1156.1k↓85.8%7MITPHPPHP &gt;=5.6CI failing

Since Aug 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sfneal/actions)[ Packagist](https://packagist.org/packages/sfneal/actions)[ Docs](https://github.com/sfneal/actions)[ RSS](/packages/sfneal-actions/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (7)

Actions
=======

[](#actions)

[![Packagist PHP support](https://camo.githubusercontent.com/ea9272f48c2d7a46d1fa543ccd35c31ef8897e9fd3779ea518377e45d775ace5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73666e65616c2f616374696f6e73)](https://packagist.org/packages/sfneal/actions)[![Latest Version on Packagist](https://camo.githubusercontent.com/0e7e55708c44b27317590d2a092c8d4bca711366ea2e25caaa5847ae984af32d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73666e65616c2f616374696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfneal/actions)[![Build Status](https://camo.githubusercontent.com/2362cd2fbff96610cf00847036872755278e20c30010a905a33d1cc333c5bcfe/68747470733a2f2f7472617669732d63692e636f6d2f73666e65616c2f616374696f6e732e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.com/sfneal/actions)[![StyleCI](https://camo.githubusercontent.com/5267ee731beb29599c79d0b9a5dcff6491525dc17aab00d4810866d75bfacdb1/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3238373039313130302f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/287091100?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/75febdfe71e86ca2dba75f5e54cfa00200aec7dc417a90b287efeae29a1bd143/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73666e65616c2f616374696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sfneal/actions/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/9bdbff70b809efc0025d6dd3a24cdd58cc49770812145231af9ad107c169d08e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73666e65616c2f616374696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfneal/actions)

Abstraction layers for utilizing the "Action" pattern in PHP applications.

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

[](#installation)

You can install the package via composer:

```
composer require sfneal/actions
```

Usage
-----

[](#usage)

Here's a basic example of an action class that accepts a string parameter to the contructor and then outputs the string in all caps from the execute method.

```
use Sfneal\Actions\AbstractAction;

class MockAction extends AbstractAction
{
    /**
     * @var mixed|string
     */
    private $string;

    /**
     * MockAction constructor.
     *
     * @param string $string
     */
    public function __construct($string = 'output')
    {
        $this->string = $string;
    }

    /**
     * Execute the action.
     *
     * @return mixed
     */
    public function execute()
    {
        return strtoupper($this->string);
    }
}
```

```
$output = (new MockAction('string'))->execute();
>>> 'STRING'
```

### 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)

- [Stephen Neal](https://github.com/sfneal)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

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

Every ~110 days

Recently: every ~291 days

Total

13

Last Release

815d ago

Major Versions

0.4.1 → 1.0.02021-01-20

1.1.0 → 2.0.02021-03-30

PHP version history (5 changes)0.1.0PHP ^7.1

0.1.2PHP ^7.2

0.2.0PHP &gt;=7.0

0.2.1PHP &gt;=5.3

0.4.0PHP &gt;=5.6

### Community

Maintainers

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

---

Top Contributors

[![sfneal](https://avatars.githubusercontent.com/u/23200215?v=4)](https://github.com/sfneal "sfneal (103 commits)")

---

Tags

actionsphpphp-packageactionssfneal

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sfneal-actions/health.svg)

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

###  Alternatives

[tormjens/eventy

The WordPress filter/action system in Laravel

438937.3k22](/packages/tormjens-eventy)[bainternet/php-hooks

A fork of the WordPress filters hook system rolled in to a class to be ported into any PHP-based system

27623.1k5](/packages/bainternet-php-hooks)[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39317.0k29](/packages/lekoala-silverstripe-cms-actions)[voku/php-hooks

A fork of the WordPress filters hook system rolled in to a class to be ported into any PHP-based system

8338.8k3](/packages/voku-php-hooks)[pavloniym/nova-action-buttons

A Laravel Nova field.

15214.0k](/packages/pavloniym-nova-action-buttons)[x-wp/di

The dependency injection container for WordPress

314.2k13](/packages/x-wp-di)

PHPackages © 2026

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