Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joe Ferguson:
Validating and Releasing Packages with Producer
Mar 29, 2016 @ 15:49:50

In this post to his site Joe Ferguson takes a look at the recently announced Producer package that helps with ensuring your packages are "high quality" and makes the release process easier.

Producer is a pretty neat project that wants you to release higher quality packages. Well, actually (sorry) it’s “a command-line tool to validate, and then release, your PHP library package. It supports Git and Mercurial for version control, as well as Github, Gitlab, and Bitbucket for remote origins.”

[...] I was immediately interested in this tool because the Phergie project I manage (with other awesome developers) contains a number of individual packages. [...] Phergie packages are pretty solid. We have Travis CI running our tests across multiple PHP versions, we have hours and hours into these packages. But I wanted to take it to the next level, step up our game so to speak. In order to help raise our quality control on our packages I needed a producer.

He uses a Phergie plugin he developed as an example to try out Producer. He shows the results of the validate call with Producer and the few issues it reports. He shares the updates he made to the code (documentation) and the addition of a CHANGES.md file to the repository.He then uses Producer to push out a new version of the package using the release command (v3.0.1) and the resulting output of the command.

tagged: producer package validate release phergie plugin example tutorial

Link: https://www.joeferguson.me/validating-and-releasing-packages-with-producer/

Paul Jones:
Producer: Validate and Release PHP Library Packages
Mar 23, 2016 @ 14:40:44

In this post to his site Paul Jones introduces a tool that aims to help you and your Composer-centric workflow, making it easier to validate and release packages for your projects: Producer.

Back when I was working on Solar, we needed a process to package up each release of the entire framework and make sure I hadn’t forgotten anything. [...] After Solar was done, we began extracting its individual components as 30 or so separate packages in Aura.

[...] But now I have started some non-Aura projects: Relay, Radar, Arbiter, Bookdown, and most recently Atlas. These projects do not have the benefit of the automated release process, with all of its checks and validation, that Aura does.

With that in mind, then, I have extracted a substantial amount of the Aura package release process into a new project, Producer, so that I can use it with any non-Aura library package. That means you can use it with your library package, too.

He goes on to talk about why you might want to use Producer in your workflow and its functionality for validating and releasing packages. He also answers some of the common questions he's gotten about the tool, mostly around the steps it takes during the validation/release process.

tagged: producer composer package library release validate workflow process

Link: http://paul-m-jones.com/archives/6301

Piotr Pasich:
Rabbit behind the scenes
Oct 01, 2014 @ 17:19:53

In a recent post to his site Piotr Pasich shares an article about using a rabbit behind the scenes - making use of the RabbitMQ queuing system for behind the scenes work in your PHP applications.

In PHP business logic is usually put right in action’s method or just behind it. Hence, every little piece of delaying and long-running code will be processed with a request. The problem is almost undetectable if a user sends an e-mail but with more complex actions it may take a little bit longer than preferred. [...] In this article I would like to make an attempt to present a solution to the very annoying everyday problem that probably many programmers came across in their organisations – deadlocks in databases caused by a vast number of requests in relatively short time. The main aim of this text is to introduce RabbitMQ, which I value as a very functional and practical message broker, to help you solve the queuing problems and decrease the amount of work you would otherwise have to spend on it.

He talks about why message brokers are even needed and how to pick the right one for your project. Then he gets into the "in practice" part of the article, showing the use of RabbitMQ through PHP to save various data to a database when a user is presented with an advertisement. He shows how to create both the producer and consumer objects, making interaction with the queue simpler. His examples are all using the php-amqplib by Alvaro Videla.

tagged: rabbitmq introduction library tutorial message broker producer consumer

Link: http://piotrpasich.com/rabbit-behind-the-scenes/

Lorenzo Alberton:
Updated Kafka PHP client library
Sep 18, 2012 @ 16:58:50

Lorenzo Alberton has a new post with an update about a library he's been working on to interface with Apache's Kafka system, "a persistent, distributed, high-throughput publish-subscribe messaging system".

Over a year ago I sort of reverse-engineered the protocol, and published a first rudimental library to produce and consume messages with version 0.05. Since then, the Kafka project has evolved a lot, moving from the LinkedIN repositories to the Apache Incubator, gaining traction, committers, features. The protocol has changed slightly too, so the old library doesn't work anymore with the new version (0.6+).

The library has gotten lots of new features in this update including gzip compression support, custom exception handling and better connection handling. He includes some sample code in the post showing how to create both the Producer and Consumer for the messages (and one for working with Zookeeper).

tagged: kafka client apache messaging producer consumer library update

Link:


Trending Topics: