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

php[architect]:
Testing Strategy With the Help of Static Analysis
Apr 30, 2018 @ 12:49:41

php[architect] magazine has shared another article from their April 2018 issue on their site. In this article Ondrej Mirtes covers the use of static analysis to help testing and inform you of type safety issues.

When developing an application, our aim as software developers is to make sure it does what it ought to do and to keep the number of defects as low as possible. [...] In this article, I’d like to introduce you to the concept of type safety and how it can improve the reliability and stability of your code. Once your code is more type-safe, and that fact is verified by automated tools, you can cherry-pick which parts of your application need extensive unit tests and where you can rely just on well-defined types.

He starts off by talking about types (strict and dynamic) in PHP and the current state of the typing system for variable values. He covers the role of good type hinting in method and function definitions and how it can help IDEs like PhpStorm locate issues. He also talks about how type hints can provide you feedback on the design of the application and some of the tools that can help you find issues.

He wraps up the article with some tips for making your code more strongly typed and a look at what kind of tests are needed to help ensure these types remain enforced.

tagged: testing staticanalysis help article tutorial tools

Link: https://www.phparch.com/2018/04/testing-strategy-with-the-help-of-static-analysis/

php[architect]:
The Dev Lead Trenches: Reviewing Code
Mar 26, 2018 @ 11:24:58

On the php[architect] site they've shared an article from their latest edition of the magazine (the March 2018 issue) about reviewing code from the "Dev Lead Trenches" column (by Chris Tankersley).

Code reviews are one of the best ways to help a team ensure they’re writing the best code possible. In all of the jobs where we have done peer-lead code reviews, we have caught more bugs and had better discussions about code than in places or times where we just hammer code through the approval process. I know, I know; we all write beautiful, bug-free code, so why go through the hassle of a code review?

He starts with the idea of relating code reviews back to test-driven development. In TDD the architecture and quality thinking comes up front and with code reviews that same kind of thinking happens with the second (or third) set of eyes as the code progresses. He then lists out a few helpful tools for code reviews including GitHub/GitHub Enterprise's own pull request system and similar features in Gitlab. He ends the post with some suggestions for successful code reviews including "don't punish", "ask questions" and "have clear intentions" (avoid vague questions).

tagged: phparchitect march2018 article codreview development lead

Link: https://www.phparch.com/2018/03/the-dev-lead-trenches-reviewing-code/

Laravel News:
The Best of Laravel News 2017
Jan 03, 2018 @ 10:19:13

The Laravel News site has posted a look back at their content for all of 2017 and have linked to the best based on their popularity over the year.

Here’s a look at the most popular articles we wrote this year, including the major release of Laravel 5.5, command line tips, Vue.js tutorials, bash tricks, and of course, popular Laravel tutorials.

The list includes articles like:

Check out the full post for the complete list and a brief summary for each.

tagged: laravelnews laravel bestof 2017 list article tutorial

Link: https://laravel-news.com/best-2017

Community News:
24 Days In December
Dec 18, 2017 @ 10:46:02

The "24 Days in December" project is an effort to share "thoughts from the PHPamily", members of the PHP community from all levels of experience and "age" in the community. For the month of December they've posted several articles, each from a member of the community building up to Christmas. If you haven't been reading along, here's a selection of the posts so far:

These are just a few of the great articles so far so be sure to check out the full list for perspectives and thoughts from other members of the community.

tagged: 24daysindecember community article experience december

Link: https://24daysindecember.net/

Michael Cullum:
A month of PHP FIG #1: October 2017
Nov 03, 2017 @ 10:52:47

Michael Cullum has posted the October 2017 edition of what has been happening in the PHP-FIG group for the month over on Medium.com.

As part of the effort to communicate better what’s going on within the PHP FIG we’re starting a new series of ‘A month of PHP FIG’ articles to be released towards the end of each month, each being a 2 minute read or less.

Topics mentioned in this month's edition include:

  • PSR-12 being formally re-introduced into the draft stage
  • a start of the voting for the secretary elections for two secretary posts
  • a discussion as to whether or not new PSRs should require PHP 7 or PHP 5 still
  • an agreement that PSR-18 will not cater to async http client requests due to the lack of a Promise PSR standard

There were also several new PSR ideas proposed including ones for internationalization, cache tagging and deprecation handling. You can read the full post here

tagged: phpfig monthly article october2017 psr

Link: https://medium.com/php-fig/a-month-of-php-fig-1-october-2017-af253682ef5b

php[architect]:
Community Corner: PHP TestFest Has Returned!
Sep 22, 2017 @ 13:31:08

On the php[architect] site they've posted an article from the September 2017 issue - the "Community Corner" from James Titcumb all about the return of PHP TestFest.

There is a new movement in the PHP community! Well, it isn’t exactly new, but an event called PHP TestFest is back. PHP TestFest is a global event organized by the PHP community at large, where an effort is made each time to increase the test coverage of the PHP engine itself. Around eight or nine years ago, user groups around the world coordinated to organize events spanning a few months each year, with some groups continuing events annually for several years after.

