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

Christian Scheb:
PHPStorm Inspections for your Continuous Integration Process
Feb 27, 2019 @ 21:24:33

In a new post to his site Christian Scheb has written up a guide to help you set up inspections in PHPStorm to help make your continuous integration process simpler.

Did you know that PHPStorm (or any other Jetbrains IDE) can run inspections from command line and generate XML files for the results? This is a great “hidden” feature of those IDEs and machine-readable output means it can be somehow integrated with a continuous integration (CI) process. So let’s do this!

He walks you through the full process to get the integration set up to easily report the results of various code inspections:

  • Setting Up PHPStorm on a Server
  • Plugin installation (such as the PHP annotations checker)
  • Running the inspections (including configuration)
  • Publishing the result

All commands and configuration examples are included.

tagged: phpstorm continuousintegration inspection tutorial setup configure

Link: https://www.christianscheb.de/archives/808

Oh Dear Blog:
Our Gitlab CI pipeline for Laravel applications
Dec 18, 2018 @ 17:14:53

On the "Oh Dear!" blog they've written up a post sharing the Gitlab continuous integration pipeline they use for the deployment of the application. While, in their case, it's a Laravel-based application, the basics of it could be used for just about any PHP application with slight modifications.

We've been fairly public about the amount of testing we have for Oh Dear!. Freek has been showing bits and pieces on his Twitter to show the extent of that effort.

Having a huge test suite is nice, but integrating it into your development workflow is even better.

That's why we're releasing our Gitlab CI pipeline that is optimized for Laravel applications. It contains all the elements you'd expect: building (composer, yarn & webpack), database seeding, PHPUnit & copy/paste (mess) detectors & some basic security auditing of our 3rd party dependencies.

The post starts with an overview of their pipeline flow (including a graphic) showing the different stages and the steps involved in each. It then moves on to the setup of Gitlab's CI functionality using a local Gitlab runner to run the pipeline. It covers some of the issues around CPU load using Docker. Next it shares the configurations for the different stages in the flow and decisions they had to make around building assets, dependencies and caching.

tagged: tutorial laravel application gitlab gitlabci continuous integration setup pipeline

Link: https://ohdear.app/blog/our-gitlab-ci-pipeline-for-laravel-applications

PHPUgly Podcast:
Episode #128 - The Set Up
Nov 15, 2018 @ 17:19:32

The PHPUgly podcast, hosted by PHP community members Eric Van Johnson, John Congdon and Thomas Rideout, has posted their latest episode - Episode #128: The Set Up.

In this latest show, the hosts discuss several topics including the preloading RFC, Laravel Telescope and the post from Freek Van der Herten about other people's setups.

You can listen to this latest show either using the in-page audio player or by downloading the mp3 directly for listening at your leisure. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter to get updates when the latest shows are released. You can also support them via Patreon to help make the show even better!

tagged: phpugly podcast ep128 setup community

Link: http://www.phpugly.com/128

Laravel News:
Minimalist Sublime Text 3 Setup for PHP
Nov 02, 2018 @ 16:44:03

On the Laravel News site today Paul Redmond has shared about his own preferred development environment, making use of the Sublime Text 3 editor, and how he has it set up for his PHP development.

While many developers are flocking to IDEs and other hybrids like Visual Studio Code, I’ve found myself trying to create a minimalist Sublime Text 3 setup. I am a minimalist at heart, and I like both my physical environment and virtual environment to be as minimal and tidy as possible.

I want to present to you the minimalist Sublime Text 3 setup that I’ve landed on, but still feel like I have most everything I need to be productive.

He breaks down the article into a few different sections with details for each:

  • Built-In Features
  • PHP Companion
  • CLI Access
  • Plugins
  • Snippets
  • Code Linting

For each item in the list he provides example configuration additions, command line calls, code, and links to the tools he uses.

tagged: minimalist sublimetext3 setup configuration tutorial development

Link: https://laravel-news.com/minimalist-sublime-text-3-setup-for-php

CodeWall:
Debug PHP In VSCode With XDebug
Jul 25, 2018 @ 16:48:13

On the CodeWall site there's a tutorial posted showing the VS Code users out there how to set up debugging with XDebug for your PHP-based projects.

VSCode is great, the fact that it can work with a vast amount of languages help’s it cater for everyone’s taste. One special tool that comes with VSCode is the Debug feature and when configured correctly, is a dream to use. If you’ve previously worked with Visual Studio 2017 for example, you will know what I mean. This guide will go through how to set-up the PHP xDebug module to work in tandem with VSCode, completely enabling full-on functional debugging across your application.

The tutorial is broken into a few main sections: getting the basics ready, configuring the editor and an example of it in use. It provides screenshots of the editor as it goes along and links to other helpful resources (like the XDebug Chrome helper) to make the process as painless as possible.

tagged: tutorial xdebug vscode debugging setup installation configuration

Link: https://www.codewall.co.uk/debug-php-in-vscode-with-xdebug/

TutsPlus.com:
Secure, Passwordless Authentication Using Auth0
Jul 10, 2018 @ 16:23:17

On the TutsPlus.com site they've posted a tutorial showing you how to use the Auth0 service to create a passwordless authentication system for your application.

In this article, you'll learn how to set up passwordless authentication using the Auth0 service. Auth0 allows you to outsource authentication features for your app.

Auth0 is an authentication-as-a-service tool that makes implementation of authentication-related features for your app or site a breeze. If you've built an app and you want to just outsource the authentication and authorization features, a service like Auth0 is something you should consider.

The tutorial walks you through the installation and configuration process of their example PHP application including the setup of the .env file to contain the Auth0 secrets. It then provides the code needed to create two kinds of logins:

  • Using email as the identifier
  • Sending the approval via SMS

Both make use of (the Auth0 PHP SDK) to do most of the heavy lifting but there's still a bit of code you'll need to get it up and running.

tagged: passwordless security login auth0 tutorial setup configure

Link: https://code.tutsplus.com/tutorials/secure-passwordless-authentication-using-auth0--cms-31195

Pascal Landau:
Setting up PHP, PHP-FPM and NGINX for local development on Docker (for Windows 10)
Jul 09, 2018 @ 18:19:11

On his site Pascal Landau has posted a complete guide to setting up a Docker-based PHP environment on Windows 10 using Nginx and PHP-FPM.

You probably heard from the new kid around the block called "Docker"? You are a PHP developer and would like to get into that, but you didn't have the time to look into it, yet? Then this tutorial is for you!

[...] This is the first part of a (probably) multi-part series on Docker. The next part will explain how to set up PHP in Docker containers in order to work nicely with PHPStorm when using XDebug.

He starts with a brief overview of why he chose to use Docker and the transition from Vagrant. He then breaks up the tutorial into several different sections, one for each area of the environment:

  • setting up Docker
  • creating the PHP CLI container
  • building the web container (PHP-FPM and Nginx)

He "brings it all together", sharing a docker-compose configuration file that sets up all of the services and configurations in one shot. The tutorial comes complete with screenshots and all command line calls to get your environment up and running quickly.

tagged: nginx docker phpfpm windows10 tutorial setup configure

Link: https://www.pascallandau.com/blog/php-php-fpm-and-nginx-on-docker-in-windows-10/

Rob Allen:
Using Serverless Framework with OpenWhisk PHP
May 31, 2018 @ 15:43:01

In a new post to his site Rob Allen provides the steps you'll need to follow to use the Serverless Framework toolkit with OpenWisk to host PHP-based applications.

Serverless Framework is a toolkit to help you mange and deploy a serverless application. (Personally, I'm not a fan of the name as the word "Serverless" already has a meaning in the same space!) It's a useful tool and supports all the major providers, though AWS Lambda seems to be first-among-equals. The OpenWhisk plugin for Serverless is maintained by the rather excellent James Thomas, so if you have any questions, ping him!

As I build more complex PHP based OpenWhisk applications, I thought I'd explore how Serverless makes this easier.

He starts with helping you get the Serverless framework and the related OpenWisk plugin installed. He then helps you create a project, modify the configuration for a simple "Hello world" kind of script and create the PHP script to act as an endpoint. With the setup complete, he includes the steps to deploy and run the project, invoking the action and enabling it (as a Web Action) to make it reachable via the web.

tagged: serverless framework tutorial openwisk helloworld setup configure deploy

Link: https://akrabat.com/using-serverless-framework-with-openwhisk-php/

Amazon AWS:
PHP application logging with Amazon CloudWatch Logs and Monolog
May 07, 2018 @ 14:13:46

The Amazon AWS blog has posted a tutorial helping you get started using Amazon CloudWatch logging from PHP. CloudWatch is a logging service offered by Amazon that comes with features making it easier to track metrics, set alarms and monitor log files.

Logging and information debugging can be approached from a multitude of different angles. Whether you use an application framework or coding from scratch it’s always comforting to have familiar components and tools across different projects. In our examples today, I am going to enable Amazon CloudWatch Logs logging with a PHP application. To accomplish this, I wanted to use an existing solution that is both already popular and well used, and that is standards compliant. For these reasons, we are going to use the open source log library, PHP Monolog.

They start the tutorial with a brief overview of both Monolog and the CloudWatch logging service. From there they help you get the AWS PHP SDK and Monolog installed and an add-on that lets Monolog talk to CouldWatch. The post then provides some example code showing how to set up the PHP-to-CloudWatch connection and what the logging result looks like. They also include instructions on setting up logging filters/metrics and, as a bonus, how to use CloudWatch logging in a Laravel application.

tagged: cloudwatch logging tutorial setup configure monolog addon filter matric

Link: https://aws.amazon.com/blogs/developer/php-application-logging-with-amazon-cloudwatch-logs-and-monolog/

Scotch.io:
Build A Telegram Bot with Laravel and BotMan
Mar 07, 2018 @ 16:17:49

On the Scotch.io site there's a tutorial posted showing you how to create a Telegram bot with BotMan the popular PHP package for creating chatbots.

Being a Scotch.io reader you definitely know that we have covered creating Bots before, we have quite few posts on Slack Bots, Twitter Bots and other related topics [...] But today, we have something different for you, today we will be creating a Telegram bot for dog lovers. Yes, you heard it right. A Telegram Bot for dog lovers using Dog API.

The tutorial then walks through the entire process of getting the bot up and running including:

  • Installation of Laravel and BotMan
  • Creating the commands and testing the bot
  • Installing the Telegram driver and creating the bot
  • Using ngrok to allow external calls to come into your internal application

The post finishes by showing how to link your bot to Telegram and test it out using messages to send you random dog pictures when requested.

tagged: scotchio telegram bot botman tutorial setup configure connect

Link: https://scotch.io/tutorials/build-a-telegram-bot-with-laravel-and-botman


Trending Topics: