From time to time it\’s time to talk together.

I thought that you might want to hear what happend within the last 4 months.
So I will give you the actual state of my work.

Since several months I focus completly on ZF2 development.
This means on the other hand that all new features and changes are instantly available for the next major release and must not be reworked.
When you want to follow me simply watch my github repository:

Actually I worked on fixing several small issues. Those are for example:

I added handling for floats within the Null filter. This has been missing in past.
Zend_Filter_Alnum/Alpha and EmailAdress had public variables. This has changed in favor of accessor methods to provide consistency to the other filters.

Now Zend_Translator can be used in phar libraries.
And auto-routing has been added. The users browser settings are used as routing information.

GreaterThan and LowerThan can now handle equal numbers.
IP can now handle hex, octal and binary noted IP adresses.

Behind the scene I am working on V2. It’s a complete rewrite of all locale classes.

Those are just a few examples.
In sum there are more than 80 issues which have been worked on and fixed since april.

Still much work to do.
Feel free to contact me directly when you think that an issue is missing or should be done first or also when you want to me to write about something in detail in my blog.
For coding help please contact the mailing list.

Thomas Weidner
I18N Team Leader, Zend Framework

Zend Framework Advisory Board Member
Zend Certified Engineer for Zend Framework

Back to top

Using GIT with Zend Studio

Hy fellows,

in one of my last posts I described how to use GIT under Windows.

Now as Zend released Zend Studio 8 and ZF migrates to GIT with the next major release it’s time so see how those can be matched to work together. Note that this is not fixed to Windows but should work regardless of the use OS in any environment.

What do you need to start?

I assume that you already have a working GITHUB repository as described in the last post.
Then you need a installed version of Zend Studio 8 or newer.

Installing GIT
Now you need to make your Zend Studio aware of GIT. Therefor we need to install EGit. EGit is a module for Eclipse which makes Zend Studio (which is based on Eclipse) understand GIT and provides several tools for working with GIT.

  • To install EGit open Zend Studio
  • Click “Help”
  • Click “Install New Software…”
  • Click “Add…”
  • Enter “EGit” as “Name”
  • Enter “” as “Location”
  • Select all modules by clicking “Select all” (you could omit the two moduls only containing “Source” if wished)
  • Click “Next” until you see the license agreements
  • Click “Agree” on all license agreements (of course read the agreements before you agree)
  • At last click “Finish”

Now EGit will be installed within Zend Studio. As last step you will need to restart Zend Studio (if it is not done automatically).

Security preparations

When you already used GIT you will know that it needs RSA keys. So our next step is to make new keys which will be used within Zend Studio to commit to GITHUB.

  • Open Zend Studio
  • Click “Window”
  • Click “Preferences”
  • Expand “General”
  • Expand “Network Connections”
  • Open “SSH2”
  • Go to the tab “Key Management”

Now you can eighter use an existing key or add a new one.

To load an existing key:

  • Click “Load Existing Key…”
  • Within the explorer window go to the directory where you stored the existing key for GITHUB and select it
  • Enter the “Passphrase” when your key needs a passphrase
  • Confirm the “Passphrase” when your key needs a passprase
  • Click “OK”

It is preferred to make a new key instead of loading an existing one. Therefor:

  • Click “Generate RSA Key…”
  • Leave the passphrase empty (this simplifies the later handling)
  • Click “Save Private Key…”
  • Click “OK” to confirm that you want no passphrase
  • Within the explorer window go to the directory where you want to store your keys
  • Click “OK”
  • Click “OK” once more
  • Open GITHUB within your Internet Browser and login to your account
  • Click “Account Settings…”
  • Click “Public SSH Keys…”
  • Click “Add another public key…”
  • Enter “Zend Studio” as Title
  • Copy the public key which you can see within Zend Studio as key into GitHub
  • Click “Add Key…”

At last, regardless is you added an existing or created a new key, click “OK” within Zend Studio to close the preferences window and save the settings. You have successfully prepared Zend Studio to be used with your GitHub account.

Connecting to GitHub

The next step is to connect our GITHUB account to Zend Studio.

  • Open Zend Studio
  • Click “File”
  • Click “Import…”
  • Now expand “GIT”
  • Select “Projects from GIT”
  • Click “Next”
  • Click “Clone…”
  • Open a Internet Browser and login to your GITHUB account
  • Click your ZF2 repository
  • Click”HTTP” (it is near SSH, HTTP…)
  • Copy the link which is shown (should look like “….” into your clipboard
  • Copy the link from your clipboard into “URI” within the opened Zend Studio tab
  • Enter your GITHUB password within “Password”
  • Click “Next”
  • Click “Next” once more to add all branches
  • Enter the directory into “Directory” where you want to store the local repo (this should be an empty/new directory)
  • Click “Finish”

This step will take several minutes as it now copies your remote repository to your local drive.
We’re done. You have successfully connected your GIT repository with Zend Studio.

You can now do your complete work from within Zend Studio. It supports all needed tools. Some of these tasks I will describe now:

Create a new branch

To create a new branch do the following:

  • Right-Click your project
  • Click “Team”
  • And then click “Branch…”
  • Click “New Branch…”
  • Enter the name of the new branch to “Branch Name…”
  • Select “Rebase” (with “None” you will not be able to commit your changes to your GitHub account)
  • Click “Finish”

Now you’re working within a new created branch.
Keep in mind to use the proper naming convention.
“hotfix/ZFxxxx” for quick fixes and “feature/XXXX” for new features. Always use “ZFxxxx” when there is a related issue within Jira.

Committing changes

Committing your changes is also quite simple:

  • Right-Click your project
  • Click “Team”
  • Click “Commit”
  • Enter a note about what you’re committing within “Commit Message…”

I always use notes like this:

 - changed something
 - another change
  • Select the files which you want to commit
  • Click “Finish”

Now your change is stored in your local repository. To send your changes to your GITHUB repository you need to do the following:

  • Right-Click your project
  • Click “Team”
  • Click “Push to Upstream”
  • Click “OK”

At last your changes are also available within your GITHUB repository.
To have your change integrated within ZF2 you need to make a “Pull-Request” from your GITHUB repository.

The above description does not only work for Zend Framework but can also be used for other projects.
I hope you find this post interesting so I wish you a good work and have fun with GIT.

Thomas Weidner
I18N Team Leader, Zend Framework

Zend Framework Advisory Board Member
Zend Certified Engineer for Zend Framework

Back to top

Zend_Locale 2.0

Hy fellows,

first I want to wish you all a good start into this new decade.
Then I wanted to inform you about some news for Zend Framework.

Within the last days I began a complete rework of the I18n core for ZF.
The first class which will be reworked is Zend_Locale as it’s the base class for I18n within ZF.

The following changes will be done for Zend Locale 2.0:

CLDR update to 1.9
This integrates the most actual locale database within ZF

Usage of a fallback locale
This locale can be set and used as fallback when the wished locale is not supported

Usage of a fixed locale
This locale can be set and will be used regardless of any other locale which the accessing user wants
This removes the workaround from Zend_Application

Add locale providers as base
This allows to use other locale providers than CLDR
This will remove Zend_Locale_Format and integrate it into the used provider

Rework CLDR to be a provider

Add INTL as new provider
This allows to use INTL when available alone or in combination with CLDR because the INTL extension does not provide all informations like CLDR

Add a way to upgrade a locale
This would allow to provide informations for language locales when no region was given (f.e. when a user gives ‘en’ and wants to have informations from a region (f.e. currency))

Add script support
This allows to use locales which provide several scripts within the same language like Azerbaijani, English or Hausa.

That’s the actual plan for Zend_Locale 2.0 and will be the base for all other reworks.
Please note that all spoken will be done within Zend Framework 2.0 and not be migrated to 1.x.

Thomas Weidner
I18N Team Leader, Zend Framework

Zend Framework Advisory Board Member
Zend Certified Engineer for Zend Framework

Back to top