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

Alejandro Celaya:
Project Scalability with Zend Expressive
Jul 21, 2016 @ 09:46:10

In a new post to his site (also posted on the Zend Developer Zone) Alejandro Celaya looks at scalability with Zend Expressive, a lightweight framework from Zend, the creators of the Zend Framework.

I've been working with some different frameworks lately. One of them is Zend Expressive, and I've come to the conclusion that I don't need to choose between different frameworks; depending on the project, Expressive always fits my needs and scales from small projects to bigger applications.

He starts off by looking at the "microframework approach" that Zend Expressive takes, making it easier to get up and running for smaller applications. He points out that this setup is fine when the application is small, but what happens as it grows - it just wouldn't scale well and be manageable. He talks about the setup he uses for larger scale applications, moving the configuration to dynamic config files and making use of more complex dependency injection. He also talks some about modularity in applications, the "middleware paradigm" and how he set up controller-style dispatching (versus just the default closures method).

tagged: zendexpressive tutorial scalability framework microframework update functionality

Link: http://blog.alejandrocelaya.com/2016/07/21/project-scalability-with-zend-expressive/

How to Program With Yii2: Uploading Files
Jul 15, 2016 @ 12:15:45

On the TutsPlus.com site there's a new installment in their "How to Program With Yii2 Series" looking at implementing file uploads with some simple examples.

In this How to Program With Yii2 series, I'm guiding readers in use of the Yii2 Framework for PHP. In this tutorial, I'll guide you through the basics of uploading files and images in Yii2.

For these examples, we'll continue to imagine we're building a framework for posting simple status updates, e.g. our own mini-Twitter. The image above demonstrates writing a short update while uploading a picture I took of the Taj Mahal.

They start with a look at some of the file upload plugins that seemed like the best they found to use with Yii2: FileInput and the 2Amigos BlueImp File Uploader. They go with the first option for the rest of the tutorial, showing you how to get it installed (via Composer), updating your current database tables and changing the model to reflect these updates. Next they help you create the view with the image upload form and one to display the image result once the upload is successful (including the controller code needed).

tagged: yii2 framework series tutorial upload files plugin

Link: http://code.tutsplus.com/tutorials/how-to-program-with-yii2-uploading-files--cms-23511

Robert Basic:
Using Tactician in a Zend Expressive application
Jul 14, 2016 @ 10:41:10

In this recent post to his site Robert Basic shares some of his experience integrating the Tactician command bus library into a Zend Expressive-based application.

I spent some time connecting the dots last week, so I decided to put together an example on how to get started with using Tactician in a Zend Expressive application. The example itself is not really useful, but it does show how to setup the dependencies and get started with these two libraries.

He briefly introduces the two pieces of technology here and then "dives in" immediately to the integration. He shows how, using the Zend Expressive skeleton application, to expand on the default "ping" endpoint and add in the Tactician library (and another library that makes it easily integrate with the DI container). He updates how the "ping" action is made in the routing, making it go through a factory. He then brings Tactician in, setting up the command bus and a simple "ping" command for the bus to use in handling the requests to the /api/ping endpoint. Complete code and explanations of each part are included in the tutorial to help you follow along.

tagged: tactician commandbus zendexpressive command tutorial psr7 framework

Link: https://robertbasic.com/blog/using-tactician-in-a-zend-expressive-application/

Laravel News:
Laravel Turns Five
Jun 13, 2016 @ 11:55:54

On the Laravel News site there's a post announcing the official fifth birthday of Laravel, a framework that has definitely made its mark on the community in that short amount of time.

Five years ago today Taylor announced the first release of Laravel to the world. [...] Even though a lot has changed and improved since that first release the code still has that same feel. Like all newborns that first release was very minimal–no controllers, no Eloquent, no templating system. It had enough to get you started but lacked the niceties we now enjoy.

The post also lists some of the things that didn't start out in the framework but have been added since including: Blade, Collections, Eloquent, Queues and Middleware support.

Happy birthday Laravel and a big thank you to Taylor and the entire community.
tagged: laravel framework fifth birthday celebrate features announcement

Link: https://laravel-news.com/2016/06/laravel-turns-five/

SitePoint Web Blog:
Please: Automated CMS and Framework Installs in Vagrant
May 25, 2016 @ 10:29:08

On the SitePoint.com site's "Web" category they're posted a tutorial showing off an interesting piece of software that helps make automated installs of CMS/frameworks easy: a simple bash script tool called Please.

If you’re a web developer, possibly one of your most boring and repetitive tasks is the configuration of the basic setup for every new project. Configuring your my-project.dev domain, creating the database, installing WordPress (or any other CMS/Framework) for the thousandth time: you already know how to do it. What if you could automate all of that?

Well, actually, you can. Please is a simple bash script that helps to automate the installations of many CMSs and Frameworks by configuring them automatically into your Vagrant box, adding a development domain name into your host file, and even a database if needed.

They start off by helping you get a Vagrant box up and running to use for the Please handling. You then clone the Please repository locally and can use the command line tool to set up the process for multiple CMS/framework types including WordPress, Laravel and React. There's also a section covering the creation of your own environment if you need something more custom. Please is currently in beta at the time of this post so be aware that there may still be issues that need resolving before it becomes stable.

