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

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/

Derick Rethans:
15 years of Xdebug
May 10, 2017 @ 10:27:14

In a recent post the fifteenth anniversary of the XDebug PHP debugging tool was celebrated and lead developer Derick Rethans was presented with several tokens of appreciation from the PHP community. In this new post to his site he shares the experience (it was a surprise after all) from his perspective and thanks those involved.

This article was going to be about some upcoming features in the 2.6 release. Or rather, I was hoping to announce at least a beta release of Xdebug 2.6. Unfortunately, I couldn't find enough time to work on all the issues that I wanted, although I've made a little progress.

What I can write about, is a little mystery.

He talks about the initial invite from James Titcumb to meet him at his favorite whisky store and the eight special bottles that the community purchased to show their appreciation for his hard fifteen years of work on this invaluable tool. He lists out the types for those interested and some of the messages from contributors showing their appreciation. He thanks all of those involved.

And on the Xdebug front, there are plenty of bugs to fix, features to add for Xdebug 2.6, and undoubtedly Dmitry will be "breaking" some things in PHP 7.2 that I need to support in Xdebug as well.
tagged: fifteen years anniversary derickrethans xdebug debugging tool project whiskey

Link: https://derickrethans.nl/xdebug-15.html

Matt Stauffer:
What happens to Laravel if Taylor Otwell disappears?
May 09, 2017 @ 11:52:25

In this post to his site Matt Stauffer poses an interesting question around one of the more popular PHP frameworks these days. He wonders "what would happen to Laravel if Taylor Otwell disappears?"

After we talked a bit about enterprise apps on the Laravel Podcast the other day , a few folks in the Laravel community have been talking about what makes a tool enterprise-ready. I have a lot of thoughts about support plans, SLAs, and other such features of "enterprise-readiness", but I'll save those for a later date. Today, let's talk about the easiest-to-dismiss concern: What happens if Taylor disappears suddenly?

This question brings up the point that, unlike a framework backed by a company, a framework backed by an individual relies on that individual's desire and ability to keep the project running. What happens if Taylor decides he wants to retire and be a goat farmer?

He shares the plan that's already been set in place with Jeffrey Way (of Laracasts) being the next in line to head up the project. He also mentions the Laravel, LLC company that wouldn't go away if Taylor did and how the community would fit in.

tagged: laravel taylorotwell project leader jeffreyway company community

Link: https://mattstauffer.co/blog/what-happens-to-laravel-if-taylor-otwell-disappears

Tomas Votruba:
Why Is Doctrine Dying
Apr 04, 2017 @ 13:13:45

In a recent post to his site Tomas Votruba shares some of his opinions about why he thinks that Doctrine is dying sharing three of the reasons he sees for this trend.

Do you use Doctrine ORM? If so, do you follow its evolution on Github? Symfony is evolving, Laravel is evolving, Nette is evolving, world is evolving... Doctrine not. Today I will show you 3 reasons why.

I've been thinking over 2 years about this post. I wasn't sure if it's only negative hype feeling or real thing. It's still the same so it's time to write about it.

He starts off by stating that Doctrine is "an awesome tool" but suggests that it is stuck in its legacy world and hasn't been able to evolve much past some of its original functionality. In his opinion this is because of the project's "system setup" not the code quality or maintainers. He then offers the Doctrine project three suggestions on what they could do to help change the course of the project. This includes becoming more competition to other options and consolidating the 20+ Doctrine repositories down to a much simpler structure.

tagged: doctrine project dying opinion suggestion

Link: https://www.tomasvotruba.cz/blog/2017/03/27/why-is-doctrine-dying/

Rob Allen:
Using CircleCI for a PHP project
Apr 03, 2017 @ 09:56:20

In a post to his site Rob Allen shares a basic setup for using Circle CI with a PHP project for continuous integration. Circle CI provides the resources to build your project and perform tasks such as run unit tests or even deploy the resulting code to the production environment.

For a new client project, I've decided to use CircleCI to run my tests every time I push to GitHub. This turned out to be quite easy; this is how I did it.

He shares the contents of his .circleci/config.yml configuration file creating a Docker environment each time the build is executed, installing the required software, executing Composer install and running PHPCS and PHPUnit tests. He shares an example of the output from a build and how he hooked in Slack to receive notifications when the builds were complete (and pass/fail status).

tagged: circleci service continuous integration project tutorial configuration docker

Link: https://akrabat.com/using-circleci-for-a-php-project/

Nikola Posa:
Keep PhpStorm metadata away from project sources
Mar 15, 2017 @ 11:54:57

In a new post to his site Nikola Posa shows the PHPStorm users out there how to keep metadata about your projects away from the source (the content in the ./idea directory it creates by default).

I fell in love with PhpStorm only few months ago ago when I switched from NetBeans, my favorite IDE by then. One thing that I was missing from the very start is the ability to separate project metadata (.idea/ directory) from sources, because I like to keep away everything that is unnecessary from my project directory, as well as from the .gitignore file. It turned out that something like that is possible, but in contrast to NetBeans it's not so evident and requires a little more effort

It's a pretty simple four step process and he shows what settings to change:

  • Create new project in a directory where you would usually keep metadata
  • Open Settings / Preferences dialog and click on Directories node
  • Click Add Content Root button and select project sources directory
  • Remove content root that keeps project metadata

Screenshots are also included for each step to help make sure you're in the right place at all times.

tagged: phpstorm metadata project source setting configuration

Link: http://blog.nikolaposa.in.rs/2017/03/09/phpstorm-metadata-away-from-project-sources/

Ondrej Mirtes:
How I Got From 0 to 1 000 Stars on GitHub in Three Months With My Open Source Side Pr
Mar 08, 2017 @ 10:37:39

Ondrej Mirtes has offered some advice in this Medium.com post sharing some of his experience in the development and management of his PHPStan project (static analysis for bug detection).

Most developers have side projects. That's how we try out new things or make something that we miss on the market or in our dev stack. But most side projects end up unfinished and never actually see the light of day. And even if a developer builds up the courage to show his work to the public, he quickly finds out that just publishing a repository doesn't actually bring the masses to his doorstep.

At the beginning of last December, I released PHPStan? - ?static analysis tool for PHP that focuses on finding bugs. The project gained a lot of traction resulting in currently over 1 300 stars on GitHub and more than 30 000 downloads on Packagist.

He spends the rest of the article sharing the things he did to make sure that the project "didn't end up in the dustbin of history" and be successful. Topics include:

  • Build the hard stuff first
  • Serve market needs
  • Promotion
  • Ask for money

He ends with what he sees as the most important part of any good open source project - as a maintainer you need to "be nice". This means being responsive to incoming feedback, keeping in mind that people contribute/comment because they care about the project (and it's not usually about you).

tagged: opensource project advice phpstan needs promotion money nice

Link: https://medium.com/@ondrejmirtes/how-i-got-from-0-to-1-000-stars-on-github-in-three-months-with-my-open-source-side-project-8ffe4725146#.wihwnsy8u

Jason McCreary:
Lumen is dead. Long live Lumen.
Feb 28, 2017 @ 15:17:59

In a new post to his site Jason McCreary offers some of his opinions around why he thinks Lumen is dying. Lumen is a micro-framework from the creators of Laravel offered as an alternative to the full-on Laravel framework.

You’ve already read the title, so I’ll just say it, I think Lumen is dying, if not already dead. Now let me tell you why…

Jason (creator of Laravel Shift) shares some of his own statistics around Laravel versus Lumen "shifts" and some graphs that help to support the theory. He suggests that part of the issue is that there's less focus on a wider, more general use of the tool and how he suspects that the Lumen feature set will continue to lessen. He ends on a more positive note, though, suggesting that Lumen as it stands may not exist in the future but may live on integrated into the Laravel framework.

tagged: lumen project laravel dead opinion

Link: https://jason.pureconcepts.net/2017/02/lumen-is-dead-long-live-lumen/

Zend Blog:
Answering your questions about unit testing
Jan 23, 2017 @ 12:07:52

On the Zend blog they've posted an article where Zend's own Cal Evans shares the answers to some of the questions he received from a "unit testing for product managers" webinar.

Thanks to everyone that joined our Unit testing for project managers webinar yesterday. It was great to see so many people engaged and asking questions. I’ve pulled together answers for your questions we didn’t get to on the webcast. If you have more questions, leave a comment below!

If you missed the webinar or want to re-watch it, the on-demand version is now available. The slides are also posted on Slideshare.

The questions he answers touch on topics that include:

  • property-based testing
  • testing on an existing project (medium or large)
  • integration vs unit testing

The final answer covers something shared at the end of the presentation, the resolution to "just do it". Cal backs that statement up with some additional detail and puts it in the mindset of a project manager.

tagged: unittest question answer qa project manager webinar

Link: http://blog.zend.com/2017/01/19/answering-questions-about-unit-testing/#.WIYXRLbyuMI

Nikola Poša:
On structuring PHP projects
Jan 17, 2017 @ 10:17:18

Nikola Poša has shared some advice form his own experience on structuring PHP projects and some alternatives to some of the typical structures seen across many packages and applications.

An indispensable part of every programming project is how you structure it, which involves organizing files and sources into directories, naming conventions, and similar. As your application grows, so does the need for structuring it in way that it is easy to manage and maintain.

In most cases, structure of an average PHP-based application is dictated or influenced by the framework that is being used, which is something I'm opposed to. With no intention to be intrusive and without any bias towards specific framework, I'll share with you how I think about organizing my PHP projects.

He starts with a common directory structure seen in a wide range of projects in a framework agnostic way. He mentions the PHP-PDS project that tries to promote this same structure but also provides some alternatives:

  • grouping by archetype
  • grouping by feature
  • splitting out domain and general-purpose code

For each he provides an example of the directory structure and explains the rationale behind it a bit.

tagged: project structure applications grouping archetype feature domain

Link: http://blog.nikolaposa.in.rs/2017/01/16/on-structuring-php-projects/