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

Freek van Der Herten:
Automatically close stale issues and pull requests
May 02, 2018 @ 09:31:17

In a post to his site Freek van Der Herten shares some functionality that Spatie uses to help keep the stale pull requests under control across their 180+ repositories: a Botman-based bot that assesses the last updated date and closes after a given amount of time.

At Spatie we have over 180 public repositories. Some of our packages have become quite popular. We're very grateful that many of our users open up issues and PRs to ask questions, notify us of problems and try to solve those problems, ...

Most of these issues and PRs are handled by our team. But sometimes those issues and PRs become stale. [...] That's why we created a bot that can automatically close stale issues and PRs. Here's [an example] of the bot in action.

He then shares the code they currently use for the bot, making use of the BotMan package as a base and the knp-labs/github-api package for the GitHub interaction. The code includes the GitHub service provider, a client class, an Issue object and the command that's run to find and close out the stale pull requests and issues.

tagged: stale pullrequest issue github automatically close bot botman tutorial

Link: https://murze.be/automatically-close-stale-issues-and-pull-requests

Nathan Dench:
BrisPHP News - 1 March 2018
Mar 09, 2018 @ 12:19:26

On his "Tech Notes" blog Nathan Dench has put together a listing of some of the interesting things that happened in the first part of 2018 in the PHP community.

I organise the a post from Marcel Pociot about the GitHub statistics for various PHP projects
  • news around Symfony, Silex and Laravel
  • There's also a few other "random things" to finish off the post with links to other interesting articles, projects and tools.

    tagged: news community 2018 release feature github framework

    Link: https://ndench.github.io/brisphp/brisphp-news

    GitHub Blog:
    Quickly review changed functions in your PHP pull requests
    Feb 27, 2018 @ 09:38:56

    As is mentioned by the Laravel News site and announced on the GitHub blog, repositories that have PHP have a new feature - introspection showing what methods and functions have changed in pull requests.

    The file finder makes it easy to review pull requests and understand how changes impact your code. Now PHP developers can navigate to changed methods and functions right in their pull requests, too.

    Searching the file finder for the term function or the name of a changed function in a PHP file will provide you with a filtered view of the results, so you can easily identify and view the most impactful parts of a pull request. Check out the documentation to learn more.

    An animation in the post shows the feature at work, making use of the "Jump to" menu to show a drop-down listing of all files changed and the methods changed inside them. These can then be used to jump to parts of the pull request (rather than having to search through the entire thing for changes).

    tagged: github pullrequest review jumpto changes quick feature

    Link: https://github.com/blog/2512-quickly-review-changed-functions-in-your-php-pull-requests

    TutsPlus.com:
    Rapid Web Deployment for Laravel With GitHub, Linode, and RunCloud.io
    Jan 24, 2018 @ 12:31:04

    On the TutsPlus.com site there's a tutorial posted showing you how to get a Laravel application up and running quickly using the combination of GitHub, Linode and RunCloud.io.

    If you are a PHP programmer working with the Laravel framework, I am sure that you deploy your web application on cloud servers on providers like Linode, Digital Ocean, Vultr and the rest. That’s because with a framework like Laravel, which works tightly with tools like Git and Composer, it is less and less likely that your application can be served from a shared hosting environment.

    This article will show you how to set up your web server for your Laravel application on Linode cloud hosting using the RunCloud.io server management tool.

    They then walk through the process of setting up a server on Linode including instance creation and Ubuntu image deployment. Once this is up and running, they take you over to RunCloud.io to connect your account to the Linode server (by IP address). Once the command is executed to link the two, they then show how to create the virtual host for your application and configure the deployment, DNS, domain name and SSL settings. Finally it shows the connection between RunCloud.io and GitHub, deploying the code when a git push action is taken.

    tagged: rapid deployment laravel application github linode runcloudio

    Link: https://code.tutsplus.com/tutorials/rapid-web-deployment-for-laravel-with-github-linode-and-runcloudio--cms-30337

    Marcel Pociot:
    2017 - A PHP Year in Review
    Dec 26, 2017 @ 09:39:40

    Marcel Pociot has written up a post to finish out 2017 and provide a year in review for the community and language via some Github statistics.

    It's this time of the year again - the end of the year is coming up fast, so why not step back and take a look at what we, as a PHP community, have achieved this year?

    For these statistics, I used the free GitHub Archive data in combination with Google BigQuery, which lets you process 1TB of data per month free of charge.

    So let's take a look at some numbers

    He first breaks it up into three main categories:

    • most starred PHP repositories
    • most starred new PHP repositories
    • most contributed PHP repositories

    From there he "digs deeper" and looks at the packages requiring the most dependencies and graphs the frameworks according to how many dependencies they require to install.

    tagged: yearinreview language github repositories starred dependency

    Link: http://marcelpociot.de/blog/2017-12-21-a-php-year-in-review

    Delicious Brains:
    Announcing serializededitor.com: A Visual Editor for PHP Serialized Data
    Jun 28, 2017 @ 09:22:23

    On the Delicious Brains site there's a new post from Gilbert Pellegram announcing serializededitor.com, an editor specifically designed to help visually edit serialized PHP data.

    I recently built a command line daemon in PHP to emulate AWS SQSD for the purposes of testing in Mergebot. As it turns out, one of the benefits of building a large, complex product like Mergebot is that there are pieces of the system that we need to build for the project that might be of use to other developers.

    Today, we’re launching that system piece, a free online visual editor for PHP serialized data as serializededitor.com.

    In this article, I’ll explain how and why we built this “side” project and how I overcame some of the challenges I faced when building this project.

    He starts off with the problem they were trying to solve when creating the editor, mostly centered around determining the differences between two pieces of serialized data. They found something similar to what they were wanting but it didn't provide the "easy editiing" functionality they wanted. He then goes through some of the issues they bumped up against along the way: working with the data and PHP's unserialize, the creation of their own parser, the work to create the Vue.js frontend and re-serializing the data once complete.

    They've also open sourced the project over on GitHub so you can clone it locally and contribute back.

    tagged: serialized data editor project introduction github vuejs

    Link: https://deliciousbrains.com/announcing-serializededitor-com-visual-editor-php-serialized-data/

    Freek Van der Herten:
    Building a realtime dashboard powered by Laravel and Vue (2017 edition)
    Jun 27, 2017 @ 09:53:33

    Freek van der Herten has a recent post to his site sharing a project that was created by the team at Spatie to show real-time information on a large display there in the office. In his post he details how this system was created using Laravel for the backend and Vue.js for the frontend.

    At Spatie we have a tv screen against the wall that displays a dashboard. This dashboard displays the tasks our team should be working on, important events in the near future, which music is playing at our office, and so on.

    We’ve opensourced our dashboard, so you can view the entire source code on GitHub. It is built with Laravel 5.4 and Vue.

    He goes through some of the history behind the project and how it was designed to replace some initial efforts with Dashing. He covers the basic functionality of the system with a high level overview and what kind of information it's displaying. From there he gets into more of the technical details of the dashboard including the grid setup, server-side code, client side Vue.js functionality and packages involved.

    tagged: dashboard laravel vuejs tutorial github opensource display

    Link: https://murze.be/2017/06/building-realtime-dashboard-powered-laravel-vue-2017-edition/

    Laravel News:
    Laravel Forge PHP SDK
    Apr 05, 2017 @ 10:56:24

    On the Laravel News site there's an announcement about the release of an SDK for the Forge API to make it easier to use the Laravel Forge API to manage your sites and servers.

    Laravel Forge announced it’s first official API back in February and we have seen a lot of interesting uses like the F-Bar Mac app. Today, Mohamed Said released a PHP SDK for the API that covers all the features.

    The post includes an example of using the SDK to create a new server on your Forge account, providing settings like size, name, region and provider. The post also lists out some of the other methods available in the SDK including:

    • revokeAccess
    • rebootMysql
    • installBlackfire
    • installPapertrail

    You can find out more about this SDK on its GitHub repository.

    tagged: laravel forge sdk github release functionality server management

    Link: https://laravel-news.com/laravel-forge-php-sdk

    Scotch.io:
    Laravel Social Authentication with Socialite
    Nov 17, 2016 @ 12:17:41

    The Scotch.io site has posted a tutorial for the Laravel users out there showing you how to use the Socalite package in your application to make authentication handling with external services simpler.

    Laravel introduced a built in Authentication module in version 5.2. To set this up, you just have to run php artisan make:auth and everything is generated for you, from the views to the controllers and the routes.

    [...] And that is a great thing. However, this command will only make you a traditional login. In most sites nowadays when signing up, users have the option of signing up with a social provider such as Facebook. In this tutorial, I will teach you how to add multiple social providers to a Laravel app using Socialite package. For this tutorial we will add Facebook, Github and Twitter signups.

    They start off with a new Laravel application (but, of course, you can use your current one), setting up a new database and creating a custom "users" table that includes "provider" information. The User model is then updated to allow the population of this data and the "make:auth" command is run. The Socialite package is then included and the application is configured to include its service provider. The tutorial then steps you through creating Github, Twitter and Facebook applications, getting the keys needed to drop into your app's configuration. Finally they update the login/registration pages with the social login buttons and how they'll now "magically" work.

    tagged: tutorial socalite authentication laravel github twitter facebook

    Link: https://scotch.io/tutorials/laravel-social-authentication-with-socialite

    Community News:
    DigitalOcean's Hacktoberfest 2016
    Sep 29, 2016 @ 09:46:57

    It's that time of year again - the perfect time to get involved in Open Source. Why? Because DigitalOcean is back with Hacktoberfest once again, encouraging contributions to Open Source no matter the size.

    The Laravel News site sums it up nicely:

    Hacktoberfest, the month-long festival of code, is back again this year. The event is hosted in partnership between GitHub and DigitalOcean, and the rules are simple. If you make four pull requests between October 1st and October 31st, you’ll get a t-shirt. It’s available worldwide with no stipulations.

    While the real incentive is to get more contributions to Open Source project, there's also a side benefit for those that get in their four pull requests during October: a cool t-shirt bearing the logo for this year's event. All you have to do is contribute and four pull requests to any repository (not your own ideally) before the end of October. If you're not sure of where to start and need some ideas, the Hacktoberfest site has you covered with some great suggestions to get you started.

    tagged: hacktoberfest digitalocean github community opensource contribution

    Link: https://hacktoberfest.digitalocean.com/