Download the PHP package kekke/mononoke without Composer

On this page you can find all versions of the php package kekke/mononoke. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mononoke

Mononoke

⚠️ Early Alpha Notice
Mononoke is currently in early alpha and under active development.
Features, and implementations may change at any time without notice.
It is not yet recommended for production use, but feedback and contributions are welcome.


Mononoke is a PHP microservice framework and utility toolkit built with modern PHP practices.
It leverages Swoole for an asynchronous HTTP server and the AWS SDK for SNS and SQS integration,
allowing you to build event-driven, scalable PHP applications.


Installation

Via composer:

composer require kekke/mononoke

https://packagist.org/packages/kekke/mononoke

Features


Attribute-based Listeners

Mononoke uses PHP attributes to register HTTP routes, WebSocket event handlers, scheduled tasks, background tasks, and SNS/SQS message handlers.
This allows for a clean and declarative service definition.

Example Service

Available attributes

1. Http

Define HTTP routes directly on service methods with the Http attribute.

Usage

Supported HTTP methods

Tip: If your Http attribute accepts the enum, you may use Http(HttpMethod::GET, '/health') instead of a string literal.


2. Schedule

Register cron-like scheduled tasks with the Schedule attribute. Some schedules require extra parameters (hour/minute/second). Helper methods on the enum indicate what is required.

Basic usage

Time-specific examples (if supported by your attribute signature)

Available scheduler options

Notes:

  • For modes that “require” hour/minute/second, supply those via your Schedule attribute’s parameters (named arguments are recommended if supported).
  • If you omit a required component, validation should fail early (consider adding validation in your attribute or setup logic).

3. AwsSnsSqs

Subscribe a method to an SNS topic (via an SQS queue) with the AwsSnsSqs attribute. The framework will provision the SNS topic/SQS queue (if needed), subscribe them, and poll messages.

Usage

DLQ

Using a DLQ is possible via the dlqName parameter in the AwsSnsSqs attribute. When using a DLQ, the message will be handled and if an uncaught exception is thrown while handling the message, send the message to the DLQ after dlqMaxRetryCount retries.

You can adjust the retries using the config;

Guidelines


4. WebSockets

Create a websocket server using the WebSocket attribute.

Usage


5. Tasks

Create background workers using the task interface

Usage

To dispatch a new task, use (new BackgroundTask($this->server))->dispatch('task_name', ['message' => 'Hello World!']); and then make sure that setup a task handler using the Task attribute.


Config

You can adjust several options using the Config attribute in Mononoke.

To get started, attach a Config attribute to your Service class, the Config attribute then accepts 3 different configs that you may adjust to your liking.

Usage

Available options can be discovered by peeking into the 3 different config classes; MononokeConfig, AwsConfig & HttpConfig.


Status

Mononoke is actively evolving. Expect rapid iteration, breaking changes, and new features as the framework stabilizes.
Contributions, bug reports, and feedback are highly appreciated!

License

This project is licensed under the MIT License.

It also makes use of third-party libraries under their respective licenses, including:


All versions of mononoke with dependencies

PHP Build Version
Package Version
Requires nikic/fast-route Version ^1.3
aws/aws-sdk-php Version ^3.200
monolog/monolog Version ^3.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kekke/mononoke contains the following files

Loading the files please wait ...