tagged: please automated installation tool commandline cms framework vagrant

Link: https://www.sitepoint.com/please-automated-cms-and-framework-installs-in-vagrant/

Matthew Weier O'Phinney:
Programmatic Expressive
May 17, 2016 @ 11:45:34

In this new post to his site Matthew Weier O'Phinney looks at a common misconception there seems to be for people using the Expressive framework from Zend - that their applications should be entirely configuration-driven.

Enrico just returned from phpDay, where he spoke about Expressive and the upcoming Zend Framework 3. One piece of feedback he brought back had to do with how people perceive they should be building Expressive applications: many think, based on our examples, that it's completely configuration driven!

As it turns out, this is far from the truth; we developed our API to mimic that of traditional microframeworks, and then built a configuration layer on top of that to allow making substitutions. However, it's not only possible, but quite fun, to mix and match the two ideas!

Matthew goes on to share an experiment he tried using his own code to "tweak" things away from being configuration-driven to a more programmatic approach. He shares a few tips to remember when trying the same with your application too. The post ends with an example of this migration and some of the benefits/issues that could come from the change.

tagged: programmatic expressive framework configuration migrate example

Link: https://mwop.net/blog/2016-05-16-programmatic-expressive.html

Symfony Blog:
Announcing the Fourth Symfony Docs Hack Day
May 13, 2016 @ 09:58:29

On the Symfony Blog they've posted the official announcement of their Fourth Symfony Docs Hack Day happening on May 21st. This hack day is focused on just improving the documentation for the framework, not handling bugs in the main codebase itself.

The Symfony project is proud to announce its fourth Symfony Docs Hack Day. This Hack Day will be an online event to give a push to the Symfony Docs before the Symfony 3.1 release at the end of this month.

[...] Hosts Ryan Weaver, Wouter de Jong and Christian Flothmann along with you and all your friends from the Symfony community. The Hack Day is for everyone - we need Symfony experts and newcomers. If you're new to Symfony, you give us a fresh look at the documentation!

The post gives you a bit of an idea what the event will be like and what you can expect, especially as a first time submitter. It will be happening completely online via the "#symfony-docs" channel on the Freenode IRC network. You can prepare by following some of the links in the post to pending pull requests and a list of missing documentation contents.

tagged: symfony hackday documentation update event irc freenode framework

Link: http://symfony.com/blog/announcing-the-fourth-symfony-docs-hack-day

Jeremy Curny:
Symfony 3 - REST API
Apr 04, 2016 @ 13:19:26

In this post to his site Jeremy Curny briefly walks you through the creation of a REST API using the Symfony 3 framework and several components/bundles to add in common functionality.

He includes the commands and dependencies you'll need to get the system set up:

  • Initialize the project
  • Install dependencies (including the FosRestBundle, JMSSerializerBundle and NelmioCorsBundle bundles)
  • Register bundles
  • Configure bundles
  • Making the first route

He ends with the command to run the built-in web server and be able to test out the result. The simple action he's created can then be called using a GET request on the default/index route with a 200 OK response with "hello world" content.

tagged: symfony3 symfony framework tutorial rest api project

Link: http://jeremycurny.com/2016/03/27/symfony3-rest-api/

That Podcast:
Episode 26: Show me the Monii
Mar 09, 2016 @ 09:13:26

That Podcast, a show hosted by PHP community members Beau Simensen and Dave Marshall, has posted their latest episode - Episode #26: Show me the Monii.

Beau and Dave start a series of episodes discussing Beau's new startup, Monii. We talk briefly about the features and scope of their first product, including how he can really see how it would have helped him while he was self-employed.

We then take a dive in to some of the tech stack, with Beau telling us all about the front-end, including the frameworks, libraries and build tools.

Other topics mentioned in this episode include React, the JSON API project, Babel and Webpack. You can listen to this latest episode either through the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their RSS feed or on iTunes to get the latest episodes as they're released.

tagged: thatpodcast ep26 monii frontend framework library build tool

Link: https://thatpodcast.io/episodes/episode-26-show-me-the-monii

Symfony Blog:
Virtual Symfony Hack Day - March 12th!
Mar 08, 2016 @ 13:41:08

On the Symfony blog they've officially announce their latest virtual Symfony Hack Day coming in March (on the 12th). This event is a concentrated effort from the project and developers to come together and solve issues over several hours.

Symfony has always been a project driven by a huge and active community. [...] Because Symfony has a predictable release schedule, we know that feature freeze for Symfony 3.1 will be at the end of this month (March). That makes the next few weeks of development really important!

That's why we've decided to organize an online hack day, and I would love if you'd join us. If you're an experienced contributor, great! If you're new, even better! This hack day will focus on teaching you how to contribute.

The event will be happening March 12th from 3pm to 8pm CET / 9am to 2pm EST and will focus around the #symfony-dev channel on the Freenode IRC network. They'll be focusing on how to get started contributing to the framework including a mini-workshop showing how to triage issues to creating a pull request.

tagged: symfony framework hackday march virtual symfonydev freenode irc beginner contribute howto

Link: http://symfony.com/blog/virtual-symfony-hack-day-march-12th