Download the PHP package butschster/lumen-microservice without Composer

On this page you can find all versions of the php package butschster/lumen-microservice. 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 lumen-microservice

Lumen Microservice

Build Status Latest Stable Version Total Downloads License heading

This Package can help you to use Lumen framework or Laravel as a microservice without extra knowledge. Just install package, create Exchange Point class and start exchanging information between services through MQ.

This package uses JMS\Serializer for message serialization.

P.S. You can use this service for testing https://www.cloudamqp.com. They have a free plan.

Features

Requirements

Installation and Configuration

From the command line run

composer require butschster/lumen-microservice

Register Service provider

Copy config files from package config directory to your Lumen app and register them.

Add variables to your .env file

Create exchange point in your app

This point will use for receiving request from other services and for sending responses.

Then register this point

Register console command

Sending requests

For requesting information from another service you should use ExchangeManager

Broadcasting

If you want to send an event you should use ExchangeManager method broadcast

Entity mapping

You can configure entity mapping in serializer.php config.

And then you can easily convert entities to payloads

Custom types

If you want to use custom JMS Serializer types you should use handlers. They can be added in serializer.php config.

Service running

This single command will run your microservice and start listening to commands registered in your exchange point.

php artisan service:run

Supervisor is a process monitor for the Linux operating system, and will automatically restart your horizon process if it fails. To install Supervisor on Ubuntu, you may use the following command:

sudo apt-get install supervisor

Supervisor configuration files are typically stored in the /etc/supervisor/conf.d directory. Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored. For example, let's create a microservice.conf file that starts and monitors a process:

Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:


All versions of lumen-microservice with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
ext-json Version *
jms/serializer Version ^3.9
illuminate/config Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0
illuminate/contracts Version ^7.0|^8.0
illuminate/console Version ^7.0|^8.0
illuminate/validation Version ^7.0|^8.0
illuminate/pipeline Version ^7.0|^8.0
phpdocumentor/reflection-docblock Version ^5.2
php-amqplib/php-amqplib Version ^2.12
psr/log Version ^1.1
react/event-loop Version ^1.1
react/promise Version ^2.8
webmozart/assert Version ^1.8
nunomaduro/collision Version ^5.0
firebase/php-jwt Version ^5.2
zircote/swagger-php Version ^3.0
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 butschster/lumen-microservice contains the following files

Loading the files please wait ....