The article goes on to talk about some of the reasoning behind the TestFest and how you can help to set up an event for a local group to contribute. It then goes through the format of tests, creating new ones and how to execute them to test the result. You can find out more about PHP TestFest and how you can get involved on the main PHP TestFest site.

tagged: phptestfest phparchitect communitycorner article sept2017 issue

Link: https://www.phparch.com/2017/09/community-corner-php-testfest-has-returned/

php[architect]:
Single Sign On - You’re Probably Doing It Wrong
Aug 15, 2017 @ 13:28:32

The php[architect] site has a new post today sharing an article from their August 2017 issue by author (and member of thePHP.cc) Arne Blankerts: "Single Sign On - You’re Probably Doing It Wrong ".

Requiring users to log in individually to all the websites they need for their work is more than merely annoying: It wastes a lot of time and turns maintaining log-in credentials and permissions into a nightmare for the administrative staff. Let’s see if we can fix that with a single sign-on service.

The article talks about the basics of single sign on and what kind of benefits it brings to the table. They also talk about the single point of failure it introduces and some of the problems that can cause. The article then discusses the choices involved in implementing it: Should it support authentication, authorization or both? Should OAuth be involved? What about SAML? Other alternatives are also offered including JWTs, tokens/callbacks and client side certificates. The article ends with the suggestion that a proxied approach, one that authenticates on the first request but the session is then trusted by other services, is one of the better ways to go (but isn't without its own issues either).

tagged: singlesignon article phparchitect magazine arneblankerts security

Link: https://www.phparch.com/2017/08/single-sign-on-youre-probably-doing-it-wrong/

php[architect]:
Artisanal: Project Creation
May 18, 2017 @ 11:59:12

On the php[architect] site they've shared an article originally from the May 2016 issue of the magazine by Joe Ferguson: Artisanal: Project Creation (also released as a free PDF).

Every developer has a set way of starting a new project. Most frameworks have a linear path to getting started, and Laravel is no exception. With a few commands, you can quickly get started configuring routes, writing controllers, and saving data in a database.

In the article Joe walks you through the tools and commands that come with the Laravel framework to make getting up and running quickly easier. He covers tools available for both the backend and frontend functionality as well as testing (mentioning Dusk), routing, middleware groups and database functionality.

tagged: phparchitect magazine free article project creation laravel artisan

Link: https://www.phparch.com/2017/05/artisanal-project-creation/

SitePoint PHP Blog:
The past, Present and Future of the PHP-FIG
Sep 16, 2016 @ 13:17:40

On the SitePoint PHP blog Larry Garfield, a member of the PHP-FIG group, has written up an article covering the past, present and future of the PHP-FIG. In it he tries to give readers a perspective on where the group came from, some of the growth they've seen along the way and, finally, the proposal for PHP-FIG 3.0 - a restructuring of the organization based on things they've learned so far.

The PHP Framework Interoperability Group (PHP-FIG, or just FIG for short) is at a crossroads. Many electrons have been sacrificed talking about FIG’s tribulations of late, but sadly much of it has been FUD, with little effort spent on the positive. At SitePoint’s invitation, I’d like to offer a more positive outlook on FIG and the PHP community, and demonstrate why FIG can, and should, continue to have a positive impact on the PHP ecosystem.

He starts with where the group began (an "uncomfortable beginning") at php[tek] 2015 and the proposal/passing of the PSR-0 autoloading specification soon after. He then gets into the "slow but steady growth" the group had over the next several years and some of the groups that became involved (not just framework projects either). He covers some of the other PSRs created/passed, the impact they've made on the community and the growing pains they've gone through. He ends the post talking about the PHP-FIG 3.0 proposal and some of the support, opposition and discussion that has come along with that.

tagged: phpfig article past present future organization framework interoperability phpfig3

Link: https://www.sitepoint.com/the-past-present-and-future-of-the-php-fig/

SitePoint PHP Blog:
The PHP Channel’s Survey Results and 2016 Plans
Jan 22, 2016 @ 10:12:46

A while back the SitePoint PHP blog did a survey asking for reader feedback about the content they provide, what they thought was good/bad about it and what they'd like to see more of in the future. In this new post they share some of these results.

On the last day of 2015, we published a survey asking you, the readers, for an opinion about the PHP channel. It was a pretty open survey with mostly freeform answers allowed, so you could tell us literally anything. All in all, we collected 78 responses so far (the survey will remain open indefinitely, in case someone wants to give us more feedback).

On the average satisfaction scale, we scored 7.42 out of 10, and that’s without excluding the potential trolls who voted 1. That’s a very good result, but we’re determined to improve it further.

The rest of the post then gets into the results in detail, talking about:

  • overall satisfaction with the blog and its contents
  • opinions on the newsletter
  • author feedback
  • favorite types of posts
  • their presence on social media

They end the post with a summary of the things people wanted the most out of the site including more demos/practical examples and more PHP 7-related content. While these results are mostly applicable to the SitePoint PHP blog, they also can be applied a bit more widely across the community and on other sites that publish articles with technical content.

tagged: sitepoint channel survey results article feedback

Link: http://www.sitepoint.com/the-php-channels-survey-results-and-2016-plans/