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

Sammy Kaye Powers:
Writing tests for PHP source (Part 5 & 6)
Jul 25, 2017 @ 09:56:56

Sammy Kaye Powers has posted the latest parts in his series looking at testing the PHP language with phpt tests. So far he's helped you compile PHP from source, run the test suite, learn about the phpt files and debug failing tests. He continues the series with two new posts:

In the 5th part of his series he shows how to use the PHP gcov site to locate lines of code in the PHP language core that aren't tested yet, how to create a new test to cover it and generating a code coverage report to see how much you've tested. In Part 6 he shows you how to take what you've created and submit it back to the PHP project on GitHub as a Pull Request (no RFC needed) based on changes from your own forked repository.

tagged: series testing language phpt untested gcov source pullrequest

Link: https://www.sammyk.me/finding-untested-code-in-php-source-writing-tests-for-php-source

Sammy Kaye Powers:
Writing tests for PHP source (Series)
Jul 21, 2017 @ 11:21:48

Sammy Kaye Powers has a series of posts over on his site introducing you to testing the PHP language with .phpt tests. So far he's introduced the topic, shown how to run the tests and debugging failing tests.

If you've ever wanted to get involved with PHP internals, writing tests is a great way to get your foot into the door. The tests are written in PHP so you don't even need to know C to get started.

Each of the posts also comes with a screencast, narrated by Sammy, showing the information presented in the tutorial:

There's more to come in the series as he still plans to teach about how to fix current tests and how to eventually create your own. Stay tuned to his site for more tutorials in the series.

tagged: test unittest phpt language source series part1 part2 part3 part4

Link: https://www.sammyk.me/compiling-php-from-source-writing-tests-for-php-source

Delicious Brains Blog:
Craft CMS | Self-Hosted WordPress Alternatives Part 1
Jul 11, 2017 @ 10:52:03

The Delicious Brains site has kicked off a new series of posts looking at other options besides WordPress for self-hosted content management systems. In this initial article they cover the Craft CMS that's built on top of the Yii framework.

To kick this off, I’ll be taking a look at Craft CMS by Pixel & Tonic, a software development team that was behind some of the best add-ons for ExpressionEngine. They have since moved on from ExpressionEngine to create their own CMS that is built on the popular Yii framework.

Craft bills itself as “a content-first CMS that aims to make life enjoyable for developers and content managers alike”. This is a change in stride from WordPress which appeals to a much wider variety of people, so it should be interesting to see how that change affects Craft CMS as a whole.

The tutorial then walks you through the installation process for Craft and what the interface will look like when everything is set up correctly. He talks about the functionality that's immediately available and some places where he feels Craft "shines" in its features. He then goes through some of the core architecture of the tool, templating, plugins, custom fields, SEO, eCommerce support and the documentation/pricing the project offers.

tagged: wordpress alternative series part1 craftcms introduction installation

Link: https://deliciousbrains.com/craft-cms-self-hosted-wordpress-alternatives/

Cal Evans:
Mautic Step 2 – Cron Jobs
Jul 11, 2017 @ 09:16:40

Cal Evans has posted the second part of his series as he works through the installation and configuration of the Mautic PHP-based marketing automation tool. In this part of the series he focuses on cron jobs.

This time we are talking about the cron jobs necessary to make Mautic run. Mautic has several commands that are necessary to execute that are not web based. They are run from the command line manually (dumb idea) or using a scheduler like cron on Linux. As with my “Installing Mautic” post, this post is only interesting to those of you self-hosting Mautic.

There is a great manual page on this titles “Cron Jobs”. It tells you a lot of what I’ll tell you here. If you haven’t read it yet, I highly recommend you start there.

He talks about each of the four jobs that, if you're using the system yourself, will want to run often: one for handling segments, two for campaigns and another for sending messages. He also talks about the main problem he ran into during his work with the cron jobs - permissions issues. He shares how he resolved this issue with an extra line in his crontab (after changing the user they ran as) and ends with some extra advice against wide open permissions.

tagged: mautic series part2 install configure cronjob cron tutorial marketing automation

Link: https://blog.calevans.com/2017/07/10/mautic-step-2-cron-jobs/

SitePoint PHP Blog:
Hello, Laravel? Communicating with PHP through SMS!
Jun 27, 2017 @ 11:05:29

In a previous article the SitePoint PHP blog showed you how to use Laravel, the Twilio service and some helpful packages to create an application that allowed interaction via phone calls. In this new tutorial they continue the series and update the application to allow interaction via SMS messages.

In this article, we will modify our Laravel-powered phone-capable weather forecast app so that it is accessible via SMS (text message) in addition to the voice telephone system.

They just add on the functionality rather than creating a new application for the SMS side, adding new routes, controller methods and changing up the service layer a bit. It also includes the messaging that comes back from Twilio and how the response needs to be formatted. Finally, the article shows (with screenshots included) how to configure your Twilio application to allow messaging as well as phone calls. The post ends with screenshots of the application on a mobile device sending the requests for the weather information based on the zip code provided.

tagged: tutorial laravel twilio sms weather communication series part2

Link: https://www.sitepoint.com/hello-laravel-communicating-php-sms/

Cal Evans:
Mautic Step 1 – Configuring an Email Service Provider
Jun 26, 2017 @ 10:30:17

Cal Evans has continued his series covering Mautic, the PHP based self-hosted marketing automation platform. This is step one in the process with his previous post in the series introducing Mautic and why he's trying it out.

This is the second post in a series titled “My Journey into Mautic”. If you are starting here, you might get an incomplete picture, you may want to check out the previous articles.

