Sevalla is the all-in-one PaaS for your web projects. Host and deploy your applications, databases, object storage, and static sites. Enjoy advanced deployment pipelines, a complete database studio, instant preview apps, and one-click templates. The pricing is simple: no hidden fees, no seat-based pricing, and you pay only for what you use. Get real human support from developers.

Get started now with a $50 credit at Sevalla.com.

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

PHPCI: a CI tool specifically designed for PHP

Link –

PHPCI is a free and open source continuous integration tool specifically designed for PHP. Built with simplicity in mind and featuring integrations with all of your favourite testing tools, we've created the very best platform for testing your PHP projects.
https://www.phptesting.org/

Over at Sitepoint Peter Nijssen wrote a good overview of the offered functionality.

I've been playing around with the self-hosted version. It comes with a bunch of plugins that are installed by default.

I can recommended it if you, like me, are starting out with CI.

Read more

Get up and running with Event sourcing

Link –

Event Sourcing is a concept you'll start to hear more and more in the development community. Yet, there's no real aggregate of different talks or just resources in general available. Everything is spread out. Getting started with Event Sourcing isn't the easiest thing to do.

This post has as goal to regroup as much information as possible about event sourcing. This will include links to conference talks, slideshows, github repositories, blog posts, and so on.

http://nicolaswidart.com/blog/get-up-and-running-with-event-sourcing

Read more

Easy deployments for php projects

Link –

Let's talk a bit about deployments.

All the new projects I work on are hosted on servers that are provisioned by Forge. Forge has a quick deploy feature that allows you to pull the lastest master-commit onto the server, install composer dependencies, run migrations and so on.

It has two main drawbacks:

  • you can't see any output of the deployment script in your terminal
  • you can't do some stuff locally on your computer
To solve these points I'm switching from Forge's quick deploy feature to Deployer.
Deployer is a deployment tool written in PHP, it's simple and functional. Deploy your code to all servers you want, it supports deploy via copy, or via VCS (like git), or via rsync. Run your tasks on all your servers, or use our recipes of common tasks for Symfony, Laravel, Zend Framework and Yii.
You can install Deployer via composer. To use Deployer a deploy.php file must be added to your project. This file describes your deployment process. No worries, you can write it in php using a very clean and readable syntax. The documention on how to write the deploy.php-file is a bit vague at this point, but you'll get a good idea of how things work by taking a look at my deploy.php-file.

To run deployer you'll use this command:

[code lang="bash"] dep



I've made a bash alias that uses the name of the git branch you're currently on:

[code lang="bash"]
alias deploy='dep deploy $(git symbolic-ref --short HEAD)'

Now deploying a branch is as easy as just typing "deploy" when standing on a git repo in your terminal. This is a much nicer way to handle deployments. What I really like is that, now a deploy.php stored in the git repo, the deployment process is also versioned.

If you find Deployer doesn't meet your needs, Rocketeer, Phing and Capistrano are some more advanced alternatives. Envoy is nice too, but I haven't found a way to run stuff locally.

Read more

Some thoughts on the new Microsoft browser

Link –

The plan seems to be that the new IE12 will not carry all that cruft, but be a forward-looking modern browser. If you need legacy stuff you must start up another browser.

...

Internally, when talking to other web devs, you should treat the next Microsoft browser as IE12. Externally, however, when talking to clients and other non-techies, it could make sense to support the “Microsoft is creating a new browser” narrative.

http://www.quirksmode.org/blog/archives/2014/12/a_new_microsoft.html

I guess we'll see the new browser in action at the Windows 10 event on January 21st.

 

Read more

Automatically reject packages with known security vulnerabilities

Link –

This package ensures that your application doesn't have installed dependencies with known security vulnerabilities.

...

The checks are only executed when adding a new dependency via composer require or when running composer update: deploying an application with a valid composer.lock and via composer install won't trigger any security versions checking.

https://github.com/Roave/SecurityAdvisories

Awesome idea! It works by leveraging the "conflict"-property in the composer.json-file of the package.

Read more

An overview of the command bus

Link –

A command bus helps separating business logic from all the stuff that needs to be done to communicate over the web.

Shawn McCool wrote up a good overview about the subject.

Think of a typical controller. Inside, you might find interactions with the model, form validation, and response generation; which includes view template rendering or redirect header generation. Some of these actions are related directly to the web, some of them directly to the core of your application.
http://shawnmc.cool/command-bus

Read more

Black Mirror

Link –

If you're interested in technology and enjoy a good series, you'd probably like Black Mirror. It's streaming on Netflix (America/UK).

The last episode is almost two years old, but last Tuesday a christmas special featuring Jon Hamm was aired.

https://www.youtube.com/watch?v=TDFcTmdQqIc

Highly recommended.

 

Read more

A HTML5 rich text editor

Link –

Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible.

...

Unlike other HTML5 rich text editors, Squire was written as a component for writing documents (emails, essays, etc.), not doing wysiwyg websites. If you are looking for support for inserting form controls or flash components or the like, you'll need to look elsewhere.

http://neilj.github.io/Squire/

Read more

Scan a https-site for mixed content

Link –

Last week Bramus presented a cool mixed content scanner on his blog. Just for fun/as an excercise I made my own version.

The core scanner is mostly a copy of Bramus' code but there are a few noticeable differences. My version:

  • can be installed via composer
  • uses the Symfony console component
  • uses Guzzle instead of naked curl
  • can write the scanresults as json to a file
You can install the scanner with this command: ``` composer global require spatie/mixed-content-scanner ```

You'll find the instructions how to use it on github.

Read more