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

ThePHP.cc:
The Future of Zend
Oct 29, 2018 @ 15:17:44

In a recent post on their own site, thePHP.cc has shared some of their own perspectives about the recent future of Zend announcement. For those that aren't aware, the company that acquired Zend several years ago - Rogue Wave - announced their decision to discontinue their support of the Zend Framework project.

Last week, Zeev Suraski, Matthew Weier O'Phinney, Enrico Zimuel and Dmitry Stogov, all well-known members of the international PHP community, announced that they will leave Zend, which has been part of Rogue Wave since 2015.

The stated reason is Rogue Wave's strategic decision to focus on the development of Zend Server. If you read between the lines, this implies that Rogue Wave is not going to continue or support the development of the Zend Engine (the core of PHP responsible for compiling and executing code), their IDE Zend Studio, and Zend Framework.

Of course, it is perfectly valid to make money off an Open Source project. This, however, implies at least a moral obligation to give back to said project. Rogue Wave, it seems, will now terminate the symbiotic relationship between PHP and Zend.

The author (Stefan Priebsch) talks about "lip service" not being enough when a company wants to make money from customers but aren't willing to help with the development of the underlying software. He also mentions several other Zend-related products that have a bit more quietly gotten the axe over the years since the acquisition. He wonders about the "downsizing" this could cause in the PHP community given ZF's impact and how, despite this being a large setback for the project, he sees its future as promising given the people involved and the projects around it.

tagged: future zend opinion zendframework project roguewave community

Link: https://thephp.cc/news/2018/10/the-future-of-zend

Nikola Posa:
Lazy loading services using Zend Service Manager
Jul 16, 2018 @ 16:41:34

On his site Nikola Posa has a tutorial showing how to lazy load services with Zend Manager, a component of the Zend Framework. In this case, the "services" being loaded are in a dependency injection container.

Any more complex application includes a big dependency injection tree of services, some of which can have a more complicated creation logic. If the service is injected as a dependency, but not necessarily used at every execution, you may want to lazily initialize that service until it is really needed.

In those situations, you may be tempted to inject the entire Dependency Injection Container instead, and lazy-load that resource-hungry service. I find that to be an anti-pattern, and I explained my views in a blog post written some time ago.

He offers a better solution in the form of the proxy design pattern, making it possible to decouple the services from the dependency injection container. He provides examples of using this pattern along with the Zend Service Manager functionality to create the factories and the services configuration.

tagged: lazy load services zend servicemanager tutorial proxy designpattern

Link: https://blog.nikolaposa.in.rs/2018/07/14/lazy-loading-services-using-zf-service-manager/

Zend Blog:
Zend Framework - ACLs for users with multiple roles
Jul 06, 2018 @ 17:44:25

On the Zend Blog there's a new tutorial posted that covers the situation where a user has multiple roles and you're using ACLs (access control lists). The post shows how to accomplish this with the ZendAcl component of the Zend Framework.

After covering the essentials of the ZendPermissionsAcl component (Access Control unit, Cross Cutting Concerns module, in the Zend Framework Advanced course), many students have approached me to ask, “what happens if a user has multiple roles?”

In this article I discuss the “traditional” way of handling a user who has multiple roles, and then lay out an easy approach which I simply call Mr. X.

The tutorial starts with a bit of a refresher on the use of the ZendAcl component to define the list of roles and resources (and relating the two). It also covers the "everyone" (anonymous) role and adding that into the mix. The "one user, multiple roles" issue is then solved with a multiCheck function that can verify multiple roles at once. Finally it talks about "Mr. X" and how to add that to all users, assuming that they will have the groups/roles information we need.

tagged: zend zendframework acl multiple role tutorial anonymous

Link: http://blog.zend.com/2018/07/05/zend-framework-access-control-lists/#.Wz9wv9hKjUY

7PHP.com:
Interview with Matthew Weier O'Phinney (Principal Engineer at Zend Technologies)
Jul 02, 2018 @ 14:04:02

On the 7PHP.com site Khayrattee Wasseem has posted an interview he recently had with a member of the PHP community and lead on the Zend Framework/Zend Expressive projects: Matthew Weier O'Phinney.

This is the #39th set of PHP Interview to help aspiring PHP developers & PHP fans alike to get inspired by listening from those PHP guys who are already highly involved into the PHP Ocean and being ‘there’ taming the waves, surfing better than ever to make themselves an awesome PHP Expert both in their own eyes (for self-accomplishment) and for the PHP Community.

On the other side, this is an opportunity for new PHPers to get to know their “PHP Elders“. I hope you will derive as much fun to read my interviews as I’m having by interviewing those #PHPantastic guys.

He starts in with a brief introduction of Matthew before getting into the Q&A. Matthew answers questions about:

  • his own background
  • the "components" that make up Zend Framework
  • their PHP 7.2 compatibility goals
  • the volunteers that work with Zend on maintaining the framework
  • the release process for the framework
  • monolithic frameworks
  • Zend Expressive v3

You can check out all of Matthew's answers to these and more questions in the full post.

tagged: matthewweierophinney interview zend 7php series community zendframework

Link: https://7php.com/making-zf-components-compatible-php7/

Joe Ferguson:
Homestead Welcomes Z-Ray by Zend
Feb 07, 2018 @ 15:41:44

In a post to his site Joe Ferguson, the maintainer on the Laravel Homestead project, has announced a change in the 7.1.0 version: compatibility with Zend's Z-Ray debugging tool.

Since the release of Homestead version 7.1.0 and base box version 5.1.0 Homestead now supports the Zend Z-Ray plugin for PHP 7.2. You can start leveraging the power of Z-Ray in your application with a small changes to your Homestead project.

He includes the instructions to help you upgrade your current installation to this latest versions and the configuration changes required. He also walks through the commands you'll need to use and the resulting output so you can be sure you're on the right track. The end result integrates Z-Ray directly into the site without any additional work.

tagged: laravel homestead zend zray debugging tool install vagrant

Link: https://www.joeferguson.me/homestead-welcomes-z-ray-by-zend/

Rob Allen:
Displaying errors in Expressive with Twig
Oct 19, 2017 @ 17:47:36

Rob Allen has a quick post for the Twig and Zend Expressive users out there showing how to display errors if you're not using the Whoops error handler.

If you're not using the Whoops error handler with Expressive and are using the Twig renderer, then you are given no information about the problem that occurred, even in debug mode.

He includes the Twig template to output the error message and, if the application is in "debug" mode, show an optional block of extra information. This provides details about the exception thrown and some of the previous errors. The previous errors are looped about output to provide more context around the failure.

tagged: error twig zend zendexpressive tutorial output debug

Link: https://akrabat.com/displaying-errors-in-expressive-with-twig/

Alejandro Celaya:
Reusing factories in Zend ServiceManager
Jul 25, 2017 @ 15:03:33

Alejandro Celaya has a new post to his site showing the Zend Framework users out there how you can reuse factories in Zend/ServiceManager. Factories are heavily utilized by the component to create the objects the service returns. Factories tend to be single-use, however, but Alejandro has shown a way around that.

I like zend-servicemanager because it is explicit, and you are always in control of what's done, without loosing flexibility in the process. Since this container expects you to define factories for every service, you usually end up writing, testing and maintaining a lot of factories that doesn't add value to the application.

That's why it is so important to properly reuse factories when possible, not only because you will have to maintain less classes, but because the ServiceManager will instantiate less objects at runtime when it can reuse a factory.

He then talks about ways you can set up shared factories in your application including the use of an abstract factory class or a concrete factory to return other dependencies required. He also shows how to use the ConfigAbstractFactory that allows for the injection of dependencies based on a configuration (similar to the "wiring" in other dependency injection containers). Finally he shows the use of the ReflectionBasedAbstractFactory that handles the injection in about the same way but instead of basing it on a configuration it uses PHP's own reflection to try to determine the class and autoload it into the current system.

tagged: factory zend servicemanager zendframework configuration reflection abstract tutorial

Link: https://blog.alejandrocelaya.com/2017/07/21/reusing-factories-in-zend-servicemanager/

Zend Developer Zone:
June 2017 PHP Community (coffee) Cup of Service winner
Jun 22, 2017 @ 17:29:42

The Zend Developer Zone has announce their "Coffee Cup of Service" winner for the month of June 2017: Sara Golemon.

It is time for the June 2017 PHP Community (coffee) Cup of Service award. This month it goes to someone who has been giving to PHP for more than 15 years, Ms. Sara Golemon.

Sara is a regular speaker at PHP conferences worldwide, an active core contributor, [and] one of the release managers of PHP 7.2.

Please join us here at Rogue Wave in saying thank you to Sara for her more than fifteen years of service to PHP and the PHP community.

This is the second winner of the "Coffee Cup of Service" winner with the first being Michelangelo van Dam himself who the award was inspired by.

tagged: coffeecupofservice winner saragolemon zend roguewave community

Link: https://devzone.zend.com/category/community/

Nikita Popov:
PHP 7 Virtual Machine
Apr 17, 2017 @ 22:42:47

Nikita Popov has a new post to his site sharing a look behind the curtain of how the PHP 7 virtual machine works, the latest version in the Zend Virtual Machine that powers the language.

This article aims to provide an overview of the Zend Virtual Machine, as it is found in PHP 7. This is not a comprehensive description, but I try to cover most of the important parts, as well as some of the finer details.

This description targets PHP version 7.2 (currently in development), but nearly everything also applies to PHP 7.0/7.1. However, the differences to the PHP 5.x series VM are significant and I will generally not bother to draw parallels.

Most of this post will consider things at the level of instruction listings and only a few sections at the end deal with the actual C level implementation of the VM.

He then goes through many different points and piece of functionality in the VM and how they work including:

  • variable types
  • the stack frame layout
  • fetch modes
  • exception handling
  • finally handling
  • generators

There's lots of information here and it's definitely interesting to see what happens inside the language to create the fast and functional PHP 7 applications we have now.

tagged: virtualmachine php7 zend detail behindthescenes example

Link: http://nikic.github.io/2017/04/14/PHP-7-Virtual-machine.html

Community News:
ZendCon 2017 Call for Papers Opens
Mar 03, 2017 @ 19:35:12

Zend has officially announced the opening of the Call for Papers for their 2017 event happening in Las Vegas, Nevada on October 23rd through 26th at the Hard Rock Hotel and Casino.

We’re pleased to announce the ZendCon 2017 Conference, the most anticipated event of the year combining the best of PHP and open source. ZendCon is where community and enterprise developers from around the world gather to share and learn the latest hot trends and technologies in today's professional PHP and open source development.

[We are] now accepting talks on any topic or technology related to PHP, the enterprise web stack, frameworks, security, API design & management, IBM i, DevOps, people & processes, and much more.

The CFP is open until April 14th (11:59pm UTC) and, if your submissions are accepted, you will be provided with a speaker package that includes a conference pass, airfare and hotel nights depending on the type of session you're presenting. You can find out more about the conference and the CFP on the Call for Papers site. Get those submissions in early and often - the deadline will come up sooner than your expect!

tagged: zendcon17 zend conference callforpapers cfp open announcement

Link: http://cfp.zendcon.com


Trending Topics: