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

Zend Framework Blog:
Zend Framework 1 End-of-Life Announcement
Jul 01, 2016 @ 15:52:25

On the Zend Framework blog they've posted the announcement about the end of life for Zend Framework v1, the first version of the popular framework.

With the release of Zend Framework 3, it's time to halt development on Zend Framework 1. As such, we hereby announce that Zend Framework 1 reaches its End of Life (EOL) three months from today, on 28 September 2016.

Between now and then, we will only provide security fixes, if any security reports are made in that time frame. Past that point, we will offer custom bug and security fixes for Zend Framework 1 on-demand only to Enterprise users of Zend Server. [...] Additionally, as of today, access to our legacy subversion server is disabled.

You can still get the latest from the package archive, use Composer for updates. There are also services from Zend that can help you update your application as well as two trainings that can help you learn what you need for the upgrade.

tagged: zendframework zendframework1 endoflife announcement project zend

Link: https://framework.zend.com/blog/2016-06-28-zf1-eol.html

Rob Allen:
Testing my ZF1 app on PHP7
Jun 15, 2015 @ 21:37:57

Rob Allen has a new post to his site showing the results of some testing he did when running a Zend Framework v1 application on PHP 7.

Zend Framework 1 is still actively maintained and we fully intend to ensure that ZF1 works with no problems on PHP 7 when its released. Now that PHP 7.0.0 Alpha 1 has been released, it's time to find out if your Zend Framework 1 app works with it. The easiest way to do this is to use a virtual machine. My preference is Vagrant with Rasmus' PHP7dev box.

He walks through the setup of the virtual machine via a simple Vagrantfile, configuring the latest PHP 7 version, an Nginx server and a basic database. Fortunately, his results turned out quite well with only one issue identified in his application (one with method names the same as class names). You can use this as a a guide to try out your own applications too. Be sure to check the UPGRADING file for a list ot possible breaks to help you track down issues you might be seeing.

tagged: php7 zendframework1 testing application vagrant php7dev

Link: http://akrabat.com/testing-my-zf1-app-on-php7/

Migrating to ZF2:
Integrating Composer and DoctrineORMModule
Nov 14, 2013 @ 18:23:52

Zend Framework v2 has been out for a good while now, but there's still applications out there running on the v1 of the popular framework. Since there was such a fundamental change in structure and functionality between v1 and v2, simply upgrading isn't possible - you have to migrate. Fortunately, there's guides like this one from Chris Strosser that shows you how to get there gradually.

Due to the vast nuances of Zend Framework 2, migrating an application from Zend Framework 1 can be very tedious. To make this process a little less painful, there is a way to slowly implement modules from ZF2 without making the application unusable. The methodology illustrated, which implements DoctrineModule and DoctrineORMModule into a Zend Framework 1 project, can be applied to a variety of ZF2 modules, making it an invaluable technique in the migration process.

Using these two ZF1 modules, they show how to integrate them into a typical ZF2 structure. There's a few steps in the process:

  • Add init_autoloader.php to application root directory
  • Update ZF1′s index.php for Composer compatibility
  • Setup ZF2 configuration files
  • Setup ZF2 "Application" module
  • Relocate existing entities and repositories to ZF2
  • Make ZendMvcApplication available in ZF1

It's not an overly complex process, it just requires the right configuration settings and component placement to get the ZF1 module to cooperate in the world of ZF2.

tagged: zendframework1 zendframework2 module migrate gradual composer

Link: http://webjawns.com/2013/11/migrating-to-zf2-integrating-composer-and-doctrineormmodule/

Systems Architect Blog:
Apache2 vs Nginx for PHP application
Mar 29, 2013 @ 15:41:38

On the Systems Architect blog there's a recent post from Lukasz Kujawa about comparing Apache2 and Nginx for PHP applications, specifically when using the PHP-FPM module. His tests are based on the results from three different application types - a large Zend Framework 1 app, a small PHP script and a WordPress installation.

If you’ve ever been trying to squeeze more out of hardware you must have come across Nginx (engine x). Nginx usually appears in context of PHP-FPM (FastCGI Process Manager) and APC (Alternative PHP Cache). This setup is often pitched to be the ultimate combo for a web server but what that really means? How much faster a PHP application is going to be on a different web server? I had to check it and the answer as often is – that depends.

He ran the tests on an Amazone EC2 instance and optimized the server to ensure that there was a little interference as possible. The used the Zend Optimizer Plus opcode cache and PHP 5.4 and set the logs to go to memory instead of disk. Graphs included in the post show the results of the benchmarking of each application, with the differences (in most cases) not being that wide of a gap.

There isn’t big difference between Apache2 and Nginx in PHP context. Yes, Nginx can be much faster when delivering static content but it won’t speed up PHP execution. Running a PHP script seams to be so CPU challenging task that it completely eclipse any gain from a web server.
tagged: apache2 nginx performance benchmark zendframework1 wordpress native

Link:

Zend Framework Blog:
Zend Framework 1 is Migrating to Git!
Mar 28, 2013 @ 14:29:23

The Zend Framework project has announced a major move for the framework's development - the Zend Framework v1 repositories will be moving from Subversion to Git over the next year or so.

Since its inception, Zend Framework 1 has used Subversion for versioning. However, as we approach its end-of-life (which will occur 12-18 months from the time this post is written), and as our experience with ZF2 processes becomes more familiar, we -- the Zend team and the Community Review team -- feel that we can better support ZF1 via GitHub. As such, we will be migrating the ZF1 Subversion repository to GitHub this week. Please read on for details!

The post details the steps that'll be taken during the process including the changing of the location of the "master" branch (and how to change svn to point to it) and the updates to the integration of the Dojo libraries. They also talk some about the "extras" repository and how things will work with the Issue Tracker and pull requests in the future.

The repository and issues migration is the first step in a series of planned migrations. We also plan to eventually migrate our wiki to GitHub; this will allow us to offload functionality from the main ZF website, and also consolidate all development-related functionality (other than the mailing list) in a central location.
tagged: zendframework1 git migration subversion github

Link:

PHPMaster.com:
Setting Custom Error Messages for Zend_Form_Element
Oct 11, 2012 @ 13:58:37

On PHPMaster.com today there's a new post for all the Zend Framework (v1) users out there. In it, Aurelio De Rosa shows you how to set custom error messages for elements in a Zend_Form.

In this article I’ll show the solution to a common problem which arises when a developer has to create a non-English website or application that is based on the Zend Framework. How do we mark a field of a Zend_Form which is a Zend_Form_Element as invalid, showing one or more custom error messages? The problem is mainly caused by the native counter-intuitive methods of the Zend_Form_Element class which I’ll explain in more details.

He's included a basic example showing the creation of a form and the setup of a text element and some validators to match. He makes a controller and view to handle the output and submission then shows how to use "setErrors" (and "setErrorMessages") of the Zend_Form elements to setup that custom error. This only lets you set one message, though, regardless of the point of failure. To stop things when there's an error, you have to set the "breakChainOnFailure" parameter on the validator to false - then the message will make more sense.

tagged: zendframework1 zendform custom error message element tutorial

Link:


Trending Topics: