Laravel test coverage with php-code-coverage – Part 1

If you are developing a project in Laravel you are probably (should?) be using phpunit to execute tests. This tutorial will guide you through setting up a graphical representation of your test coverage so that you can see which lines of your logic are not being tested.

Continue reading “Laravel test coverage with php-code-coverage – Part 1”

Deploying Cockpit on Debian – Part 1

Cockpit is a lightweight graphical server administration tool. Simple to install, it provides you with an at a glance overview of one or more servers, and allows you to carry out administration tasks, log inspections and more.

Originally from the RHEL stable, it is a high quality Open Source product that is now available in most major Linux distributions.

Continue reading “Deploying Cockpit on Debian – Part 1”

Testing emails in Laravel

Software testing is a key aspect of writing an high-quality code, and helps ensure that any future changes don’t unexpectedly break anything.  Automation increases the repeatability of this task and is easily applied to Laravel.

Many modern web apps use email to send welcome information or notifications to users based upon certain events.  Even with a well setup test environment, you will want to stop possible hundreds or thousands of test emails being sent.  And there is an easy solution.

Continue reading “Testing emails in Laravel”

Securing nginx with Letsencrypt

For several years now users have been taught to look for the green padlock in the address bar to ensure the site they are using is secure. But certificates are expensive due to the efforts that go in to proving your identity.

Letsencrypt are trying to help secure the web by issuing short term (90 day) certificates to users who can demonstrate through a simple challenge and response that they are in control of a host.

Continue reading “Securing nginx with Letsencrypt”

memcached for PHP sessions tutorial

Sessions are a simple mechanism for web technologies like PHP to create a unique ID for each visitor which can then be used to persist data between page requests. Upon their first visit, a cookie is dropped in the user’s browser with the generated ID which the server then uses to store data about this session until the cookie expires or is deleted.

This post explorer the use of memcached as the PHP session handler, and explains the pro’s and con’s of its use compared to the default.

Continue reading “memcached for PHP sessions tutorial”