Download the PHP package three-mammals/pushy without Composer

On this page you can find all versions of the php package three-mammals/pushy. 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 pushy

Pushy

What is it?

Pushy is an open source Wordpress plugin that pushes data out of wordpress in the form of events. This enables using Wordpress as a headless CMS. That is rather than user requests for content hitting Wordpress for rendering etc you can create your own UI using whatever technology you want.

This pattern is proving somewhat popular for legacy systems like Wordpress and Magento. These systems provide amazing features but their API offerings are difficult to use if you wanted to use something like React (Native) & GraphQL.

This pattern is also useful if you need to scale beyond what Wordpress is capable of and have an optimised read model.

This is basically meant to be souped up webhooks.

Latest Stable Version Total Downloads License

Why?

My work want to make Wordpress headless but we don't really have time to work on it. I thought it was an interesting idea so started this to see how it might work in terms of pushing data out.

I am not a PHP developer really so please forgive anything that sucks.

What can I push the messages to?

At the moment you can push the messages to disk using the FilePublisher and AWS SNS using the SNSPublisher. The FilePublisher is only meant to be used for manual testing and messing around.

After you install Pushy as a wordpress plugin you will get a section added under options called Pushy Options. Under this you can set if you want to use the FilePublisher or SNSPublisher. The location is either the root path where you want the FilePublisher to write the messages e.g. /var/www/html/data/ or the SNS topic arn prefix e.g. arn:aws:sns:eu-west-1:940731442544:. This is because Pushy will publish an event with a name to this location e.g. SNS it will publish to arn:aws:sns:eu-west-1:940731442544:PostUpdated when a post is updated or to /var/www/html/data/PostUpdated-35c48bc8-348d-11e9-8e72-0242ac120003.json using the FilePublisher. Note the guid here is just the messages id for uniqueness.

What events are published?

These events all contain the data serialised as json that is passed into the hook by Wordpress. Some of them make additonal data fetches.

Terraform

AWS

I have setup a simple terraform script to deploy the required SNS topics. A good knowledge of terraform is required to use this because you will probably want to make changes. I have the credentials setup in a normal way locally for AWS cli and I have some helper scripts to execute terraform in from docker.

The AWS terraform provider is set up in a very simple way and you might want to change this :)

From root call to create a plan. From root call to apply the plan and create the resources in AWS. From root call to destroy created resources.

Whats next?

Generally make everything better. At the moment not all hooks that are relavent are supported. Maybe we should fetch more data when doing say PostUpdated? Can we be more accurate with save PostCreated rather than just PostUpdated etc. Can we target specific post types better. Can we do better with media?

List of actions we can use here

How do I run the tests

I do ./vendor/bin/phpunit --bootstrap tests/autoload.php tests/

Useful composer stuff I forget

php composer.phar require package-name php composer.phar install


All versions of pushy with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
aws/aws-sdk-php-resources Version ^0.3.0
ramsey/uuid Version ^3.8
php-amqplib/php-amqplib Version ^2.9
ext-sockets Version *
ext-bcmath Version *
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 three-mammals/pushy contains the following files

Loading the files please wait ....