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

Derick Rethans:
New Date/Time Support in MongoDB
Aug 15, 2017 @ 09:46:11

In a new post to his site Derick Rethans talks about the new DateTime support in MongoDB and includes some PHP examples showing the changes in action.

In the past few months I have been working on adding time zone support to MongoDB's Aggregation Framework. This support brings in the timelib library that is also used in PHP and HHVM to do time zone calculations.

He then splits the rest of the post up into parts for the changes that this integration brings:

  • Time Zone Support for Date Extraction Operators
  • The $dateToParts Operator
  • The $dateFromParts Operator
  • Changes to the $dateToString Operator
  • The $dateFromString Operator
  • Using Date Expressions in $match

The post ends with a few notes about these changes, noting that it's currently only in the development release and "should be considered experimental" and subject to change. He then points out a few issues that will probably require updates to these features.

tagged: datetime support mongodb example tutorial list

Link: https://derickrethans.nl/mongo-date-time.html

Matt Stauffer:
What packages do you install on every Laravel application you create?
Jul 19, 2017 @ 12:29:44

On his site Matt Stauffer has a post that asks the readers about the packages they always install for their Laravel applications (and not necessarily just Laravel related packages either).

In preparation for my upcoming [talk](http://customlaravel.com/) at [Laracon 2017](https://laracon.us/), which I'm titling "Custom Laravel," I [asked a quick question](https://twitter.com/stauffermatt/status/885666786036899840) on Twitter to my followers. [...] I wanted to know for my talk, but I was also just curious for my own purposes. Are there any packages I should check out that everyone else already knows about? Here's what I found, in order of the number of recommendations I received...

While most of the packages in his lists (unanimous support, well-loved, etc) are Laravel specific, mostly because of his audience on Twitter, there are some that weren't. These included:

You can check out his full listing in the remainder of the post and a link to another listing from Mike Erickson asking the same kind of question.

tagged: package install laravel application community feedback list

Link: https://mattstauffer.co/blog/what-packages-do-you-install-on-every-laravel-application-you-create

TutsPlus.com:
Should You Use a PHP Framework? Five Pros and Cons
Jul 12, 2017 @ 10:22:33

On the TutsPlus.com site today they've posted an opinion article that tries to help answer the question "Should You Use a PHP Framework?". They provide their own list of top five pros and cons, representing each side and hopefully getting you thinking about your own project.

From routing HTTP requests to accessing the database and rendering the user interface, most web applications have a lot in common with each other. Many of them allow their visitors to sign in, and it's hard to imagine a web application without email sending. A software framework is a way to put this observation into use.

But is using a framework always the best way to go, or does it sometimes make sense just to start from scratch using nothing but plain PHP? To answer the question, in this tutorial, we will look at five pros and cons of using a PHP framework.

Items under their "pros" list include how they allow for more rapid development, easier maintenance in the future and the support of the community around the project. Their "cons" list talks about topics like the more general approach most frameworks take, the lower level of performance vs just PHP and the limited visibility into how the core framework works where it's not supposed to be customized.

tagged: framework opinion pro con list top5 reasons

Link: https://code.tutsplus.com/tutorials/should-you-use-a-php-framework-five-pros-and-cons--cms-28905

Laravel News:
A Roundup of Laravel Testing Resources and Packages
Jul 12, 2017 @ 09:50:29

On the Laravel News site there's a new post sharing a list of Laravel testing resources and package that you can use for your Laravel-based applications to make testing easier and less work overall.

Testing code is one of the more challenging parts of programming, but luckily Laravel and some other tools are making it easier than ever. Research has even shown implementing a Test-Driven Development (TDD) approach can significantly reduce the number of bugs that make it to production. Testing provides many other benefits, like the freedom to refactor large parts of a system without (as much) fear of breaking things.

With all of the benefits of testing, it’s still challenging to continually test applications. If you are looking to start learning how to test Laravel applications or you want to expand your skills here is a list of great resources to help you.

Included in their list are resources like the official documentation, Laravel Dusk, the Laracasts Laravel Behat extension, the phpspec Laravel extension and Spatie Laravel packages. Each item on the list includes a screenshot, a brief description of the resource/tool and links to get more information about it.

tagged: laravel testing package tool list resource link

Link: https://laravel-news.com/laravel-testing-resources

Stefan Koopmanschap:
A list of podcasts
Jul 05, 2017 @ 09:12:57

Stefan Koopmanschap has a new post to his site sharing a list of podcasts he enjoys and thought you might too.

I had sitting in travel not being able to do anything. Listening to music can help, but can end up also being frustrating. While I was working at Schiphol last year I got pointed to podcasts. Since then I've been really getting into listening to podcasts on my daily commute and it's been making the trip a lot more fun... and useful.

Here is a random collection of podcasts that I've been listening to in the past year and a half, on many different subjects. My main problem right now is that it's so many that I'm way behind on the episodes of most of these. Ah well, it's still quite good content.

Technology-related shows in the list include /dev/hell, Sound of Symfony and Voices of the ElePHPant. Others relate to topics like "justice, true crime, wrongful convictions etc", video games and a few Dutch language technology podcasts.

tagged: podcast list opinion technology justice dutch

Link: https://leftontheweb.com/blog/2017/07/01/a-list-of-podcasts/

SitePoint PHP Blog:
8 Must Have PHP Quality Assurance Tools (2017 Update)
Jul 03, 2017 @ 13:43:09

As you write your PHP code, you'll need to verify that everything is working as expected and that the code follows all style and formatting requirements. In this list from the SitePoint PHP blog they give you a list of eight tools you can use to ensure all of these criteria are met.

For shipping quality code, we must have testing in mind while coding (if not doing TDD). However, with the wide range of PHP testing tools out there, it’s hard to make a choice! Exploring PHP is a fun adventure (premium course on that here!) but it’s hard to assemble a toolbelt that’s not too heavy to wear to work!

This popular article will highlight the most popular testing tools and has been updated to reflect the state of QA tools in 2017.

Included in their list are tools like:

  • PHPUnit
  • Cucumber
  • Selenium
  • Kahlan
  • php_testability

The post ends with a brief look at continuous integration and how they can help execute these tools automatically when code changes or before production builds are deployed, taking most of the burden off of developers to remember.

tagged: top8 list quality assurance tools ci continuous integration

Link: https://www.sitepoint.com/8-must-have-php-quality-assurance-tools/

Zend Developer Zone:
Deprecations in PHP 7.2
Jun 28, 2017 @ 11:20:50

On the Zend Developer Zone there's a new post sharing some of the deprecations coming with PHP 7.2, the next release in the 7.x series (planned release sometime later this year).

PHP is a living language and as such, as some things are added, others are removed. Since PHP adheres to the best practice of Semantic Versioning, nothing will be going away in PHP 7.2, but some things will be marked as “Deprecated” so that developers can start removing them from their code and finding better ways to get the job done.

PHP 7.2 brings us a new list of things that will be eventually going away. The complete list, as well as explinations and voting can be found at “PHP RFC: Deprecations for PHP 7.2

They include a "hit list" of the functionality that will be affected including the removal of support for __autoload, the create_function function, removal of assert and the (unset) cast. The RFC has been moved to the "Accepted" state so now work will be done to make these and other deprecations happen in this next great release.

tagged: language deprecation php72 list rfc

Link: https://devzone.zend.com/7628/deprecations-php-7-2/

Sebastian De Deyne:
The List Function & Practical Uses of Array Destructuring in PHP
May 15, 2017 @ 10:26:37

Sebastian De Deyne has written up a post to his site spotlighting PHP's list function and showing how it can be used for "array destructuring" and how recent changes in PHP 7.1.x make it more useful.

PHP 7.1 introduced a new syntax for the list() function. I've never really seen too much list() calls in the wild, but it enables you to write some pretty neat stuff.

This post is a primer of list() and it's PHP 7.1 short notation, and an overview of some use cases I've been applying them to.

He starts with a basic introduction to the list function and how it assigns out variables based on an array. He then shows examples of the updates that came with PHP 7.1, allowing you to specify the key from an array to more selectively extract only the value you want. Three "exhibits" are then provided, showing actual use cases for this functionality: basicunpacking examples, creating tuples and handling multiple return values.

tagged: list function use array destructuring php71 functionality tutorial tuple returnvalue

Link: https://sebastiandedeyne.com/posts/2017/the-list-function-and-practical-uses-of-array-destructuring-in-php

TechBeacon.com:
35 programming habits that make your code smell
Apr 25, 2017 @ 11:11:47

The Tech Beacon site has posted a list of thirty-five programming habits that make your code "smell", little things that you might do every day without knowing they could be causing issues with the long term maintenance of your code.

Bad habits are hard to break and even harder if you don't realize that what you're doing is undermining your work. If you know but don't care—that would be the worst. But you're here, aren't you?

As a programmer, I've seen a lot of poor practices, not just around code, but also around teamwork skills. I've been guilty of practicing many of these bad habits myself. Here are my top 35 bad programming habits, organized into four categories: code organization, teamwork, writing code, and testing and maintenance.

They've broken up the bad habits into different categories to make it a bit easier to consume:

  • Code organization
  • Teamwork
  • Writing code
  • Testing and maintenance

I think just about any developer out there as, at one time or another, fallen into the trap of one or more of these bad habits.

tagged: thirtyfive habits bad practices developer programming list

Link: https://techbeacon.com/35-bad-programming-habits-make-your-code-smell

Fabien Potencier:
Symfony 4: Best Practices
Apr 10, 2017 @ 11:51:34

Fabien Potencier (creator of the Symfony framework) has a new post on his site continuing his look at Symfony 4. In this latest article he looks at some of the best practices to use in the next major release of the framework based on some of the architectural changes coming down the line.

Any major version of a project is an opportunity to revisit its best practices. Modernizing them. Adapting them to the project's new features. Symfony 4 is no exception.

He breaks it up into a few different sections offering tips around each, just to get you thinking about the path ahead with v4 releases:

  • Standardization first (using more standard tools)
  • Bundle-less Applications
  • Environment Variables
  • Unified Web Front Controller
  • Makefile
  • Assets Management

Each item includes a description of some of the changes coming and what behaviors you'll need to modify to make life smoother in the Symfony 4 transition.

tagged: symfony4 bestpractice list framework standardize bundle environment makefile assets

Link: http://fabien.potencier.org/symfony4-best-practices.html