Giter Club home page Giter Club logo

metamorphosis's Introduction

Metamorphosis

Easy and flexible Kafka Library for Laravel and PHP 7.

Metamorphosis

Latest Version on Packagist Software License Total Downloads Build Status Coverage Status

Introduction

Metamorphosis provides a simple, straight-forward implementation for working with Kafka inside Laravel applications.

Prefer to read in other language?

Requirements

Installation

1. Install the Kafka driver

On Mac OSX, install librdkafka with homebrew:

brew install librdkafka

On Debian and Ubuntu, install librdkafka from the Confluent APT repositories, see instructions here and then install librdkafka:

apt install librdkafka-dev

On RedHat, CentOS, Fedora, install librdkafka from the Confluent YUM repositories, instructions here and then install librdkafka:

yum install librdkafka-devel

On Windows, reference librdkafka.redist NuGet package in your Visual Studio project.

2. Install the PHP Kafka extension

On Linux, Unix and OS X, you can install extensions using the PHP Extension Community Library (PECL):

pecl install rdkafka

then add the following to your .ini file:

extension=rdkafka.so

Important: When using multiple PHP versions, PECL will install the package for the latest PHP version only. To set a PHP version, download the source code and compile it specifying the target PHP version.

PHP 7.4 example:

pecl download rdkafka
tar -xvf rdkafka-X.x.x.tgz
cd rdkafka-X.x.x
phpize
./configure --with-php-config=/usr/bin/php-config7.4
make
sudo make install

then add the extension to your .ini file:

extension=rdkafka.so

More about compiling shared PECL extensions

On Windows, download the rdkafka DLL, put the file in your PHP/ext folder and add the extension to your php.ini file:

extension=rdkafka.dll

More about PECL on Windows

3. Install Metamorphosis

Install the library via Composer:

composer require leroy-merlin-br/metamorphosis

And publish the config file with:

php artisan vendor:publish --provider="Metamorphosis\MetamorphosisServiceProvider"

For usage instructions, please refer to our Quick Usage Guide.

License

Metamorphosis is free software distributed under the terms of the MIT license

Additional information

Metamorphosis was proudly built by the Leroy Merlin Brazil team. See all the contributors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.