There are two things that really confuse me about Mautic, properly configuring an Email Service Provider (ESP), and segmenting & tagging. We’ll tackle the latter one in a later post, but the former is an important topic. It is also one that I do not fully understand. What is presented here is what I have learned through trial and error. it my be partially or wholly incorrect. If you find something that I’ve gotten wrong, please, by all means, correct me in the comments.

He starts by defining what an ESP service is and what it's useful for. While he had done the self-hosted email server in the past, he recommends paying for a service these days, deciding for his needs on Mailgun. He covers the difference between transactional and broadcast emails followed by the setup process he followed to get Mailgun up and working with his Mautic install.

tagged: series mautic marketing automation selfhosted platform tutorial email service provider

Link: https://blog.calevans.com/2017/06/25/mautic-step-1-configuring-an-email-service-provider/

TutsPlus.com:
Dynamic Page Templates in WordPress, Part 3
Jun 19, 2017 @ 10:45:04

The TutsPlus.com site has posted the third part of their "Dynamic Page Templates in WordPress" tutorial series today. In this latest article author David Gwyer finishes off the series using all that they've shared from part one and part two to create two examples.

In the first two parts of this tutorial series, we covered what dynamic page templates were and why they were needed. We also looked at the code required to implement them.

In this third and final tutorial in the series, I'll be creating two examples of fully working dynamic page templates you can use in your own projects. These were specifically chosen to be easily extendable to suit your own needs, and are intended as inspiration for any other type of dynamic page templates you can think of.

He then walks you through the creation of the two page templates: a Simple Contact Form and a Blog Post Archive. The first allows you to dynamically control the form elements for a UI interface (rather than code) and the second uses dynamic data to display the list of previous blog posts. The tutorial then finishes with a look at how, since WordPress 4.7, you can use dynamic page templates with any kind of post, not just pages.

tagged: wordpress series part3 dynamic page template blog archive simple form tutorial

Link: https://code.tutsplus.com/tutorials/dynamic-page-templates-in-wordpress-part-3--cms-28514

Zend Framework Blog:
Validate data using zend-inputfilter
Jun 16, 2017 @ 09:22:37

Matthew Weier O'Phinney is back on the Zend Framework blog today with a spotlight on another component of the Zend Framework. This time he features zend-inputfilter, a useful component for filtering the data coming into your application from your users.

In our previous two posts, we covered zend-filter and zend-validator. With these two components, you now have the tools necessary to ensure any given user input is valid, fulfilling the first half of the "filter input, escape output" mantra.

[...] To solve [the single shot validation] problem, Zend Framework provides zend-inputfilter. An input filter aggregates one or more inputs, any one of which may also be another input filter, allowing you to validate complex, multi-set, and nested set values.

As in the other tutorials in the series, Matthew walks you through the installation of the component via Composer and briefly describes how it operates. He then includes a code example of creating a new InputFilter instance, making inputs, attaching validators to them and then ensuring everything validates in the chain with an isValid call. He then covers input specifications - configurations based on array values - to define validators on the input elements. He ends the post looking at input filters, how to manage them and defining them by specification. He also mentions a few other pieces fo functionality the component includes but he didn't cover here.

tagged: zendinputfilter component zendframework series input filter chain

Link: https://framework.zend.com/blog/2017-06-15-zend-inputfilter.html

Zend Framework Blog:
Validate input using zend-validator
Jun 14, 2017 @ 11:25:36

The Zend Framework blog has continued their series spotlighting various components of the framework with their latest installment. In this latest tutorial they cover the zend-validator component used to validate data against a set of rules for correctness.

In our previous post, we covered zend-filter, The filters in zend-filter are generally used to pre-filter or normalize incoming data. This is all well and good, but we still don't know if the data is valid. That's where zend-validator comes in.

The post starts with showing how to get the component installed via Composer and the optional dependency of the zend-service-manager component (to handle the use of ValidatorChain functionality). Code is included showing the interface the validators all conform to and an example of the validator in use. It then covers some of the built-in validation options and how to build up a validator "chain" of multiple checks. It also shows how to break the validation if one fails, setting priority (order of execution), evaluating values in certain contexts and registering your own custom validators.

tagged: zendvalidator zendframework validation tutorial introduction component series

Link: https://framework.zend.com/blog/2017-06-13-zend-validator.html

Cal Evans:
My Journey Into Mautic
Jun 07, 2017 @ 09:09:32

Cal Evans, in a search to help make the marketing efforts for some of his products easier, has kicked off a series showing how to install and configure the PHP-based Mautic marketing automation platform.

Those that know me know that I have an obsession with marketing. I mean I’m no good at it, but the topic fascinates me. Almost all of the podcasts I listen to on a regular basis are marketing related. One topic in particular that interests me is “Marketing Automation”. Marketing Automation covers a huge swath of topics and since I am not an expert at the, I won’t attempt to explain them.

[...] Because I am interested in Marketing Automation and want to start applying the techniques in the projects I run. I started looking around for vendors who could provide these services. What I found is that most SaaS vendors assume that everybody who wants to use their software has deep pockets.

Without these "deep pockets" (pricey services) at his disposal, Cal looked for other options and found the self-hosted Mautic instead. He starts with a definition of his requirements including that it should be Open Source, that it should integrate with WordPress and he can contribute back to the project. He ends the post by outlining his planned platform using Mautic, WordPress, Mailgun, Mailchimp and Ditigal Ocean.

tagged: mautic marketing platform opensource series part1 automation

Link: https://blog.calevans.com/2017/06/03/my-journey-into-mautic/