Download the PHP package forsaken-threads/get-hooked without Composer

On this page you can find all versions of the php package forsaken-threads/get-hooked. 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 get-hooked

Get Hooked

A simple-ish GitLab webhook handler

This is something I put together to auto-deploy some static sites whenever I pushed to a private GitLab repo. It's extensible and has some neat features but is really just a quick hack.

One part handler, one part queue

Basically the webhook handler takes GitLab hooks and stores them in a local Queue. Then a locally run Queue Worker will pull them off the Queue and you can respond to them at your leisure. For example, if you get a flurry of pushes that need deployment to production, you probably don't want to pull down every change as it happens. You can queue up that deployment and then do it once rather than responding to every trigger.

Of course, you can also respond to hooks in real-time, or do a combination of both.

Very basic setup

Installation

composer require forsaken-threads/get-hooked

The Webhook Handler

Put this somewhere public that GitLab can hit.

Super easy, right? This will respond to all push events from GitLab. What if you wanted something a little more specific? There's no need to deploy to master when there's a push to a different branch. Event Receivers can be set fluently. Here are some of the options:

Now the deployment will only occur when Keith Freeman pushes to the master branch on the keithfreeman/forsaken-threads-website repository. All other events will be dropped. Unless, of course, they are accepted by different Event Receivers.

The Queue Worker

Put this somewhere logical and set up a cron job to run it as frequently as you like.

Also super easy, right? This will pull commands off the queue and work them.

Is that all?

What else can it do?

At the moment, not much. In theory, one could add Event Receivers to respond to other event types. I am totally for doing that if somebody really wants one. The only other receiver I have written is DeployOnPush in the example above. If you want a tad more control over, say, a GitLab => Slack integration, you could totally write a handful of receivers and do whatever you wanted. If they have broad enough appeal, I could list them here, or even include them in the repo. That's what open source is all about, anyway, isn't it? Sharing solutions.

For more info

If you want to take a deeper dive, you can check out Event Receivers in depth here.


All versions of get-hooked with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5.0 || ^7.0
evenement/evenement Version ^2.0
adammbalogh/key-value-store Version ^0.5.3
adammbalogh/key-value-store-file Version ^0.5.3
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 forsaken-threads/get-hooked contains the following files

Loading the files please wait ....