[fw-general] Expressive 1.0.0 STABLE Released!

2016-01-28 Thread Matthew Weier O'Phinney
The Zend Framework team is pleased to announce the immediate availability of 
Expressive 1.0.0:


- http://framework.zend.com/blog/2016-01-28-expressive-1.0-stable.html


Expressive is a PSR-7 middleware microframework which can be used to build web 
applications or APIs of any size. We are positioning it as the cornerstone of 
the ZF3 initiative, which makes this an important milestone!


You can learn more about Expressive on its dedicated documentation site:


- https://zendframework.github.io/zend-expressive/

Expressive<https://zendframework.github.io/zend-expressive/>
zendframework.github.io
zend-expressive: PSR-7 Middleware Microframework






--

Matthew Weier O'Phinney

Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc


[fw-general] Bi-weekly ZF3 status update

2015-12-22 Thread Matthew Weier O'Phinney
I've just posted the ZF3 bi-weekly status update for this week:

- http://framework.zend.com/blog/2015-12-22-zf3-biweekly-update.html

Highlights include:

- 45 pull requests merged
- 14 component releases
- 5 more components refactored for the zend-servicemanager and
zend-eventmanager v3 changes
- a new release candidate of Expressive

Read the post for full details!

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Bi-weekly Status Report

2015-12-10 Thread Matthew Weier O'Phinney
We've just posted our bi-weekly status report on the ZF blog:

- http://framework.zend.com/blog/2015-12-10-zf3-biweekly-update.html

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 3 Status Update

2015-11-25 Thread Matthew Weier O'Phinney
Hey, all —

This is long overdue, but hopefully welcome:

- http://framework.zend.com/blog/zend-framework-3-update-and-roadmap.html

Warning: it's a long read. Make a warm beverage and a snack before you start!

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.17 and 2.4.9 Released!

2015-11-23 Thread Matthew Weier O'Phinney
We're pleased to announce the immediate availability of:

- Zend Framework 1.12.17
- Zend Framework 2.4.9

Each are available to download via:

- http://framework.zend.com/downloads/latest

If you are using Composer, you can update to the latest version using:

- composer update

These releases provide patches for 2 security vulnerabilities:

- ZF2015-09 is an announcement of a security hardening patch for
Zend_Captcha/Zend\Captcha's word-based CAPTCHA adapters. The patch is
available in Zend Framework 1.12.7, Zend Framework 2.4.9, and
zendframework/zend-captcha 2.4.9 and 2.5.2.

- ZF2015-10 details an information disclosure vulnerability in
Zend\Crypt\PublicKey\Rsa due to insecure padding defaults in OpenSSL
and PHP when using RSA keys. A patch is available in Zend Framework
2.4.9 and zendframework/zend-crypt 2.4.9 and 2.5.2.

If you use word-based CAPTCHA adapters or Zend\Crypt\PublicKey\Rsa, we
advise you to upgrade immediately.

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.14, 2.4.6, and 2.5.2 Released!

2015-08-03 Thread Matthew Weier O'Phinney
We've just released each of:

- Zend Framework 1.12.14
- Zend Framework 2.4.6
- Zend Framework 2.5.2

These releases contain a security patch for a critical vulnerability
when processing XML documents under a PHP-FPM environment; if you are
doing so, we recommend upgrading immediately.

Full release announcement is on the ZF site: http://bit.li/zf2015-06

Security advisory is here: http://framework.zend.com/security/advisory/ZF2015-06

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.13 Released!

2015-05-20 Thread Matthew Weier O'Phinney
We've just released Zend Framework 1.12.13!

- http://framework.zend.com/downloads/latest#ZF1

This release contains a fix for a regression introduced when patching
the message splitting vulnerability (ZF2015-04 - see
http://framework.zend.com/security/advisory/ZF2015-04) in version
1.12.12; the patch was too strict, and did not allow integers or
floats for header values, breaking headers such as Content-Length.
Version 1.12.13 fixes these situations specifically, ensuring both the
security model introduced in 1.12.12 while providing leniency for
these safe values.

If you use Zend_Http, or a component that depends on it (Zend_OpenId,
Zend_Oauth, the Zend_Service components, Zend_XmlRpc, etc.), we highly
recommend upgrading immediately.

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.12 Released!

2015-05-19 Thread Matthew Weier O'Phinney
We've just released Zend Framework 1.12.12!

Grab it here:

- http://framework.zend.com/downloads/latest#ZF1

This release contains a patch for the security advisory already
reported as ZF2015-04:

- http://framework.zend.com/security/advisory/ZF2015-04

If you are using Zend_Mail or Zend_Http, we strongly urge you to
upgrade. If you cannot at this time, we also supply a patch you can
apply against your ZF installation:

- 
https://packages.zendframework.com/releases/ZendFramework-1.12.12/0001-ZF2015-04-Fix-CRLF-injections-in-HTTP-and-Mail.patch

For the full release announcement, visit our blog:

- http://framework.zend.com/blog/zend-framework-1-12-12-released.html

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.3.8 and 2.4.1 Released!

2015-05-07 Thread Matthew Weier O'Phinney
We're pleased to announce the immediate availability of Zend Framework
versions 2.3.8 and 2.4.1:

- http://framework.zend.com/downloads/latest

These versions include an important security fix for potential CRLF
Injection Attacks in Zend\Mail and Zend\Http:

- http://framework.zend.com/security/advisory/ZF2015-04

If you use either of those components, or the MVC, we recommend
upgrading immediately.

Zend Framework 2.4.1 also includes several important fixes for
backwards compatibility breaks introduced in version 2.4.0; you can
read more about those fixes in the release announcement:

- http://framework.zend.com/blog/zend-framework-2-3-8-and-2-4-1-released.html

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.3.6 Released

2015-03-12 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate availability
of Zend Framework 2.3.6

You can download it from:

- http://framework.zend.com/downloads/latest

One new security advisory has been made:

- ZF2015-03, which patches Zend\Validator\Csrf to ensure proper identification
  of null and malformed token identifiers.

For more information:

- http://framework.zend.com/security/advisory/ZF2015-03

If you use Zend\Validator\Csrf, either standalone or with Zend\InputFilter or
Zend\Form\Element\Csrf, with the 2.3 series of Zend Framework, please upgrade
immediately.

Support Zend Framework!
---

Sitepoint is currently running a Best PHP Framework 2015 Survey; we kindly ask
that you help represent the Zend Framework community in the survey, and show
your support!

- http://www.sitepoint.com/best-php-framework-2015-survey/

Milestones
--

We are currently actively finishing the final features for Zend Framework 2.4,
and plan a release candidate for next week (week of 17 March 2015). Once 2.4
stable is released, we turn towards Zend Framework 3 tasks, as outlined in the
Zend Framework 3 roadmap:

- http://framework.zend.com/blog/announcing-the-zend-framework-3-roadmap.html

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.3.7 Released

2015-03-12 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate availability
of Zend Framework 2.3.7

- http://framework.zend.com/downloads/latest

Fixes
-

Zend Framework 2.3.6 released a change against
Zend\Mvc\Controller\AbstractRestfulController that was originally intended for
the upcoming 2.4.0 release, and which introduces a slight backwards
compatibility (BC) break. 2.3.7 reverts the change to keep BC in the 2.3 series.

Support Zend Framework!
---

Sitepoint is currently running a Best PHP Framework 2015 Survey; we kindly ask
that you help represent the Zend Framework community in the survey, and show
your support!

- http://www.sitepoint.com/best-php-framework-2015-survey/

Milestones
--

We are currently actively finishing the final features for Zend Framework 2.4,
and plan a release candidate for next week (week of 17 March 2015). Once 2.4
stable is released, we turn towards Zend Framework 3 tasks, as outlined in the
Zend Framework 3 roadmap.

- http://framework.zend.com/blog/announcing-the-zend-framework-3-roadmap.html

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.2.10 and 2.3.5 Released!

2015-02-18 Thread Matthew Weier O'Phinney
We've just released Zend Framework versions 2.2.10 and 2.3.5:

- http://framework.zend.com/downloads/latest

These versions contain a security fix for the PostgreSQL Zend\Db
adapter; if you are using PostgreSQL with ZF2, we recommend upgrading
immediately.

For more information on the releases:

- Blog post: http://bit.ly/1A74DLE
- Security announcement: http://framework.zend.com/security/advisory/ZF2015-02
- Changelog: http://framework.zend.com/changelog/2.3.5 and
http://framework.zend.com/changelog/2.2.10

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Announcing the Zend Framework 3 Roadmap

2015-01-22 Thread Matthew Weier O'Phinney
The Zend Framework team has announced a high-level overview of their
plans for Zend Framework 3 today.

- http://bit.ly/zf3-roadmap

The plans include:

- Separating components into individual, versioned projects.
- Updating the existing full-stack MVC framework to depend on the newly
  independent components for better reuse and simplicity. ZF2 MVC
  applications will have a documented upgrade path to ZF3 requiring
  minimal changes.
- Embracing middleware runtime patterns as a lighter weight
  alternative to the enterprise MVC framework stack.
- Enabling Apigility to work as a middleware stack, for better
  performance and simplicity, with the same streamlined, powerful user
  experience.
- Optimizing for PHP 7, but supporting PHP 5.5 onwards.

Read the full announcement for more details, and keep an eye on the Zend
Framework blog for future posts that dive into technical details.

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.10, 2.2.9, and 2.3.4 Released!

2015-01-14 Thread Matthew Weier O'Phinney
Greetings, all, and happy new year!

We've released three new versions of Zend Framework today:

- 1.12.10, which is a scheduled maintenance release.
- 2.2.9, which is a security release, addressing ZF2015-01
- 2.3.4, which is both a maintenance release, and a security release
(also ZF2015-01)

You can download them from:

- http://framework.zend.com/downloads/latest

and you can visit the changelogs at:

- http://framework.zend.com/changelog/1.12.10
- http://framework.zend.com/changelog/2.2.9
- http://framework.zend.com/changelog/2.3.4

The security issue patched with 2.2.9 and 2.3.4 is ZF2015-01:

- http://framework.zend.com/security/advisory/ZF2015-01

The advisory is for users of Zend\Session's validators; prior to these
releases, validator metadata was not being properly persisted to the
session, which meant it was being re-initialized on every request,
making every request valid. If you use this feature, we recommend
upgrading immediately.

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.9, 2.2.8, and 2.3.3 Released!

2014-09-17 Thread Matthew Weier O'Phinney
We have just released the following Zend Framework versions:

- 1.12.9
- 2.2.8
- 2.3.3

These are security releases. The relevant advisories are:

- http://framework.zend.com/security/advisory/ZF2014-05 - Anonymous
authentication in ldap_bind() function of PHP, using null byte
- http://framework.zend.com/security/advisory/ZF2014-06 - SQL
injection vector when manually quoting values for sqlsrv extension,
using null byte

If you use the LDAP extension or the sqlsrv extension, we recommend
upgrading immediately.

For more details on the release:

- 
http://framework.zend.com/blog/zend-framework-1-12-9-2-2-8-and-2-3-3-released.html

-- 
Matthew Weier O'Phinney
Principal Engineer
Project Lead, Zend Framework and Apigility
matt...@zend.com
http://framework.zend.com
http://apigility.org
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.8 Released!

2014-08-26 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate
availability of Zend Framework 1.12.8!

- http://framework.zend.com/downloads/latest#ZF1

This is a maintenance release.

Notable Changes
---

- #360 updates Zend_Locale to use CLDR version 25.
- #98 allows editing and flattening of text form fields within PDF
  documents.
- #375 implements Zend_Pdf::setJavascript(), Zend_Pdf::addJavascript()
  and Zend_Pdf::resetJavaScript().
- #414 adds the Microsoft_Console component from the Windows Azure SDK
  for PHP into the Zend_Service_Console component, ensuring that
  WindowsAzure command line functionality included in the framework
  can now work.
- #385 adds support for DateTime fractional seconds under PHP 5.6+.
- #382 ensures that orphaned metadata cache files are removed when
  Zend_Cache::CLEANING_MODE_ALL is used.
- #410 ensures that calls to reset the status of the libxml entity
  loader happen as soon as possible, to prevent potential threading
  issues under php-fpm (since the settings are per process, not
  per-request, in that environment).

See the changelog for full details:

- http://framework.zend.com/changelog/1.12.8

As always, I'd like to thank the many contributors who made this release
possible!

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.3.2 Released!

2014-08-12 Thread Matthew Weier O'Phinney
We've just released Zend Framework 2.3.2!

- http://framework.zend.com/downloads/latest

It includes more than 100 resolved issues, including important fixes
for supporting DB2 and IBM i.

Please be sure to read the full release announcement and changelog:

- http://bit.ly/zf-2-3-2 (release announcement)
- http://framework.zend.com/changelog/2.3.2

Enjoy, and many thanks to all the contributors who have helped make
the release possible!

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Apigility - ongoing support development ?

2014-07-28 Thread Matthew Weier O'Phinney
On Mon, Jul 28, 2014 at 9:25 AM, Brian Gallagher
gallagher.br...@gmail.com wrote:
 I'm starting a new project which will be API centric. I've a fair amount of
 experience with ZF2 so I'm currently toying with using Apigility.

 However as the project is still quite young, I do worry that ongoing
 development might wane or cease.

 What has uptake been like? What is Zend's commitment to the project?

Uptake has been steady, and reaching  10k downloads per month (and
we've seen a 33% increase in the past 2-3 weeks!). Right now, my team
is focused almost entirely on Apiglity, both in terms of stabilizing
it as well as shepherding new features; our ZF2 schedule has been
greatly reduced, and we're leaning primarily on community help for
maintenance, while pushing in fixes and features as needed based on
Apigility issues that are based upstream.

Zend is quite committed to Apigility, as it helps promote its mission
of enabling mobile-centric, cloud-enabled applications; APIs are a
natural fit for that, and Apigility promotes best practices,
particularly around building API-First projects.

You'll be seeing Apigility around for quite some time!


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Apigility - ongoing support development ?

2014-07-28 Thread Matthew Weier O'Phinney
On Mon, Jul 28, 2014 at 4:36 PM, Brian Gallagher
gallagher.br...@gmail.com wrote:
 Thanks for the reply.Thats all really very encouraging!

 After spending a few hours today with doing the tutorials and reading
 document, I'm really impressed.

 What features are on the roadmap? One of the strengths of ZF2, IMO, are the
 third party modules, do you envision a similar ecosystem for apigility?

The current 1.1 roadmap includes:

- Doctrine-Connected services (zf-apigility-doctrine already exists,
but a contributor is working on integration with the admin UI)
- DB Autodiscovery (essentially point at a database, and this finds
all tables, let's you choose which to expose, and does validations
based on the column types -- DB-Connected on steroids, essentially)
- HTTP Caching
- Mongo-Connected (but only if we can do autodiscovery for it as well)

In terms of modules, Apigility is itself created from modules, and any
new features we create will be done as modules. The goal is to make it
possible to re-use the modules within ZF2 applications. I'm hoping we
have very few Apigility-specific modules, TBH, but rather
general-purpose modules that we expose in Apigility, but which can
also be mixed into existing ZF2 applications to provide features.

Undoubtedly, there will be some modules that target functionality
specific to the modules that make up Apigility -- e.g., to provide
alternative authentication or authorization. However, even there, they
are building on modules, and could be picked up in a general ZF2
application.

So... same ecosystem. :)


 On Mon, Jul 28, 2014 at 5:46 PM, Matthew Weier O'Phinney matt...@zend.com
 wrote:

 On Mon, Jul 28, 2014 at 9:25 AM, Brian Gallagher
 gallagher.br...@gmail.com wrote:
  I'm starting a new project which will be API centric. I've a fair amount
  of
  experience with ZF2 so I'm currently toying with using Apigility.
 
  However as the project is still quite young, I do worry that ongoing
  development might wane or cease.
 
  What has uptake been like? What is Zend's commitment to the project?

 Uptake has been steady, and reaching  10k downloads per month (and
 we've seen a 33% increase in the past 2-3 weeks!). Right now, my team
 is focused almost entirely on Apiglity, both in terms of stabilizing
 it as well as shepherding new features; our ZF2 schedule has been
 greatly reduced, and we're leaning primarily on community help for
 maintenance, while pushing in fixes and features as needed based on
 Apigility issues that are based upstream.

 Zend is quite committed to Apigility, as it helps promote its mission
 of enabling mobile-centric, cloud-enabled applications; APIs are a
 natural fit for that, and Apigility promotes best practices,
 particularly around building API-First projects.

 You'll be seeing Apigility around for quite some time!


 --
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





 --
  Brian

  tel: +353 (0)864008052
  email: gallagher.br...@gmail.com
  skype: gallagherbrian



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.7 Released!

2014-06-12 Thread Matthew Weier O'Phinney
We've just released version 1.12.7, which contains an important
security fix for potential SQLi vulnerabilities in
Zend_Db_Select::order().

You can download Zend Framework 1.12.7 from the website:

- http://framework.zend.com/download/latest#ZF1

For more information on the release:

- http://framework.zend.com/blog/zend-framework-1-12-7-released.html

and on the security fix:

- http://framework.zend.com/security/advisory/ZF2014-04

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Apigility 1.0.0-beta3 Released!

2014-04-30 Thread Matthew Weier O'Phinney
We've just pushed out Apigility 1.0 Beta 3! You can grab it here:

- http://apigility.org/download

We expect this to be the last beta release before going stable; most
changes were around stabilizing existing functionality and ensuring
reported user needs were met (including the ability to delete all
class files related to a service and/or API module, and the ability to
merge all previously set response headers when emitting a problem
response).

For more information, you can read the release announcement:

- http://bit.ly/ag-1-beta3

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.6, 2.2.7, and 2.3.1 Released!

2014-04-15 Thread Matthew Weier O'Phinney
We've just pushed out several new releases:

- Zend Framework 1.12.6: This fixes a BC break with regards to a
number of Locales that was introduced in 1.12.4; you can read about it
at http://bit.ly/zf-1-12-6

- Zend Framework 2.2.7 and Zend Framework 2.3.1: These fix a security
issue reported at
http://framework.zend.com/security/advisory/ZF2014-03 - a potential
XSS vulnerability in a number of ZF2 view helpers. Additionally, ZF
2.3.1 contains more than 80 bugfixes; you can read about these
releases at http://bit.ly/zf-2-3-1

If you are using ZF2, and specifically view helpers, we highly
recommend upgrading to either 2.2.7 or 2.3.1 ASAP.

Packages are available via composer, pyrus, or
http://framework.zend.com/downloads/latest

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Apigility 1.0.0 BETA 1 Released!

2014-03-24 Thread Matthew Weier O'Phinney
We are pleased to announce the immediate availability of Apigility 1.0.0beta1!

- http://apigility.org/download

This is our first beta release of Apigility, marking its initial API
stability, and providing a solid preview of what to expect for the
first stable release.

What is Apigility?
--

Apigility is the world's easiest way to create and provide secure,
well-formed APIs.

Apigility provides tools for describing and documenting your APIs,
both RESTful and RPC. You can indicate the URL that provides a
service, what HTTP methods are allowed, what representations (e.g.,
JSON, HTML, XML) can be provided, how many items to present per page
of a collection, and more.

We make choices so you don't have to. We have standardized on JSON for
RPC services, and Hypermedia Application Language (HAL), using the
JSON variant, for REST services. We provide robust error handling,
using Problem Details for HTTP APIs (API Problem). HTTP method
negotiation and content negotiation are built in, ensuring that
problems are reported early and provide detail on how to submit
correct requests.

You can document what fields can be submitted, and configure how those
fields will be validated. You can indicate what services require an
authenticated user - or even restrict usage based on the HTTP method!
You can configure how users can authenticate, and we provide HTTP
Basic, HTTP Digest, and OAuth2 authentication out-of-the-box.

An API is only as useful as its documentation. Apigility lets you
document every service, every HTTP method, and even differentiate
between collections and entities. We provide both HTML and JSON
documentation by default, and have a separate Swagger UI
implementation you can opt-in to if desired. Alternately, you can
write your own module for exporting the documentation in your own
custom format - we hope to provide both API Blueprint and RAML in the
future!

You can use the full Apigility skeleton to create APIs, and the Admin
UI for manipulating them. Alternately, you can opt-in to just the
modules you are interested in, and configure them by hand for optimal
control over how they all work and interact.

In short, Apigility is the most powerful tool you can use for creating
robust APIs.

Apigility is proudly powered by Zend Framework 2; give it a try today!

- http://apigility.org/


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Proposal refactoring ZendQueue

2014-03-19 Thread Matthew Weier O'Phinney
Can you post this to the zf-contributors list, please? That's where we
generally discuss the development of ZF and/or its components itself.

Thanks!

On Tue, Mar 18, 2014 at 5:41 PM, Gianluca Arbezzano gianar...@gmail.com wrote:
 Hi! Over the last few months we worked on
 ZendQueuehttps://github.com/ripaclub/ZendQueue component
 refactoring.

 Inspired by the original RFC (
 http://webcache.googleusercontent.com/search?q=cache:yoyvW8ZtPOoJ:framework.zend.com/wiki/display/ZFDEV2/RFC%2B-%2BZend%2BQueue%2BRefactoring+cd=1hl=itct=clnkgl=it
 http://webcache.googleusercontent.com/search?q=cache:yoyvW8ZtPOoJ:framework.zend.com/wiki/display/ZFDEV2/RFC%2B-%2BZend%2BQueue%2BRefactoring+cd=1hl=itct=clnkgl=it)
 and some new ideas about component usages, we made a not backward
 compatible refactor of https://github.com/zendframework/ZendQueue (never
 officially release and in a bad state yet).

 Reconsidering adapters choice we removed some old adapters (like Memcacheq
 and PlatformJobQueue, also we introduced two MongoDB-based adapters, with
 particular regard to Mongo's capped collection approach for creating a
 simple message queue (http://shtylman.com/post/the-tail-of-mongodb/ ).

 He following adapters are implemented and tested:

- ArrayAdapter (mock/testing)
- Db (with table and row gateways)
- MongoCappedCollection (supports just one queue per collection)
- MongoCollection (supports just one queue per collection)
- Null (used to disable a queue and testing)


 The following new features are introduced and tested:

- Send / Receive parameters
- Adapter Capabilities Interfaces
- Real await (MongoCappedCollection) and emulated await
- QueueOptions, factories and service factories etc etc..

 We'd like your opinion, also we'd like to know if our implementation is
 acceptable for the official
 repositoryhttps://github.com/zendframework/ZendQueue otherwise
 we've to found a way to make it a stable repository (because we're using
 already it in various projects, maybe using another namespace instead of
 ZendQueue).

 Thanks by
 https://github.com/orgs/ripaclub/members

 --
 Gianluca Arbezzano
 www.gianarb.it



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.3.0 Released!

2014-03-12 Thread Matthew Weier O'Phinney
Zend Framework 2.3.0 has just released!

10 months in the making,  230 pull requests, 560 contributors... Nice
work, everyone!

The release aims to be backwards compatible with previous releases,
and provides a slough of new features and incremental improvements.
One important note, however: 2.3.0 is the first ZF2 version upping the
minimum supported PHP version to 5.3.23.

For the full release announcement:

- http://bit.ly/zf-2-3-0

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Almost ready for 2.3.0!

2014-03-12 Thread Matthew Weier O'Phinney
On Wed, Mar 12, 2014 at 10:07 AM, Ralf Eggert r.egg...@travello.de wrote:
 I found another one:

   use Zend\I18n\Translator\Translator;

   AbstractValidator::setDefaultTranslator(
 Translator::factory($this-config['translations']['validator'])
   );

 Does not work, since AbstractValidator::setDefaultTranslator() expects
 the implementation of the Zend\Validator\Translator\TranslatorInterface
 which is only implemented by Zend\Mvc\I18n\Translator.

 Is this intended to pass the MvcTranslator instance from the
 Service-Manager and add the translation texts to it rather than having a
 special translator instance for validator messages?

Actually, this has been true since *2.2.0*! In that release, we
modified the Validator component to define its own
TranslatorInterface. Zend\Mvc\I18n\Translator was introduced at that
time as well, and, at the time, extended
Zend\I18n\Translator\Translator and implemented the validator's
TranslatorInterface. The MVC translator would be what you would need
to pass to validators to enable translation.

As such, the above example would not have worked at any time in the 2.2 series.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Almost ready for 2.3.0!

2014-03-11 Thread Matthew Weier O'Phinney
On Tue, Mar 11, 2014 at 3:29 AM, Norbert Máté mt.norb...@gmail.com wrote:
 Hi all,
I think I also found one:
 https://github.com/zendframework/zf2/issues/5942

Yes -- this is the same as Ralf was reporting earlier in the thread as
well. We'll make sure this gets dealt with prior to tagging.

Thanks for all the testing, everybody!


 On 11 March 2014 08:56, Artur Bodera abod...@gmail.com wrote:

 Matt - I'm also wondering if we could tag ZFTool as 1.0 (ideally after we
 pull
 in #66 https://github.com/zendframework/ZFTool/pull/66 which refactors
 against ZendDiagnostics which is now at 1.0).

 It would go nicely with 2.3 :-)


 --
 abod...@gmail.com
 +48 695 600 936
 http://thinkscape.pro


 On Tue, Mar 11, 2014 at 7:54 AM, Artur Bodera abod...@gmail.com wrote:

  On Mon, Mar 10, 2014 at 9:24 PM, Matthew Weier O'Phinney 
 matt...@zend.com
   wrote:
 
  Thanks in advance, and here's hoping to a smooth 2.3.0 rollout!
 
 
  Two minor ones:
 
  I've found a possible regression in
  https://github.com/zendframework/zf2/pull/5720
 
  And found a bug in named value params in console routing, will send a PR
  today.
 
 
 
  --
  abod...@gmail.com
  +48 695 600 936
  http://thinkscape.pro
 
 
 




-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] [ZF2] Abstract Factory Configuration Problem - Possible Infinite Loop Bug

2014-03-11 Thread Matthew Weier O'Phinney
On Tue, Mar 11, 2014 at 1:07 AM, Jamie Krasnoo jkras...@gmail.com wrote:
 I'm just learning about ZF2 and need to make sure I'm using the service
 manager abstract factory configuration in application.config.php correctly
 before I start jumping up and down and pointing out a bug.

 I'm using the Zend Skeletion Application as a base. In the
 application.config.php file on the bottom is a config stub for the service
 manager with the explanation that it will be the initial configuration to
 seed the ServiceManager. I took this as a place things here so you don't
 have to repeat it in modules. Is this correct?

 So what I did is move the base abstract factory configuration from
 Application's module config over to application.config.php. As soon as this
 was done and I tested it. I started getting out of memory errors from PHP. I
 went in to php.ini and changed the memory from 128M to 256M and tested
 again. It still used up the memory.

 To try and trace the stack and see what's going on I installed xdebug and
 set it up. I kept on running in to max nesting level errors. Hence the
 thought that there is an infinite loop when abstract factories are placed in
 application.config.php. Take it out and put that configuration back in to
 module.config.php and the problem stops.

 I attached my log configuration for your viewing pleasure just in case that
 is the problem and I did something wrong there.


Please report this via the issue tracker:
https://github.com/zendframework/zf2/issues

Thanks!



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Almost ready for 2.3.0!

2014-03-11 Thread Matthew Weier O'Phinney
On Tue, Mar 11, 2014 at 9:38 AM, Matthew Weier O'Phinney
matt...@zend.com wrote:
 On Tue, Mar 11, 2014 at 3:29 AM, Norbert Máté mt.norb...@gmail.com wrote:
 Hi all,
I think I also found one:
 https://github.com/zendframework/zf2/issues/5942

 Yes -- this is the same as Ralf was reporting earlier in the thread as
 well. We'll make sure this gets dealt with prior to tagging.


This is now addressed -- Norbert and Ralf -- can you each test again for me? :)


 On 11 March 2014 08:56, Artur Bodera abod...@gmail.com wrote:

 Matt - I'm also wondering if we could tag ZFTool as 1.0 (ideally after we
 pull
 in #66 https://github.com/zendframework/ZFTool/pull/66 which refactors
 against ZendDiagnostics which is now at 1.0).

 It would go nicely with 2.3 :-)


 --
 abod...@gmail.com
 +48 695 600 936
 http://thinkscape.pro


 On Tue, Mar 11, 2014 at 7:54 AM, Artur Bodera abod...@gmail.com wrote:

  On Mon, Mar 10, 2014 at 9:24 PM, Matthew Weier O'Phinney 
 matt...@zend.com
   wrote:
 
  Thanks in advance, and here's hoping to a smooth 2.3.0 rollout!
 
 
  Two minor ones:
 
  I've found a possible regression in
  https://github.com/zendframework/zf2/pull/5720
 
  And found a bug in named value params in console routing, will send a PR
  today.
 
 
 
  --
  abod...@gmail.com
  +48 695 600 936
  http://thinkscape.pro
 
 
 




 --
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Almost ready for 2.3.0!

2014-03-11 Thread Matthew Weier O'Phinney
On Tue, Mar 11, 2014 at 1:54 AM, Artur Bodera abod...@gmail.com wrote:
 On Mon, Mar 10, 2014 at 9:24 PM, Matthew Weier O'Phinney
 matt...@zend.comwrote:

 Thanks in advance, and here's hoping to a smooth 2.3.0 rollout!


 Two minor ones:

 I've found a possible regression in
 https://github.com/zendframework/zf2/pull/5720

Looks like this was just a bad test; I've merged the corrected tests
now to develop.


 And found a bug in named value params in console routing, will send a PR
 today.

Waiting... :)


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




RE: [fw-general] Almost ready for 2.3.0!

2014-03-11 Thread Matthew Weier O'Phinney
On Mar 11, 2014 12:47 PM, Demian Katz demian.k...@villanova.edu wrote:

  We're down to the last few pull requests and issues before we're ready
  to tag 2.3.0. If you can, I'd really appreciate it if you'd test your
  apps against the develop branch of ZF2 (dev-develop or ~2.3-dev if
  you use composer), and let us know ASAP if you see any show stoppers.
 
  Thanks in advance, and here's hoping to a smooth 2.3.0 rollout!

 I promise I'm not trying to create another PHP version number debate --
just reporting my results. I'm running the current LTS version of Ubuntu
and using standard packages -- I imagine that's a fairly common situation.
I tried to install 2.3 on my test server to see how my application would
behave, and Composer refused because my PHP version is too old. This
surprised me since discussions about version requirement changes suggested
that the framework was keeping to a fairly conservative course -- I must
have missed something.

 Anyway, please let me know if I'm mistaken about requirements or if the
base version was bumped higher than intended... and again, I'm not trying
to stir up old battles. Just facing the reality that, while I am eager to
take advantage of new PHP language features, and I'm willing to step
outside of standard packages for my own personal use, I'm also managing a
project that is used by many institutions with conservative server policies
who simply aren't going to move past PHP 5.3.3 for some time... so I'm
probably going to have to stick with ZF 2.2.x for the moment.

We discussed this some months back, actually (in November):

-
http://zend-framework-community.634137.n4.nabble.com/Query-Should-ZF2-bump-the-minimum-required-PHP-version-td4661158.html#a4661236

The decision I ended up making was to bump to 5.3.23 STARTING WITH 2.3.0,
for a variety of compelling reasons:

- 5.3.9+ have fixes that allow a class to implement multiple interfaces
that define the same method, so long as the signatures are the same.
Without this functionality, having separated interfaces is impossible, and
we have increasingly found that, in the name of proper compartmentalization
and segregation of components, this needs to be done. For a concrete
example, it allows us to have separate TranslatorInterface definitions in
different components, but a single implementation for the MVC that
satisfies all of them.

- 5.3.23 contains a bugfix for ArrayObject that fixes a number of
dereferencing issues we've observed particularly in Zend\Session - stuff
that we simply cannot fix in userland.

- Zend Server is providing LTS support for PHP 5.3, and is already at
5.3.26+ at this point, giving people on legacy distributions the ability to
upgrade to a newer PHP 5.3 version if they need to update to ZF 2.3+.

As reported in the email thread above, we have plenty of precedence for
upping the minimum supported PHP version in ZF; we've done so 3 separate
times in ZF1 alone at this point. We try to do it only at minor version
bumps (not maintenance releases), and only when it solves maintenance
issues that are too difficult or brittle for us to fix in userland.

I hope that answers your questions! I realize that the change will not be
welcome by everyone, but the rationale for the change is solid.


RE: [fw-general] Almost ready for 2.3.0!

2014-03-11 Thread Matthew Weier O'Phinney
On Mar 11, 2014 2:22 PM, Demian Katz demian.k...@villanova.edu wrote:

  I hope that answers your questions! I realize that the change will not
be
  welcome by everyone, but the rationale for the change is solid.

 This is reasonable, and we certainly have to move forward sooner or later
-- but for now I won't be able to, so put me on the list of people hoping
for continued support of 2.2.x for the foreseeable future. I assume that
was probably on your agenda anyway, though! :-)

Only security fixes, and only until 2.4.0 is released (which will likely be
Q3 or Q4 of this year).


Re: [fw-general] Almost ready for 2.3.0!

2014-03-11 Thread Matthew Weier O'Phinney
On Mar 11, 2014 4:08 PM, Ralf Eggert r.egg...@travello.de wrote:
 Matthew Weier O'Phinney schrieb am 11.03.2014 18:45:
  This is now addressed -- Norbert and Ralf -- can you each test again
for me? :)

 I get this message:

   Fatal error: Call to undefined method Zend\Mvc
   \I18n\Translator::factory() in /home/devhost/v3.travello.com/vendor
   /RalfEggert/travello-library/src/TravelloLib/Mvc/Router
   /TranslatorFactory.php on line 39

 for this code

   use Zend\Mvc\I18n\Translator;

   $translator = Translator::factory($config['router']['translator']);

 Zend\Mvc\I18n\Translator used to extend Zend\I18n\Translator\Translator
 in 2.2.x and now it implements Zend\I18n\Translator\TranslatorInterface
 and does not implement a factory method any more.

 I solved this issue like this:

   use Zend\I18n\Translator\Translator as I18nTranslator;
   use Zend\Mvc\I18n\Translator as MvcTranslator;

   $translator = new MvcTranslator(
 I18nTranslator::factory($config['router']['translator'])
   );

That's a good point, and I'll make sure to point it out in the release
notes. The MvcTranslator is generally only expected to be pulled from the
ServiceManager, and rarely instantiated directly, which is why we made the
change. However, that assumption is clearly not entirely true, so we'll
need to call out the change in constructor for use cases like yours.


Re: [fw-general] Configuration merging and callables

2014-03-11 Thread Matthew Weier O'Phinney
On Mar 11, 2014 2:26 PM, Demian Katz demian.k...@villanova.edu wrote:

 I've just run into an odd situation - wondering if I'm doing something
wrong or if anyone has a recommended workaround.

 For a long time, my application has had tons of closures in its
module.config.php file. Since this is bad practice, I've refactored
everything to rely on static factory methods, and I've replaced all the
closures with callable arrays... e.g. array('VuFind\Driver\Factory',
'getMyDriver').

 So far, so good.

 The problem is that for my local instance of my application, I have a
custom module which overrides some of the factories from the base module. I
just updated this to also use callable arrays instead of closures, and the
configuration merging code is merging the arrays together, so I end up with
something like:

 array('VuFind\Driver\Factory', 'getMyDriver', 'VuFindLocal\Factory',
'getMyLocalDriver')

 and then, of course, is_callable() fails, and the whole process blows up.

 I'm guessing I should be doing something differently somewhere. Any
suggestion to which bit I should change?

Use classes that implement __invoke() instead, and reference the class
name. The SM is smart enough to autoload these when requested, making them
a more robust solution than array callbacks - particularly for the use car
of overriding.


[fw-general] Almost ready for 2.3.0!

2014-03-10 Thread Matthew Weier O'Phinney
Hey, everyone!

We're down to the last few pull requests and issues before we're ready
to tag 2.3.0. If you can, I'd really appreciate it if you'd test your
apps against the develop branch of ZF2 (dev-develop or ~2.3-dev if
you use composer), and let us know ASAP if you see any show stoppers.

Thanks in advance, and here's hoping to a smooth 2.3.0 rollout!

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF 1.12.4, 2.1.6, and 2.2.6 Released, with Security Updates!

2014-03-07 Thread Matthew Weier O'Phinney
On Fri, Mar 7, 2014 at 4:36 AM, Thomas Mauro Vargiu to...@ttech.it wrote:
 Yes,
 I saw it. Now they are in separated repositories (the right thing).

 But Can anyone add it on packagist? =)
 There is a composer.json, but I think the project isn't added on packagist.

Done -- it's now available as zendframework/zf1-extras. :)


 Il giorno 07/mar/2014, alle ore 11:24, Frank Brückner 
 d...@froschdesignstudio.de ha scritto:

 Please look at: https://github.com/zendframework/zf1-extras


 Kind regards,
 Frank


 Am 07.03.2014, 11:22 Uhr, schrieb Thomas Mauro Vargiu to...@ttech.it:

 Hello Julian,
 But, where can I find ZendX?
 In v1.12.3 ZendX was in the repository. Should I just use version =1.12.4 
 if I want ZendX, or there is another repo for it?
 Revision updates should be backward compatible, and now everyone updates 
 ZF1 using ZendX cannot use his project.

 Thomas

 Il giorno 07/mar/2014, alle ore 11:13, Julian jul...@dotboost.com ha 
 scritto:

 Hello Thomas,

 Nope, no ZendX.

 Only the ZF minimal is there .
 Library/Zend

 Friday, March 7, 2014, 12:05:08 PM, you wrote:

 Hello,

 Where is ZendX?
 There is no 'extras' directory in 1.12.4!

 Thomas

 Il giorno 07/mar/2014, alle ore 02:05, Julian jul...@dotboost.com ha 
 scritto:

 Hello David,

 Finally :-)

 PEAR channel updated to 1.12.4 http://code.google.com/p/zend/

 For  old  school  guys,  which don't use yet Composer, Phing and other
 mumbo-jumbos

 Thank you.

 Friday, March 7, 2014, 3:00:05 AM, you wrote:
 Woot!

 Appreciate all the hard work.

 Cheers,
 David

 On 07/03/2014, at 11:23 AM, Matthew Weier O'Phinney matt...@zend.com 
 wrote:

 Greetings!

 We've just pushed out a ton of new releases:

 - Zend Framework 1.12.4
 - Zend Framework 2.1.6
 - Zend Framework 2.2.6
 - a new component, ZendXml
 - and a bunch of releases for individual service components.

 These releases include a number of very important security fixes, 
 including:

 - Fixes for XML eXternal Entity (XXE) and XML Entity Expansion (XEE)
 vulnerabilities
 - Fixes to our OpenID consumers to prevent the ability for malicious
 Identity Providers to spoof identities from other providers

 We highly recommend updating to the latest versions of Zend Framework
 at this time.

 For more information, please read our release announcement:

 - 
 http://framework.zend.com/blog/zend-framework-1-12-4-2-1-6-and-2-2-6-released.html

 --
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com







 --
 Julian
 Zend Certified Engineer


 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com




 --
 Julian
 Zend Certified Engineer



 --
 Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com




-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Zend Framework v1.12.4 release?

2014-03-07 Thread Matthew Weier O'Phinney
On Thu, Mar 6, 2014 at 8:31 AM, Thomas D. whist...@googlemail.com wrote:
 the last ZF1 version was released ~a year ago but if you read through the
 commits there's still a lot of activity.

 I am wondering if there are plans to do another ZF1 release? I would vote
 for another release...

We released 1.12.4 yesterday, and 1.12.5 today. ;-)



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 1.12.5 Released!

2014-03-07 Thread Matthew Weier O'Phinney
Fast on the heels of 1.12.4, we've released 1.12.5.

1.12.5 ensures that the security fixes present in 1.12.4 work with PHP
5.2. The fix as present in 1.12.4 utilizes PHP closures, which were
only available starting in PHP 5.3 (oh, how quickly we get used to new
language features!)

For the full release announcement:

- http://framework.zend.com/blog/zend-framework-1-12-5-released.html

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Integration of the Segment Router and AbstractRestfulController

2014-03-07 Thread Matthew Weier O'Phinney
On Fri, Feb 28, 2014 at 10:03 AM, andrewferk andrewf...@gmail.com wrote:
 I'm curious why the logic of AbstractRestfulController is not in a Restful
 Router. Wouldn't it be more suitable for the routing of Controller and
 Action to be done in the Router? I propose a new Restful Router that
 implements the logic of the Segment Router and AbstractRestfulController,
 and returns a RouteMatch that has the action param set. Then it could be
 passed off to an AbstractActionController. This would also make unit testing
 restful routes possible.

Not combining them simplifies your routing definitions tremendously,
though, and is somewhat semantically better in that it keeps the
operations of a given URI resource grouped under a single definition.
The controller can then determine what HTTP methods are allowed, and
respond appropriately to OPTIONS and HEAD requests, as well as return
405 responses for invalid methods.

If a restful route were created, we'd have a problem in that failure
to match route + HTTP method would result in a 404, which is not
nearly the same thing. Alternately, the router would need to be aware
of allowed HTTP methods, and dispatch to a single controller in order
to respond to OPTIONS and 405 requests - which makes the router a fair
bit more than just a router at that point, and treading in the domain
of a controller.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] ZF 1.12.4, 2.1.6, and 2.2.6 Released, with Security Updates!

2014-03-06 Thread Matthew Weier O'Phinney
Greetings!

We've just pushed out a ton of new releases:

- Zend Framework 1.12.4
- Zend Framework 2.1.6
- Zend Framework 2.2.6
- a new component, ZendXml
- and a bunch of releases for individual service components.

These releases include a number of very important security fixes, including:

- Fixes for XML eXternal Entity (XXE) and XML Entity Expansion (XEE)
vulnerabilities
- Fixes to our OpenID consumers to prevent the ability for malicious
Identity Providers to spoof identities from other providers

We highly recommend updating to the latest versions of Zend Framework
at this time.

For more information, please read our release announcement:

- 
http://framework.zend.com/blog/zend-framework-1-12-4-2-1-6-and-2-2-6-released.html

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Was Zend Measure deprecated?

2014-02-26 Thread Matthew Weier O'Phinney
On Tue, Feb 25, 2014 at 3:42 PM, dennis-fedco dmatve...@fedco-usa.com wrote:
 Similar yet different question.  I figure a different thread is in order not
 to muddle this into my previous one with a slightly different subject.

 Was Zend Measure deprecated?

 http://framework.zend.com/manual/1.12/en/zend.measure.edit.html

 I need some kind of a way to convert Imperial units into SI units for
 various values inside my classes.  Do I just implement my own helper class
 for this?  If so, where do I put it and where would it go inside the ZF2
 module structure?  I figure creating a separate module just for this will be
 overkill?  Or not?

It was removed from ZF2, for a variety of reasons.

First is that a lot of the functionality in that component is now
present in ext/intl in PHP.

Second is that it had heavy reliance on Zend_Locale, and the task of
stripping that out to use the native Locale class was monumental --
and nobody with appropriate expertise stepped up to take it on.

If you're interested in doing this, the appropriate component would be
Zend\I18n. The conversion utilities themselves should likely be in a
Measure or Conversion sub-namespace, and then you could create
appropriate helpers as needed in the Helper sub-namespace.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Was Zend PDF Deprecated?

2014-02-26 Thread Matthew Weier O'Phinney
On Mon, Feb 24, 2014 at 2:35 PM, dennis-fedco dmatve...@fedco-usa.com wrote:
 I do not see Zend PDF library in ZF2.  Most links lead me towards ZF1 in my
 searches.

 Was PDF library removed from ZF2, for some reason?
 Are there any plans of reinstating it?  Are alternative solutions
 recommended?

Yes, it was deprecated. We have a ZendPdf repository, but it is unmaintained.

The reason is that nobody was maintaining even the library in ZF1, and
architectural issues in the component were making it difficult to both
maintain as well as add new features. The PDF and PS specifications
are sufficiently complicated that they require somebody with extensive
domain knowledge to maintain them -- and nobody was stepping up.

I've heard good things about tcpdf.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] CentOS offers official 5.4 PHP packages

2014-02-26 Thread Matthew Weier O'Phinney
On Thu, Feb 20, 2014 at 8:03 AM, mbneto mbn...@gmail.com wrote:
 I am not sure if you guys read but recently Redhat/Centos started providing
 supported rpm packages for PHP 5.4.

 This will make easy to bump the framework requirements, IMHO, since it is
 an enterprise distro and we would not have to rely on
 external/non-supported versions.

It's not quite as easy as that. Just because the distro has started
providing updated PHP versions does not mean everybody magically has
them now. Many organizations will adopt more slowly, after they get a
chance to test the new version -- and, in many cases, will not upgrade
at all as long as the application is running fine.

We're already bumping the minimum supported version to 5.3.23 starting
with 2.3.0. We'll consider 5.4+ at a later date once we have more data
indicating that migration has largely moved off of 5.3.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF Tool + extension intl = broken

2014-02-18 Thread Matthew Weier O'Phinney
On Sun, Feb 16, 2014 at 10:49 AM, richard ghizzoni jr
richardghizz...@yahoo.com.br wrote:
 Im starting with Zend Framework, and reading the manual
 http://framework.zend.com/manual/2.2/en/modules/zendtool.introduction.html i
 cant make Zf Tool to work, this is the error i got:

 c:\Apache\htdocs\zf2-tutorial\vendor\zendframework\zftoolphp zf.php modules
 list
 PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\php_intl.dll'
 - %
 1 nÒo Ú um aplicativo Win32 vßlido.
  in Unknown on line 0
 Modules installed:

 i have on php.ini this:
 extension_dir = ext
 extension=php_intl.dll

Are you sure this file exists?




 running on apache 2.4 (vc 11 in windows 7 ultimate 64 bits) with php 5.5.8.

 when i do on command line:
 php --ri pgsql
 it returns me all the info about pgsql extension.
 but when i do:
 php --ri intl
 it says intl extension not present.

 all the other extensions that came with the php package works with 'php --ri
 ext-name' command, only intl doest not.

 any help welcome.
 thanks.





 --
 View this message in context: 
 http://zend-framework-community.634137.n4.nabble.com/ZF-Tool-extension-intl-broken-tp4661692.html
 Sent from the Zend Framework mailing list archive at Nabble.com.

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Best Practices on incorporating non-OO non-ZF2 code into ZF2 app

2014-02-04 Thread Matthew Weier O'Phinney
On Tue, Feb 4, 2014 at 9:56 AM, dennis-fedco dmatve...@fedco-usa.com wrote:
 In exploring various options for sign in I found this:
 https://github.com/googleplus/gplus-quickstart-php

 In particular,  signin.php
 https://github.com/googleplus/gplus-quickstart-php/blob/master/signin.php
 script is not object oriented (aka not a class itself), but actually creates
 and runs a Silex app from a procedural script.

 Question:  what are/are there any best practices on ZF2-ing existing non-ZF2
 non-OO code into ZF2?

 As it stands now, to me, if I were to incorporate the code into my ZF2 app,
 I'd probably want to spend some time thinking exactly how and where I want
 to trigger it, and how I can turn it into a module.  And then create a ZF2
 module.  Is that the route you would go?

Within your controllers, modules, event listeners, etc... you can call
any code you want. If you have procedural code that already exists in
libraries, just call it!



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ServiceManager, an object with __constructor parameters.

2014-01-16 Thread Matthew Weier O'Phinney
On Mon, Jan 13, 2014 at 12:06 PM, Philip G guice...@gmail.com wrote:
 On Mon, Jan 13, 2014 at 4:11 AM, Stefano Torresi
 web...@stefanotorresi.itwrote:

 So there you go: https://gist.github.com/stefanotorresi/8399139

 You may want to get it further and use an AbstractOption subclass to
 enforce defaults and/or validate configs.


 Oh. I see. I didn't think to use services that way. That works out well. I
 can even set a class index that has the class name to use, which would
 allow a simple method for DB Injections.

 Let me ask this now: would it be worth while just to set the while
 application config within a Config service? AbstractOption isn't
 necessary: it's an inhouse script only. There will be no outside users
 access and modifying the code. However, I do see that use in public code
 base; internally we can pressure our developers do to things right. I
 wanted DI for the purpose of unit testing.



 By the way, yes, anonymous functions inside configurations array are not
 cacheable, and so are object instances (i.e. using 'new Obj()' as an array
 value).


 I was afraid of this. Albeit this might not be a bottle neck, speed is a
 concern of ours. We'll see if this has any micro-optimization speed
 implications in the end. Thanks!

Actually, from a performance perspective, factory classes are a much
better fit. The reason is that the code from them is only retrieved
and compiled when requested. When you use closures, those must be
compiled on each request.

(Ask Marco Pivetta and Michael Gallego about this sometime - I was
surprised, as well!)


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Getting access to the query string used during page request , in the view

2014-01-13 Thread Matthew Weier O'Phinney
On Sat, Jan 11, 2014 at 5:42 AM, Kenroy Bennett bennettk9...@gmail.com wrote:
 I am creating some links in a view  with the asistance of the url
 view helper and I would like to get items from the query string used in the
 request in the page to so i can add them to the links i am creating.
 How can i get access to the querystring in the view  that was used during
 the request?

The url() helper takes several arguments. The first is the route, the
second the parameters/replacements you want to use. The third argument
are _options_ to pass to the route instance, and this is the one you
want. Pass the following to it:

array('query' = true)

and the link generated will re-use any query string parameters made in
the request. (You can also specify an assoc array, in which case only
the values you specify will be used.)

So, as an example:

echo $this-url('foo', array('id' = $id), array('query' = true));

or, using PHP 5.4 and up:

echo $this-url('foo', ['id' = $id], ['query' = true]);



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Zend\Di\Di configuration array?

2014-01-10 Thread Matthew Weier O'Phinney
On Fri, Jan 10, 2014 at 1:31 PM, Philip G g...@gpcentre.net wrote:
 That's the thing, I don't know what's correct. And I'm already spending
 more time than I should be trying to decipher Zend\Di to determine if it
 fully suits my needs.

Obligatory question: do you specifically need Zend\Di, or more
generally an Inversion of Control (IoC) container?

I ask, as we're generally no longer pushing usage of the Zend\Di
component, in favor of using Zend\ServiceManager as an IoC container.
While the Di component attempts to guess how wiring should occur,
you typically end up having to do a lot to correct errors in wiring,
as well as jump through many hoops if you want to do anything custom,
such as provide specific implementation types to use in specific
cases, or provide scalar configuration for instances. Additionally,
unless you've cached the wiring discovered by the reflection scanner,
it tends to perform really, really poorly.

The ServiceManager is far easier to configure, and much more
performant (though, as with just about any generalized component,
could be even better).

If you are looking for an IoC container to manage DI for your various
services/instances, I'd recommend Zend\ServiceManager instead of
Zend\Di.


 On Fri, Jan 10, 2014 at 11:14 AM, Frank Brückner
 d...@froschdesignstudio.dewrote:

 Please report the problems on the bug tracker.

 https://github.com/zendframework/zf2-documentation/issues

 Thanks!


 Kind regards,
 Frank

 Am 10.01.2014, 20:07 Uhr, schrieb Philip G guice...@gmail.com:


  Is there any better Zend\Di\Di configuration array in the wild? The one on
 the docs page is wrong: the hierarchy is completely incorrect, and it's
 missing a number of keys.

 Is there a better example somewhere else? Something that displays all
 possible configuration options?

 ---
 Philip
 g...@gpcentre.net
 http://www.gpcentre.net/


 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com






-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Console routing

2014-01-03 Thread Matthew Weier O'Phinney
On Sat, Dec 21, 2013 at 11:54 AM, Mads Lie Jensen m...@gartneriet.dk wrote:
 I have this in a module:

 'console' = array('router' = array('routes' = array(
 'PDDO-build-dataobjects' = array(
  'options' = array(
 'route' = 'PDDO build',
 'defaults' = array(
 'controller' = 'PearDbDataObject\Controller\Console',
 'action' = 'build',
 ),
 ),
 ),
 ))),

 ...

 to give me a console route to this controller/action.

 I also have the Assetic-bundle module installed, which has a similar route
 installed, which is called 'assetic build'.
 The assetic setup is included first in my merged config.

 The problem is, whenever I now call

 php public/index.php assetic build

 it is my PDDO build action that is run.

 It looks like the 'build'-part of the route is triggering the wrong route.

 It looks like a bug ... but is it?

It may be, but it may also be a precedence thing. Can you reduce your
console routes down to the minimum that displays the issue, and then
submit it in an issue report, please?


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Paginator Adapter Woes

2014-01-03 Thread Matthew Weier O'Phinney
On Mon, Dec 23, 2013 at 10:37 AM, Xander Guzman
thesha...@shadowpedia.info wrote:
 I'm using a custom Paginator Adapter which uses a service to request and
 merge data from a solr index with database data. Solr returns to me the
 total number of documents that matched the search.

 Here's the problem, further up in the call stack they're calling -count()
 before -getItems() which is causing me problems since the count isn't
 being set until getItems() is being called. I'd hate to have to make two
 requests just to get the count, that seems very wasteful with a full on
 HTTP request.

 Is there a way to make it so getItems() is called before count() for these
 kinds of situations? Or, can anyone think of a reason why we shouldn't do
 it in that order? I can't think of anything that would cause problems. If
 people use getItems() to populate the count they're covered, if people make
 a secondary call it's still covered.

Why not do a check in your count() method to see if the count is
populated, and, if not, call getItems() (or the logic you normally
call in getItems()) to fetch it? That way you can use a single call
and cache the information.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] invokable/factory controller keys

2014-01-03 Thread Matthew Weier O'Phinney
On Mon, Dec 30, 2013 at 3:37 PM, dennis-fedco dmatve...@fedco-usa.com wrote:
 When generating controller configuration, Zend Studio 10.5 by default creates
 something like this:

 'controllers' = array(
 'invokables' = array(
 'Module\Controller\Index' =
 'Module\Controller\IndexController',
 ),
 ),

 and

   'defaults' = array(
  '__NAMESPACE__' = 'Module\Controller',
 'controller'= 'Index',
 'action'= 'index',
 ),

 In one of the labs I was following, instead, this is suggested:

 'controllers' = array(
 'invokables' = array(
 'module-index-controller' =
 'Module\Controller\IndexController',
 ),
 ),

 and

 'defaults' = array(
 'controller'= 'module-index-controller',
 'action'='index',
 ),

 May I have the word of the wise on which method is more suggested?

I prefer the first, though I typically omit the __NAMESPACE__ key
and just include the namespace in the controller:

'controller' = 'Module\Controller\Index'

The reason is that I prefer the keys to be class names (or interfaces,
or abstract classes) whenever possible (or reasonably close), as it
makes it more clear to the consumer what they are trying to retrieve,
and what they will be consuming.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Form\Element\Button

2014-01-03 Thread Matthew Weier O'Phinney
On Fri, Jan 3, 2014 at 8:39 AM, dolphin pochta.dolp...@gmail.com wrote:
 I use a form with get method. In the form I use button type submit
 ( button type=submit name=submit value=Submit / button )
 As a result, in the browser address bar I see:
 http://my.site/search?needle=testfilter=allorder=newestsubmit=
 I can not disable the name or set a value. I think it makes sense to
 improve it in new versions zf2 :)

You can set the value as an element attribute; however, it cannot be
disabled. Even if we do, you will still see the button appearing in
the submitted values; that's just the nature of HTML.

Also, name is always required, as it is how the form object is able to
reference the element, and we will not be changing that.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Do factories get passed through initializers?

2013-12-17 Thread Matthew Weier O'Phinney
On Tue, Dec 17, 2013 at 8:52 AM, Marco Pivetta ocram...@gmail.com wrote:
 Sorry for the late reply.

 No, factories are NOT passed to initializers, and shouldn't.

 Think of a factory as a named callback. Nothing else.

Actually, I'm going to clarify a bit further.

What gets passed to initializers are any objects the ServiceManager
_creates_. That means:

- an invokable class
- the result of a factory
- the result of an abstract factory

Essentially, as soon as the SM decides it doesn't have an instance
already, but has a definition for one, it calls the routine necessary
for creating the object, and then passes that result to each
initializer. It then stores it -- which means that the next time you
retrieve it, the instance will *not* be passed to the initializers.

 On 9 December 2013 17:06, Xander Guzman thesha...@shadowpedia.info wrote:

 It does

 /**
  * Defines an initializer that knows how to inject a configuration object
  */
 class ConfigInitializer implements InitializerInterface
 {
 /**
  * Initialize
  *
  * @param $instance
  * @param ServiceLocatorInterface $serviceLocator
  *
  * @return mixed
  */
 public function initialize($instance, ServiceLocatorInterface
 $serviceLocator)
 {
 if ($instance instanceof ConfigAwareInterface) {
 $config = $serviceLocator-get('Config');
 $instance-setConfig($config);
 }
 }
 }


 On Mon, Dec 9, 2013 at 8:52 AM, franz de leon kelmad...@gmail.com wrote:

  Your factory should implement the interface in your initializer.
 
  array(
  'factories' = array(
  'solrconfig' = 'Solr\Config\ConfigInitializer',
  ),
  'initializers' = array(
   function ($instance, $sm) {
if ($instance instanceof Configaware) {
 $instance-setConfig($sm-get('solrconfig'));
}
   }
  )
  )
 
 
  On Mon, Dec 9, 2013 at 10:24 AM, Xander Guzman
  thesha...@shadowpedia.infowrote:
 
   Like the database configurations I have multiple Solr configurations so
  I'm
   trying to create a factory that can return the connection to the one
   specified.
  
   return array(
   solr = array(
   'media' = array( /** config */ ),
   'vendors' = array( /** config */ ),
   ),
   );
  
   Right now, in my module, I have the Following configuration for the
   getServiceConfig method
  
   return array(
   'factories' = array(
   'Solr\Service' = 'Solr\Service\Factory',
   'Solr\Client' = 'Solr\Client\Factory',
   ),
   'initializers' = array(
   'SolrConfig' = 'Solr\Config\ConfigInitializer',
   ),
   );
  
   Here is how things are working.
  
   The factories work and are getting called and the initializer is being
   called, but the initializer isn't being called on the factories.
  
   So first, why? Is this by design? Am I misunderstanding how this
   relationship works?
  
   How can I get the same kind of multiple configurations to work I tried
   digging through the DB ones but I don't think I've found the class that
  yet
   reads the config to pass off to a specific adapter.
  
   Any help is appreciated.
  
   Cheers!
  
   Xander
  
 




-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Re: [ZF2] Best practice to get service in controller ?

2013-12-17 Thread Matthew Weier O'Phinney
On Tue, Dec 17, 2013 at 12:57 PM, MichaelB mr...@mckanes.com wrote:
 Thanks Matthew for your answer!

 Little other questions about it..

 Is it a performance difference between creating a controller factory in a
 different class OR creating all in getControllerConfig() ?
 (http://www.zfdaily.com/2012/07/getting-dependencies-into-zf2-controllers/)

Putting it in a class actually is better, for a few reasons.

- First, if you never use the factory, no code is loaded. If you
define it in getControllerConfig(), you're defining a closure in each
and every request.
- Second, it gives you the option of extending or otherwise re-using
the factory later.

 And last question.. ;-) Form should be injected too ?

Typically, yes -- particularly as you can now seed the form elements,
hydrators, input filters and inputs, filters, and validators via
plugin managers, you'll likely want access to those plugin managers to
create your form -- so why not use a factory? :)


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] [ZF2] Best practice to get service in controller ?

2013-12-16 Thread Matthew Weier O'Phinney
On Sun, Dec 15, 2013 at 5:05 AM, MichaelB mr...@mckanes.com wrote:
 Hi all!

 I'm currently developing a web application with ZF2. I started some months
 ago and use $this-getServiceLocator() in controller to access to my service
 like described in the doc.

 /Example in the doc:/



 It work well! But i read on different discussion that it will may be removed
 in ZF3 and is better to inject all what you need in your controller directly
 in the constructor like this:


 /Example:/



 So my question is easy.. *What is the best practice ?* (performance,
 migration, ...)

Always inject your dependencies, and do not use and/or compose the
service manager instance in your controllers.

While it's nice for rapid prototyping, it leads to a number of issues:

- harder to determine the specific dependencies you have
- which in turn makes it harder to test your controllers

The appropriate way to handle dependencies with controllers is to
create factories for them and seed them to the ControllerManager. This
is done with either the controllers key in your configuration, or
the getControllerConfig() method of your Module classes. In each
case, the format follows that of all plugin managers and service
managers.

A best practice I use in my controller factories is to name the
incoming service locator instance so that I know what I'm pulling
from:

function ($controllers) {
$services = $controllers-getServiceLocator(); // the
application services
return new MyController($services-get('MyDependency'));
}


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] How to unit test a method that creates a Zend\Db\Sql\Sql object?

2013-12-12 Thread Matthew Weier O'Phinney
On Tue, Dec 10, 2013 at 2:34 PM, Julian Vidal jul...@julianvidal.com wrote:
 I have this method that I would like to unit test. Since it's creating the
 Sql object inside the method, I can't mock it up.

 Initially I thought about making Sql be an instance property except that
 I'd have to reset it every time I use it in other methods and this will
 most likely lead to hard to debug errors.

 What's the common pattern for testing these kinds of methods?

I would write a separate method for the SQL creation. That way you can
unit test against the Sql instance that returns, and only do
integration or functional testing on the method that consumes it.

So:
public function prepareConfigSql(\Zend\Db\Adapter\Adapter $adapter)
{
$sql = new Sql($adapter);
$select = $sql-select()-from('languages');
return $select;
}

Inside your getConfigFromDb() method, you'd do this:

$select = $this-prepareConfigSql($this-getSlaveDbAdapter());

This allows you to unit test the prepareConfigSql() method and do
assertions on the Select instance it returns, even using a mock
adapter if desired.


 Here's a link to the gist in case this syntax highlighter screws things up:
 https://gist.github.com/poisa/7898032

 public function getConfigFromDb()
 {
 if (!is_null($this-configInDb)) {
 return $this-configInDb;
 }

 $sql = new Sql($this-getSlaveDbAdapter());

 $select = $sql-select()
   -from('languages');

 $statement = $sql-prepareStatementForSqlObject($select);
 $results   = $statement-execute();
 $results-buffer();

 $return = array();

 foreach ($results as $r) {
 $return[] = $r;
 }

 $this-configInDb = $return;

 return $return;
 }



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] How to unit test a method that creates a Zend\Db\Sql\Sql object?

2013-12-12 Thread Matthew Weier O'Phinney
On Thu, Dec 12, 2013 at 12:48 PM, Julian Vidal jul...@julianvidal.com wrote:
 Matthew,

 Thanks for your answer. Going a little step further... as you can imagine
 I'll be using the Sql object _many_ times in application. Does it makes
 sense to create an Sql service with mainly 4 methods that given an adapter,
 each return a Select(), Insert(), Update(), Delete() objects? (without the
 from(), since I'll need to change that in every case)

 Is this overkill? In my head it sounds reasonable but since I've never seen
 it done I might be missing something.

If it helps you accomplish your testing goals, and offers a clean
separation of concerns, then yes, do it!

Sometimes you end up with more smaller, dedicated classes when doing
these things, and it seems more complex from the outside, but
internally, it's actually less complex, and easier to identify when
and where things go wrong later.


 On Thu, Dec 12, 2013 at 10:00 AM, Matthew Weier O'Phinney
 matt...@zend.comwrote:

 On Tue, Dec 10, 2013 at 2:34 PM, Julian Vidal jul...@julianvidal.com
 wrote:
  I have this method that I would like to unit test. Since it's creating
 the
  Sql object inside the method, I can't mock it up.
 
  Initially I thought about making Sql be an instance property except that
  I'd have to reset it every time I use it in other methods and this will
  most likely lead to hard to debug errors.
 
  What's the common pattern for testing these kinds of methods?

 I would write a separate method for the SQL creation. That way you can
 unit test against the Sql instance that returns, and only do
 integration or functional testing on the method that consumes it.

 So:
 public function prepareConfigSql(\Zend\Db\Adapter\Adapter $adapter)
 {
 $sql = new Sql($adapter);
 $select = $sql-select()-from('languages');
 return $select;
 }

 Inside your getConfigFromDb() method, you'd do this:

 $select = $this-prepareConfigSql($this-getSlaveDbAdapter());

 This allows you to unit test the prepareConfigSql() method and do
 assertions on the Select instance it returns, even using a mock
 adapter if desired.


  Here's a link to the gist in case this syntax highlighter screws things
 up:
  https://gist.github.com/poisa/7898032
 
  public function getConfigFromDb()
  {
  if (!is_null($this-configInDb)) {
  return $this-configInDb;
  }
 
  $sql = new Sql($this-getSlaveDbAdapter());
 
  $select = $sql-select()
-from('languages');
 
  $statement = $sql-prepareStatementForSqlObject($select);
  $results   = $statement-execute();
  $results-buffer();
 
  $return = array();
 
  foreach ($results as $r) {
  $return[] = $r;
  }
 
  $this-configInDb = $return;
 
  return $return;
  }



 --
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com






-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Re: Query: Should ZF2 bump the minimum required PHP version?

2013-12-06 Thread Matthew Weier O'Phinney
Hey, all --

I never closed this thread, but will do so now.

ZF 2.3.0 WILL bump the version to at least 5.3.9; we may bump to the
last 5.3 release version (5.3.27), as that contains the last security
fixes applied to the 5.3 branch, and distros that provide 5.3 either
have 5.3.3 or 5.3.latest typically; Zend Server, which should run on
just about any OS out there, ships 5.3.27 already, and is a viable
option for upgrade for those whose distros are stuck on older
versions.

We *DO* have precedence for bumping the minimum required version at
minor release versions; we did this with 1.7 (bumped to 5.2.4) and
again with 1.12 (bumped to 5.2.latest at the time). Additionally, as
others noted in the thread, if you are stuck with an LTS server
edition, typically you are also pinning to specific ZF versions long
term as well, as it's part of your release process.

While I am aware this will displease some of you, we cannot please
everyone, and we have some very real issues in the code base that
require fixes introduced starting in 5.3.9. Considering that we are in
the last few months of security releases for the 5.3 branch, an
upgrade to 5.4 or higher is strongly encouraged by the PHP group
anyways.


On Tue, Nov 5, 2013 at 1:34 PM, Matthew Weier O'Phinney
matt...@zend.com wrote:
 Hey, all --

 We're running into a few situations where bumping the minimum required
 PHP version for ZF2 would be useful; in fact, there's at least one
 situation where staying with 5.3.3 actually prevents progress on a few
 issues.

 The specific issue we have is that, until 5.3.9, PHP did not allow the
 following:

 interface Foo
 {
 public function send();
 }

 interface Bar
 {
 public function send();
 }

 class FooBar implements Foo, Bar
 {
 public function send()
 {
 // do something
 }
 }

 Essentially, implementing multiple interfaces that define the same
 method, using the same signature.
 Prior to 5.3.9, this raises an E_FATAL. From 5.3.9 forward, it works.

 Having this would allow us to fix a situation with the way translation
 works across components; not having it means we're stuck with some of
 those problems.

 There are other issues as well: ArrayObject has had a lively history
 of malfunctioning with 5.3 and 5.4, and there are  some odd behaviors
 in the object model as well that have been corrected starting in 5.3.7
 and up.

 Considering PHP 5.3 has already reached end of life status
 (http://php.net/archive/2013.php#id2013-07-11-1), upping the minimum
 version seems like a good idea.

 My question, then is:

 - Should we up the minimum required PHP version for ZF2?
 - If your answer was no, why not?
 - If your answer was yes, what version should become the next
 minimum supported PHP version? Why?

 NOTE: we are not announcing that we will up the minimum required
 version at this time; I'm soliciting feedback so we can make a
 decision.

 Thanks in advance!

 --
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Re: [zf-contributors] Re: Query: Should ZF2 bump the minimum required PHP version?

2013-12-06 Thread Matthew Weier O'Phinney
On Fri, Dec 6, 2013 at 10:53 AM, Zachary Burnham zburn...@gmail.com wrote:
 Will security problems with 2.2 be patched?

Yes -- we're not abandoning 2.2, we're just bumping the minimum
required PHP version for 2.3 onwards.


 On Dec 6, 2013, at 11:49 AM, Matthew Weier O'Phinney matt...@zend.com 
 wrote:

 Hey, all --

 I never closed this thread, but will do so now.

 ZF 2.3.0 WILL bump the version to at least 5.3.9; we may bump to the
 last 5.3 release version (5.3.27), as that contains the last security
 fixes applied to the 5.3 branch, and distros that provide 5.3 either
 have 5.3.3 or 5.3.latest typically; Zend Server, which should run on
 just about any OS out there, ships 5.3.27 already, and is a viable
 option for upgrade for those whose distros are stuck on older
 versions.

 We *DO* have precedence for bumping the minimum required version at
 minor release versions; we did this with 1.7 (bumped to 5.2.4) and
 again with 1.12 (bumped to 5.2.latest at the time). Additionally, as
 others noted in the thread, if you are stuck with an LTS server
 edition, typically you are also pinning to specific ZF versions long
 term as well, as it's part of your release process.

 While I am aware this will displease some of you, we cannot please
 everyone, and we have some very real issues in the code base that
 require fixes introduced starting in 5.3.9. Considering that we are in
 the last few months of security releases for the 5.3 branch, an
 upgrade to 5.4 or higher is strongly encouraged by the PHP group
 anyways.


 On Tue, Nov 5, 2013 at 1:34 PM, Matthew Weier O'Phinney
 matt...@zend.com wrote:
 Hey, all --

 We're running into a few situations where bumping the minimum required
 PHP version for ZF2 would be useful; in fact, there's at least one
 situation where staying with 5.3.3 actually prevents progress on a few
 issues.

 The specific issue we have is that, until 5.3.9, PHP did not allow the
 following:

interface Foo
{
public function send();
}

interface Bar
{
public function send();
}

class FooBar implements Foo, Bar
{
public function send()
{
// do something
}
}

 Essentially, implementing multiple interfaces that define the same
 method, using the same signature.
 Prior to 5.3.9, this raises an E_FATAL. From 5.3.9 forward, it works.

 Having this would allow us to fix a situation with the way translation
 works across components; not having it means we're stuck with some of
 those problems.

 There are other issues as well: ArrayObject has had a lively history
 of malfunctioning with 5.3 and 5.4, and there are  some odd behaviors
 in the object model as well that have been corrected starting in 5.3.7
 and up.

 Considering PHP 5.3 has already reached end of life status
 (http://php.net/archive/2013.php#id2013-07-11-1), upping the minimum
 version seems like a good idea.

 My question, then is:

 - Should we up the minimum required PHP version for ZF2?
 - If your answer was no, why not?
 - If your answer was yes, what version should become the next
 minimum supported PHP version? Why?

 NOTE: we are not announcing that we will up the minimum required
 version at this time; I'm soliciting feedback so we can make a
 decision.

 Thanks in advance!

 --
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc



 --
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] question about wildcard better usage

2013-12-04 Thread Matthew Weier O'Phinney
On Wed, Dec 4, 2013 at 7:13 AM, Mucahit Sancar Kahveci
mucahitkahv...@yahoo.com wrote:
 Hello I have a concern about mvc routing wildcard.

 I am trying to use a route as in default route zf1 as follows:
 website.com/controller/action/param1/value1//paramn/valuen/

 It is fine using the below described routes without the trailing slash. But 
 when the trailing slash is added it does not matches a route. The description 
 of the route as follows (i try to describe this way instead of all array 
 elements):
 route:
 0. segment: /[:controller[/:action]]
 child routes:
 0. wildcard
 child routes:
 0. literal: '/'

 So I thought adding the literal '/' child route to the wildcard child route 
 may cause it to match one but it did not. However it did solved the same 
 trailing slash problem when used as a child route after segment: 
 /[:controller[/:action]] route
 0. segment: /[:controller[/:action]]
 child routes:
 0. literal '/'
 Above settings solved the problem of trailing slash in the below address:
 website.com/controller/action/

 Then I have checked the source code and find out that it is the below code at 
 Zend\Mvc\Router\Http\Wildcard.php on line 123 within the match method (ZF 
 version: 2.2.5) that causes the problem:
 L121$params  = explode('/', $path);
 L122
 L123if (count($params)  1  ($params[0] !== '' || end($params) === '')) 
 {
 L124return null;
 L125}


 It explodes the path with the '/', and since the last $params element is '', 
 it returns null. Since the wildcard route does not accepts any of the valid 
 $params and the valid route, the wildcard route is cancelled before it can 
 check the child routes which is the literal '/' in this case.
 If i remove the

 || end($params) === ''
 part on line 123 at above code the app seems to work good.


 Please tell me if this is a bug or should it be in that way to work properly. 
 And if this is a bug, will this be fixed with next update.

This is a _limitation_ of the wildcard route, and not a _bug_.

Wildcard routes are, pardon the pun, wildly problematic when it comes
to matching, and should never have child routes, as they are greedy
and look to the end of the path.

I'd argue you should never use the wildcard route. If you need
arbitrary parameters as part of the request, use the query string
instead.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF2 Captcha validation returns always empty

2013-11-05 Thread Matthew Weier O'Phinney
On Wed, Oct 9, 2013 at 5:16 AM, MGP mgp.sand...@gmail.com wrote:
 I'm trying to setup a captcha in a form.

 I've added the zend form element captcha to the form, and printed it with
 formElement($form-get...);

 Everything works ok. The image is displayed, the input field is created. But
 when i submit my form, i always get an empty captcha error.

 $form-getData()

 Array
 (
 [email] = st...@home.pt
 [captcha] = Array
 )

 $_POST

 Array
 (
 [email] = st...@home.pt
 [captcha] = Array
 (
 [id] = 0ea5a030a05003e2dbf60b3056fb8f18
 [input] = dgdfgdfg
 )

 )


 $form-getInputFilter()-getMessages();

 Array
 (
 [captcha] = Array
 (
 [missingValue] = Empty captcha value
 )

 )

 $form = new Form();

 $captchaImage =  new \Zend\Captcha\Image(  array(
 'font' ='./fonts/arial.ttf',
 'width' = 250,
 'height' = 100,
 'dotNoiseLevel' = 40,
 'lineNoiseLevel' = 3)
 );
 $captchaImage-setImgDir('captcha');
 $captchaImage-setImgUrl('captcha');

 $form-add(array(
 'type' = 'Zend\Form\Element\Captcha',
 'name' = 'captcha',
 'options' = array(
 'label' = 'captcha',
 'captcha' = $captchaImage,
 ),
 ));

 (...)

 Why might be happening?

My guess is that the session cookie is getting overwritten, or the
session is getting clobbered between requests. Can you dump the
contents of $_SESSION on the initial request and on the final to see
if perhaps that is the case?


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] AbstractRestfulController and HTML

2013-11-05 Thread Matthew Weier O'Phinney
On Thu, Oct 10, 2013 at 9:53 PM, David Muir davidkm...@gmail.com wrote:
 I'm just starting on a new project where I'm wanting to set up my routes to 
 work for HTML as well as JSON.

 The AbstractRestfulController seemed like a good idea since it automatically 
 handles the routing of typical CRUD type actions. What I'm having trouble 
 with is how to deal with HTML's anaemic HTTP verb support. If I remember 
 correctly, in ZF1, you could send a request and include a METHOD query param 
 to route to the non supported verbs, e.g. PUT, DELETE, OPTIONS, HEAD, etc. 
 Looking through ZF2's AbstractRestfulController source and documentation, it 
 doesn't look like it supports that hack. Are people only using this 
 controller for json api's or is there an obvious way to handle it that I'm 
 missing?

One thing you can do is alter the Request object's HTTP method based
on the existence of a given query string variable; you could do this
in a listener on the controller's dispatch event at high priority, so
that by the time the default dispatch handler is called, it sees only
the method:

class MyController extends AbstractRestfulController
{
public function setEventManager(EventManagerInterface $events)
{
parent::setEventManager($events);

$events-attach('dispatch', array($this, 'detectHttpMethod'), 100);
return $this;
}

public function detectHttpMethod($e)
{
$request = $e-getRequest();
if (!$request instanceof \Zend\Http\Request) {
return;
}

$method = $request-getQuery('__method', false);
if (!$method) {
return;
}

// likely want to validate the method before injecting
// ...

$request-setMethod($method);
}
}

Essentially, the above looks for a query string parameter named
__method, and, if detected, sets the request method appropriately.
As noted, you'd want to validate the method before injection.

 Apigility looks really interesting, but I don't think it's the right fit 
 setting up the primary interface.

Alternately, I'd actually try something like Apigility, where you
develop the API up front, and then consume it via a JS MVC framework
(we used Angular for Apigility). I was surprised at how much simpler
creating the UI for the Apigility admin was -- and this was in large
part because we focussed on the API first, and what we wanted to
expose. It also meant the logic was a lot simpler on the backend; we
could focus on the business objects only, and not worry about having
multiple representations and worrying about which renderer would win.
You return the same thing all the time, and the client decides what to
do with it.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] TranslatorAwareTreeRouteStack

2013-11-05 Thread Matthew Weier O'Phinney
On Sun, Oct 20, 2013 at 6:41 AM, Juan Pedro Gonzalez
unaputacue...@hotmail.com wrote:
 Shouldn't TranslatorAwareTreeRouteStack contain a factory method in order to 
 load a translator?
 Maybe I'm wrong and there is an easier way to set the translator, but I guess 
 if the proper way to set the TranslatorAwareTreeRouteStack is:
 'router' = array('router_class' = 
 'Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack',)
 Wouldn't it be logical to be able to do the same with the translator?
 'router' = array('router_class' = 
 'Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack',
 'router_translator' = array('translation_file_patterns' = 
 array(array('type' = 'gettext',  
   'base_dir' = __DIR__ . '/../routes',
 'pattern'  = '%s.mo',),),))
 I added a pull request https://github.com/zendframework/zf2/pull/5300
 ...but if there is an already implemented method to load the translator it 
 would be great to know how it is done.
We have an initializer in the MVC service config that:

- Determines if an object created by the ServiceManager is TranslatorAware
- Determines if we have a Translator service
- and if both are true, injects the Translator service into the new object

In other words, it's completely automated, assuming you're using the
ServiceManager (which you are).

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] RESTful PRG

2013-11-05 Thread Matthew Weier O'Phinney
On Mon, Oct 21, 2013 at 1:03 AM, David Muir davidkm...@gmail.com wrote:
 Does the PRG plugin work with the AbstractRestfulController?

 Basically I'm trying to use the same setup to act as a json api as well as
 the primary html interface to the application. I was going to set up a
 listener to update the http method to PUT or DELETE depending on a METHOD
 query parameter. But that means PRG won't work for those requests, because
 it would no longer be a POST request.

Most likely it will not work in this situation, unless the originating
method is POST and the target method is GET, as I believe that the
methods are hard-coded into the plugin. You'll likely want to create
an extension to that plugin, or a custom plugin, for this.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Query: Should ZF2 bump the minimum required PHP version?

2013-11-05 Thread Matthew Weier O'Phinney
Hey, all --

We're running into a few situations where bumping the minimum required
PHP version for ZF2 would be useful; in fact, there's at least one
situation where staying with 5.3.3 actually prevents progress on a few
issues.

The specific issue we have is that, until 5.3.9, PHP did not allow the
following:

interface Foo
{
public function send();
}

interface Bar
{
public function send();
}

class FooBar implements Foo, Bar
{
public function send()
{
// do something
}
}

Essentially, implementing multiple interfaces that define the same
method, using the same signature.
Prior to 5.3.9, this raises an E_FATAL. From 5.3.9 forward, it works.

Having this would allow us to fix a situation with the way translation
works across components; not having it means we're stuck with some of
those problems.

There are other issues as well: ArrayObject has had a lively history
of malfunctioning with 5.3 and 5.4, and there are  some odd behaviors
in the object model as well that have been corrected starting in 5.3.7
and up.

Considering PHP 5.3 has already reached end of life status
(http://php.net/archive/2013.php#id2013-07-11-1), upping the minimum
version seems like a good idea.

My question, then is:

- Should we up the minimum required PHP version for ZF2?
- If your answer was no, why not?
- If your answer was yes, what version should become the next
minimum supported PHP version? Why?

NOTE: we are not announcing that we will up the minimum required
version at this time; I'm soliciting feedback so we can make a
decision.

Thanks in advance!

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Re: [zf-contributors] Query: Should ZF2 bump the minimum required PHP version?

2013-11-05 Thread Matthew Weier O'Phinney
On Tue, Nov 5, 2013 at 2:03 PM, Artur Bodera abod...@gmail.com wrote:
 Voting no.

 As much as I'd love to bump it even higher (*ekhem* borked DateTime *ekhem*)
 it will probably confuse the hell out of user base. We've had this
 discussion several times on different occasions (on ml, irc, even some stuff
 on wiki).

 We'll have to live with 5.3.3 until ZF3. With ZF3 we'll have to live with
 5.4.X (which will probably be aligned with most popular revision per linux
 distros) and we'll probably have similar discussions in the future ... and
 for the sake of consistency, my answer will then also probably be no.

Actually, you're mistaken.

We bumped the minimum required version of ZF1 to 5.2.4 (from 5.1.6)
for 1.7. We bumped it again to 5.2.10 or 5.2.12 for either the 1.11 or
1.12 release.

In other words, we HAVE allowed bumps to the PHP version as long as
they happen with a minor release or greater of ZF. That is what I'm
proposing here - a bump with the 2.3.0 release of ZF.



 On Tue, Nov 5, 2013 at 8:55 PM, Stewart Lord sl...@perforce.com wrote:

 My vote is 'no' because (as far as I know) RHEL 6 is currently at 5.3.3
 and we have customers on that distro. This would mean we are stuck on older
 ZF2 at least for a while. Not a huge deal really, but that's my vote FWIW :)

 I also note that Symfony2 is at 5.3.3.

 Stew



 On 2013-11-05 11:34 AM, Matthew Weier O'Phinney wrote:

 Hey, all --

 We're running into a few situations where bumping the minimum required
 PHP version for ZF2 would be useful; in fact, there's at least one
 situation where staying with 5.3.3 actually prevents progress on a few
 issues.

 The specific issue we have is that, until 5.3.9, PHP did not allow the
 following:

  interface Foo
  {
  public function send();
  }

  interface Bar
  {
  public function send();
  }

  class FooBar implements Foo, Bar
  {
  public function send()
  {
  // do something
  }
  }

 Essentially, implementing multiple interfaces that define the same
 method, using the same signature.
 Prior to 5.3.9, this raises an E_FATAL. From 5.3.9 forward, it works.

 Having this would allow us to fix a situation with the way translation
 works across components; not having it means we're stuck with some of
 those problems.

 There are other issues as well: ArrayObject has had a lively history
 of malfunctioning with 5.3 and 5.4, and there are  some odd behaviors
 in the object model as well that have been corrected starting in 5.3.7
 and up.

 Considering PHP 5.3 has already reached end of life status
 (http://php.net/archive/2013.php#id2013-07-11-1), upping the minimum
 version seems like a good idea.

 My question, then is:

 - Should we up the minimum required PHP version for ZF2?
 - If your answer was no, why not?
 - If your answer was yes, what version should become the next
 minimum supported PHP version? Why?

 NOTE: we are not announcing that we will up the minimum required
 version at this time; I'm soliciting feedback so we can make a
 decision.

 Thanks in advance!






-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.2.5 Released!

2013-10-31 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate
availability of Zend Framework 2.2.5! Packages and installation
instructions are available at:

- http://framework.zend.com/downloads/latest

This release includes a security fix for
Zend\Http\PhpEnvironment\RemoteAddress and
Zend\Session\Validator\RemoteAddr; if you use either of these classes,
we urge you to upgrade to 2.2.5 immediately.

We've not had a release in a couple of months, due to an exciting
development: Zend's Zend Framework team has announced an initial
preview release of Apigility, an API builder and management tool,
built on top of Zend Framework 2! If you are building APIs or plan to
in the future, we encourage you to check out this tool and help drive
it toward a stable release!

Security


A developer reported a problem with how we were handling situations
when Zend\Http\PhpEnvironment\RemoteAddress was configured to use
proxies, had a list of trusted proxies, $_SERVER['REMOTE_ADDR'] was
not in that list of trusted proxies. Essentially, we were still
consulting the X-Forwarded-For header in this situation, but should
have been used the provided $_SERVER['REMOTE_ADDR'], according to the
specification.

2.2.5 fixes this situation. If you use that class, or
Zend\Session\Validator\RemoteAddr, you should upgrade immediately.

For more details, visit the ZF2013-04 security advisory:

- http://framework.zend.com/security/advisory/ZF2013-04

Changelog


To see the full changelog, visit:

- http://framework.zend.com/changelog/2.2.5

Thank You!


Thank you to everybody who has contributed to this release. With more
than 70 issues resolved, it's one of the busiest and most robust
releases on the 2.2 branch to-date.

Roadmap


Maintenance releases happen (roughly) monthly on (approximately) the
third Wednesday. We will be gearing up for the next minor release,
2.3.0, soon.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] SSL issue

2013-09-16 Thread Matthew Weier O'Phinney
On Mon, Sep 16, 2013 at 11:02 AM, Bryon Czoch bcz...@uchicago.edu wrote:
 Hi all,

 We recently moved our Horizon server behind SSL an we are now getting this 
 error in Vufind(Built on ZF) on the Record view and cant seem to figure it 
 out:

 Message: Unable to enable crypto on TCP connection libcat.uchicago.edu: make 
 sure the sslcapath option points to a valid SSL certificate directory

 We set sslcapath, sslverifypeer and on our FreeBSD server to no avail.

 This person had a similar issue: 
 http://sourceforge.net/mailarchive/message.php?msg_id=31151754

 Any help would be appreciated,

This is an issue with the underlying stream context being used to
negotiate SSL connections. The most expedient answer, and likely best,
is to use the Curl adapter instead of the default Stream adapter, as
it negotiates SSL more transparently and robustly.



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Question regarding template_path_stack

2013-09-11 Thread Matthew Weier O'Phinney
On Wed, Sep 11, 2013 at 4:07 AM, Juan Pedro Gonzalez
unaputacue...@hotmail.com wrote:
 In a previous post I talked about the development of a theme manager. Talking 
 with Demian he posted a link to VuFind theme system where he uses a specific 
 folder that holds the views for every module view instead of holding the 
 theme files for a specific module inside that module. I'm trying to make the 
 system as flexible as possible and was worried about posible collisions and 
 have been reading more and more code... now I've gotten to a point I think I 
 understand a little better how views work, but I guess I've gone a little 
 mad, so I wanted to check with someone.
 Right now I think the view is loaded through a RouteMatch, that is, if I've 
 got a static route called 'assets' and I call a controller in that route the 
 resulting template will be 'routename/controllername/actionname' for example 
 'assets/css/index.phtml' (Calling the 'assets' route, 'css' controller, 
 'index' action. Is that correct?

No, actually. The template _name_:


{normalized-module-name}/{normalized-controller-name}/{normalized-action-name}

The route name is not considered at all. Additionally, this is only
true if you rely on the framework to inject a template name for you;
if you specify the template name in your view model, that name will be
used.

Also, note that this is a template _name_; how it is resolved is up to
you. By default, we resolve it via an Aggregate resolver that composes
a TemplateMap and TemplatePathStack resolver, with the TemplateMap
taking precedence. The resolver determines the actual view script to
use, including the file suffix.

 If this is the way it works there would be not much of a diference if the 
 views are stored outside or inside the module.

This, however, is correct. Because of the way configuration merging
works, you should be able to map the template to a view script however
you want. We encourage the idea of keeping your templates in the
module that consumes them -- which means if one module wants a
different template then the module it is extending, it should keep
that new version itself, and simply override the location.

 This takes me to a second question: can I set a hook to an event when the 
 module has loaded the template_path_stack configuration? My goal here would 
 be to check if a module has a module-specific theme folder, and, if it does, 
 override the template_path_stack with the theme folder. I know I could do 
 this creating an abstract class or a new Feature for the module, but if 
 possible I would like to make it as seamless as possible... else I'll add a 
 getThemeFolder() in a Feature.

I would do this during the (as of 2.2.0 and up)
Zend\ModuleManager\ModuleEvent::EVENT_MERGE_CONFIG event. At that
point, you can grab the merged configuration, analyze it, make changes
if necessary, and then push it back into the configuration listener:

public function onMergeConfig($e)
{
$configListener = $e-getConfigListener();
if (!$configListener instanceof
\Zend\ModuleManager\Listener\ConfigListener) {
return;
}
$config = $configListener-getMergedConfig(false); // can't
recall why the false is necessary, but it is

// Analyze
// Make changes

// And then re-inject:
$configListener-setMergedConfig($config);
}

Attach the listener during via your module's init() method;
onBootstrap() is too late:

public function init($moduleManager)
{
$events = $moduleManager-getEventManager();
$events-attach(\Zend\ModuleManager\ModuleEvent::EVENT_MERGE_CONFIG,
array($this, 'onMergeConfig'));
}



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Changing Validator in a extending class

2013-09-03 Thread Matthew Weier O'Phinney
On Thu, Aug 29, 2013 at 9:00 AM, Marc Tempelmeier
m.tempelme...@bqs-institut.de wrote:
 i want to change a validator I set in a inputfilter parent class.

 I´ll do that with:

 $validators = 
 $this-get('main')-get('username')-getValidatorChain()-getValidators();

 $validators[2]['instance']-setOptions(
 array(
 'pattern' = '/^[@a-zA-Z0-9_-]+$/',
 )
 );

 I know there is a plugin-Method on the validator chain, but that returns a 
 new instance. Is there a better way to do that?

That's the only way currently to do it, though I'd do it slightly
differently: loop through the validators and compare them via
instanceof to ensure you operate only on the correct type of
validator.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] DI and Controllers in ZF2

2013-08-26 Thread Matthew Weier O'Phinney
On Fri, Aug 23, 2013 at 5:21 PM, Philip G guice...@gmail.com wrote:
 On Fri, Aug 23, 2013 at 3:05 PM, Matthew Weier O'Phinney
 matt...@zend.comwrote:

 Just for argument's sake, why are you using Zend\Di instead of
 Zend\ServiceManager? Is there a compelling reason?


 Purely for the sake of a co-worker's request and desire. He didn't like
 hard coding of a ServiceManager alias name, even if it was an alias. He
 comes from a Java background and rather see DI than SM aliases.

 However, if there is a compelling reason to use SM over DI with ZFW, I
 could easily convince him otherwise.

 In my example, I originally use $sm-get('Firmware\PlatformObject'); and it
 does work perfectly. And he just rather see: $this-getPlatformObject()
 where platformObject is injected into our controller by the framework. I
 wanted to compare the two different approaches, and select the best option.

So, several things are getting conflated here.

First, the way we recommend using the ServiceManager is as an
Inversion of Control (IoC) container -- which, if done correctly, ends
up looking exactly like your co-worker wants. You create service
definitions for each object, and any object that needs dependencies
either has a factory, or makes use of initializers, in order to inject
them.

That addresses the `$this-getPlatformObject()` use case -- as your
factory and/or initializers are injecting it for you.

Second, regarding aliases: we typically recommend using fully
qualified class names in the service manager as well, with the one
exception being several of the well-known MVC services (Application,
ControllerManager, etc.). We recommend using interface names for
aliases, which then allows you to switch implementations without
needing to replace existing factories.

Now, for the compelling reasons to use SM over DI in ZF2:

- it's more performant
- configuration is more straight-forward (you're typically writing
factories in PHP, rather than creating metadata trees)
- completely predictable (DI, due to the nature of the lookups, often is not)
- easy to debug (put breakpoints in your factories, vs debugging framework code)
- used everywhere (all plugin manager implementations are specific SM instances)



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.2.4 Released!

2013-08-26 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate
availability of Zend Framework 2.2.4! Packages and installation
instructions are available at:

- http://framework.zend.com/downloads/latest

This release fixes a regression found in the Form component released
with version 2.2.3; if you use that component, we urge you to upgrade to
2.2.4.

Regressions
---

Version 2.2.3 introduced a regression in the Form component, as a
side-effect of fixing another issue. The preferFormInputFilter flag was
originally created to allow developers to choose whether they wanted to
prefer the input filter they explicitly composed in the form to have
priority, or use the input filter settings the form aggregated from
default elements instead. Interestingly, the form component essentially
enforced the latter situation (prefering what the form aggregated),
making the flag have no semantic meaning.

A side effect of this, however, led to a regression in the InputFilter
component. Starting sometime in the 2.2 series, the behavior of input
merging was changed to merge the old input into the new. In 2.2.3, we
corrected this behavior -- but it broke the default merging order in the
Form component. On inspection, we discovered that the fix to the
InputFilter essentially gave semantic meaning back to the
preferFormInputFilter flag -- but that the default behavior -- which was
to prefer what the form aggregates -- was now flip-flopped.

The fix in 2.2.4 is to enable the preferFormInputFilter flag by default,
thus restoring the previous expected behavior. Additionally, we now
provide the ability to set this flag via form options or the form
factory.

If you use the Form component, we urge you to upgrade to 2.2.4
immediately.

Changelog
-

To see the full changelog, visit:

- http://framework.zend.com/changelog/2.2.4

Thank You!
--

Many thanks to Michaël Gallego and Michael Gooden for helping me
troubleshoot the form issues!

Roadmap
---

Maintenance releases happen monthly on the third Wednesday.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] zend framework 2.2.3 : non required form fields not working anymore?

2013-08-23 Thread Matthew Weier O'Phinney
On Fri, Aug 23, 2013 at 3:27 AM, Wim Kumpen wim.kum...@addemar.com wrote:
 Just checking if someone has the same problem after upgrading from 2.2.2 to
 2.2.3.
 I have a form with validation. After upgrading, the not required fields, are
 suddenly required.

After some discussion with Michael Gallego and tracking down what is
happening under the hood, this is what I discovered:

- Prior to 2.2.3, the `setPreferFormInputFilter()` flag didn't really
do anything, though it was supposed to. The reason it didn't really do
anything is because the order of operations in
`attachInputFilterDefaults()` was incorrect, and was merging inputs
too soon. This had necessitated a strange situation in
`Zend\InputFilter\BaseInputFilter::add()` wherein the old input was
being merged to the new one, and then the new one placed in the input
filter...

- Which was clearly wrong, because it meant that flags and settings in
the new input were getting overwritten by the old ones. For this
reason, issue #4996 was created.

- In fixing #4996, I corrected the behavior in
`attachInputFilterDefaults()`, which now means that you need to call
`setPreferFormInputFilter()` and pass it a boolean `true` if you are
defining forms via configuration and/or using fieldsets or elements
that implement `InputFilterProviderInterface` and/or
`InputProviderInterface`.

So, the way you can get the pre-2.2.3 behavior is to simply do this:

$form-setPreferFormInputFilter(true);

The question I have to everyone is: should that flag be set to true by
default? And, if so, should this be done for an immediate 2.2.4
release, should it wait for the regular 2.2.4 release (third Wednesday
in September), or wait for 2.3.0?

Thoughts?

 Just a part of the code:


 $this-inputFilter = new InputFilter();
 $factory = new InputFactory();

 $this-inputFilter-add(
 $factory-createInput(
 array(
  'name'   = 'website',
  'required'   = false,
  'filters'= array(
  array('name' = 'StripTags'),
  ),
 'validators'  = array(
 array(
 'name'  = 'Uri',
 'options'   = array(
 'uriHandler' = \Zend\Uri\Http,
 'messages'   = array(
 Uri::NOT_URI = The input does not
 appear to be a valid Url,
 )
 )
 )
 )
 )
 )
 );


 I found something in the 'Form' class, 'attachInputFilterDefaults' method.
 Fields like 'email', 'url' are instances of InputProviderInterface and then
 he gets getInputSpecification() ... And that will overwrite my settings. I
 can fix this with setting 'preferFormInputFilter' on true. But I didn't have
 to do that in 2.2.2 so ...


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] DI and Controllers in ZF2

2013-08-23 Thread Matthew Weier O'Phinney
On Fri, Aug 23, 2013 at 4:52 PM, Philip G guice...@gmail.com wrote:
 I read around that DI works on our controllers, just by supplying our
 instance, and our DI parameters. However, I can't seem to get it working
 with 2.2.2. I added my controller to allowed_controllers, and it's still
 not working.

Just for argument's sake, why are you using Zend\Di instead of
Zend\ServiceManager? Is there a compelling reason?

I tend to steer people away from Zend\Di, as the configuration gets
tricky, and we have a lot of unsolved edge cases in the code base. On
the other hand, Zend\ServiceManager is well-maintained and
well-understood.



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Rendering Element Collection

2013-08-22 Thread Matthew Weier O'Phinney
On Wed, Aug 21, 2013 at 4:31 PM, Juan Pedro Gonzalez
unaputacue...@hotmail.com wrote:
 Is there an easy way to render form element collections. I need to group some 
 elements of the fieldset in DIVs and haven't found an easy way to do so?

Yes, via the formRow() view helper:

echo $this-formRow($fieldsetOrForm);

It will use whatever standard markup we have defined in the other
form-related view helpers.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.2.3 Released!

2013-08-21 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate
availability of Zend Framework 2.2.3! Packages and installation
instructions are available at:

- http://framework.zend.com/downloads/latest

This is the third monthly maintenance release in the 2.2 series.

Changelog
-

This release features over 25 changes. Some notable changes include:

- An update that ensures the filter and validator plugin managers are
  injected into the input filter factory when using the form factory.
  (https://github.com/zendframework/pull/4851)
- Fixes to code generation to ensure use statements are unique, and that
  non-namespaced class generation is possible.
  (https://github.com/zendframework/pull/4988 and
  https://github.com/zendframework/pull/4990)
- A fix to input filters and forms to ensure overwriting of inputs and
  input filters happens correctly.
  (https://github.com/zendframework/pull/4996)

To see the full changelog, visit:

- http://framework.zend.com/changelog/2.2.3

Thank You!
--

I'd like to thank everyone who provided issue reports, typo fixes,
maintenance improvements, bugfixes, and documentation improvements; your
efforts make the framework increasingly better!

Roadmap
---

Maintenance releases happen monthly on the third Wednesday.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Controllers, views, library... where to manipulate data?

2013-08-14 Thread Matthew Weier O'Phinney
On Wed, Aug 14, 2013 at 8:39 AM, András Csányi sayusi.a...@sayusi.hu wrote:
 The concern I have is related rather programming style than the
 framework itself. On the other hand, I'm not a programmer, I'm just
 spending my time writing programs in different languages.

 I want to display a menubar where a menu belongs to a category. I have
 a menu table and a category table, both has its Model. So, in the
 controller I fetch the data from both table and I have to merge them
 into an array. I can do it in the controller, in the view .phtml file
 and in an external library like class.

 So, what is the proper solution if I follow the design patterns thinking?
 - manipulating data in the controller class which can cause big, huge
 methods and on the other hand, reusing the code is not possible
 - manipulating in the view file. To be honest, I feel it very
 uncomfortable because the data should be manipulated somewhere else,
 manipulating is not part of the displaying
 - manipulating in a library class, where the logic clearly separated
 from the controller and the view and possible to reuse easily.

As you're already discovering, there's more than one way to do these
things. The problem is keeping a clean separation of concerns.

I personally would do this somewhere in the model layer, but not
necessarily directly in the various entity/value objects. Instead,
create a view model for representing the information, pass your
model(s) to it, and have this class extract the information it needs:

$menuData = new MenuViewModel($menuTable, $categoryTable);

Inside, it might grab the data and merge it, remove keys, create
composite keys, etc. It doesn't have to extend
Zend\View\Model\ViewModel, either -- this is simply a way to create a
translation layer between the model layer and how you want to
represent it.

This removes the logic from the controller, as well as the view, and
helps you describe in programmatic terms the relations between the
various data sources and the representation of them.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF2, matched by routing

2013-08-14 Thread Matthew Weier O'Phinney
',
 'action' = 'index',
 ),
 ),
 ),
 ),
 ),

 'view_manager' = array(
 'display_not_found_reason' = true,
 'display_exceptions'   = true,
 'doctype'  = 'HTML5',
 'not_found_template'   = 'error/404',
 'exception_template'   = 'error/index',
 'template_map' = array(
 'layout/layout'   = __DIR__ .
 '/../view/layout/front-layout.phtml',
 'layout/frontlayout'   = __DIR__ .
 '/../view/layout/front-layout.phtml',
 'frontapp/index/index' = __DIR__ .
 '/../view/front-app/index/index.phtml',
 'error/404'   = __DIR__ . '/../view/error/404.phtml',
 'error/index' = __DIR__ . '/../view/error/index.phtml',
 ),
 'template_path_stack' = array(
 'front' = __DIR__ . '/../view',
 'searcher' = __DIR__ . '/../view',
 'detail' = __DIR__ . '/../view',
 'user' = __DIR__ . '/../view',
 'confirm' = __DIR__ . '/../view',
 ),
 ),
 'module_layouts' = array(
 'FrontApp' = 'layout/frontlayout',
 'BackApp' = 'layout/backlayout',
 ),);

 /pre

 so when i try :

 mywebsite/ - work

 mywebsite/one-type - work

 mywebsite/one-type/one-location - don't work

 mywebsite/one-type/one-location/on-id - don't work

 mywebsite/connexion -work

 mywebsite/confirm -work

 I'm little bit confused because its like you can't use different route type.
 So, for the route that don't work i either have Unable to render
 template layout/layout... error which is resolve when i add 'layout/layout'
 with the same path that 'layout/frontlayout' in template_map key (i also
 don't really understand why but it work, so if you can enlighten me, i will
 be very thankful), or, a The requested URL could not be matched by
 routing. and for this error, i'm stuck because i don't see where is the
 issue :/

 hope you can help :)



 --
 View this message in context: 
 http://zend-framework-community.634137.n4.nabble.com/ZF2-matched-by-routing-tp4660753.html
 Sent from the Zend Framework mailing list archive at Nabble.com.

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Re: ZF2, matched by routing

2013-08-14 Thread Matthew Weier O'Phinney
On Wed, Aug 14, 2013 at 11:22 AM, ravidhu ravidhu.di...@gmail.com wrote:
 thanks for your answer, so i test your config with the following url :

  mywebsite - work

  mywebsite/ - work

  mywebsite/one-type - work

  mywebsite/one-type/one-location - work but i get the detail view file

You can fix that within the controller, by specifying the template in
the view model you return; if you're not returning a view model, do.

  mywebsite/one-type/one-location/on-id - still don't work : The requested
 URL could not be matched by routing.

This makes sense -- the constraint regex you set for :id does not
include the - character; you specified [0-9]+. If you want
alphabetical characters and hyphens, you'll need to add those to the
constraint: [a-z0-9-]+

  mywebsite/connexion -work

  mywebsite/confirm -work



-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Array Filtering Validation

2013-08-12 Thread Matthew Weier O'Phinney
On Tue, Aug 6, 2013 at 1:12 PM, SiCo si...@sico.co.uk wrote:
 Hi, I'm just playing with Zend InputFilter and am wondering whether it can
 filter arrays (i.e. filter each element of the passed array as an int)? My
 experiments so far don't bode well so I imagine it hasn't made it in. I
 thought the old filter_input did it?

 i.e. array(0 = '1', 1 = '2', 2 = '3'); etc.

 Hopefully I'm just missing a flag or doing it wrong!

 How does a form handle validation of multi checkboxes, is that handled in
 the form or InputFilter?

Filtering !== validation...

For multi checkboxes, radios, and multi-selects, we have an Explode
validator, that is used to validate each element of an array against
another validator chain. However, we do not pre-filter the values _in_
the array. The reason is that with the above form types, if the value
is not valid, somebody is most likely tampering with the input values
before submitting them.

Currently, if you want to filter all values of a submitted array,
you'll need to write a pre-processor of some sort to do that.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] is possoble access to value of headTitle in my controller?

2013-08-12 Thread Matthew Weier O'Phinney
Yes, but only if you (a) inject the headTitle helper into your
controller, and/or (b) inject the view helper plugin manager into your
controller, and/or (c) cheat, and pull (b) from the composed service
locator.

For (c):

$headTitle =
$this-getServiceLocator()-get('ViewHelperManager')-get('HeadTitle');

(a) is more programmatically correct, as it conforms better to
separation of concerns, inversion of control, etc. To do that, you'd
need to create a factory for your controller:

function ($controllers) {
$services = $controllers-getServiceLocator();
$helpers  = $services-get('ViewHelperManager');
$helper= $helpers-get('HeadTitle');
$controller = new MyController($helper);
return $controller;
}


On Fri, Aug 9, 2013 at 4:31 PM, zamanphp zaman...@gmail.com wrote:




 --
 View this message in context: 
 http://zend-framework-community.634137.n4.nabble.com/is-possoble-access-to-value-of-headTitle-in-my-controller-tp4660739.html
 Sent from the Zend Framework mailing list archive at Nabble.com.

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Service Manager issue in the Getting started tutorial

2013-08-12 Thread Matthew Weier O'Phinney
On Sat, Aug 10, 2013 at 10:42 AM, András Csányi sayusi.a...@sayusi.hu wrote:
 I'm going through the Getting started Zend Framework 2 tutorial and I
 got the error message below at this [1] part of the material:

 Zend\ServiceManager\ServiceManager::get was unable to fetch or create
 an instance for Zend\Db\Adapter\Adapter

Typically when this happens, one of the following has happened:

- If you're using SQLite, the file permissions may be such that the
web server cannot read and/or write to the file. Check the permissions
of the database file.
- If you're using MySQL, PostgreSQL, etc., make sure that your DB
settings are correct: is the host correct? Are the credentials
correct? Was the correct database specified? etc.

Check these, and if you're still having issues, post back to the list.

 [1] - 
 http://framework.zend.com/manual/2.0/en/user-guide/database-and-models.html#using-servicemanager-to-configure-the-table-gateway-and-inject-into-the-albumtable

 I googled around and I found that not I'm the only one who have to
 face this issue [2] and [3], etc. But those articles are about
 developer version of ZF2, however, I'm using ZF 2.2.2.

 [2] - 
 http://stackoverflow.com/questions/11355126/how-do-i-get-the-service-manager-in-zend-framework-2-beta4-to-create-an-instance

 [3] - 
 http://stackoverflow.com/questions/11688260/servicenotfoundexception-in-zendframework-2-example-from-rob-allen

 I have tried every solution described these articles and suggested by
 the community without any success. My question is that is there any
 solution for this problem? Does anybody has a link which describe a
 working solution for this?

 Thanks for any help in advance!

 András

 --
 --  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
 http://facebook.com/andras.csanyi
 --  Trust in God and keep your gunpowder dry! - Cromwell

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Dynamic Controller return data.

2013-08-12 Thread Matthew Weier O'Phinney
On Thu, Aug 8, 2013 at 11:54 AM, Philip G guice...@gmail.com wrote:
 I need some direction as to where I need to go about injecting some code to
 do some dynamic editing of controller return data.

 Situation:
  - Our REST application has the ability to overload the return response
 data to flip between JSON and XML. While we use Accept headers, we default
 to XML return (even if viewed in browser).

 I need to capture the array return data from Controller methods
 (AbstractRestfulController) and convert the data to either a View\JsonModel
 or View\XmlModel (custom).

 In addition, when converting, I need the View Strategies to trigger. -

I'd do the following:

- Create renderers specific to the various response types (unless
there are default renderers available)
- Create view models specific to each renderer (unless they already exist)
- Create view strategies that select the appropriate renderer based on
view model (unless one already exists). These strategies should also
have a response listener that injects the content-type.
- Use the AcceptableViewModelSelector controller plugin to retrieve a
view model in your controller, and pass your variables to that: $model
= $this-acceptableViewModelSelector($criteria);
$model-setVariables(/* ... */); return $model;

What this does is ensure that your controller code remains agnostic to
the view layer, while allowing the appropriate renderer to trigger.

Hopefully that makes sense; follow-up if you need more details.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] will ZF2 support pdo_mssql someday???

2013-08-05 Thread Matthew Weier O'Phinney
On Fri, Aug 2, 2013 at 9:37 PM, vtsuper vtsuper...@gmail.com wrote:
 Starting from php 5.3 it won't come with pdo_mssql.dll and change to
 pdo_sqlsrv(it support MSSQL 2005 or later).
 and I can't found pdo_mssql in zf2 anymore. So zf2 wont support pdo_mssql or
 MSSQL 2000 anymore or it is still under develope?

pdo_mssql is considered obsolete. pdo_sqlsrv doesn't support the full
dialect that the sqlsrv extension does. Additionally, you won't have
pdo_sqlsrv generally without also having the sqlsrv extension, so
we've made the decision to support only the sqlsrv extension.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF2 - Retrieve navigation in Controller ?

2013-07-30 Thread Matthew Weier O'Phinney
On Tue, Jul 30, 2013 at 4:06 AM, MichaelB mr...@mckanes.com wrote:
 I need to retrieve my navigation in my controllers (i need breadcrumbs
 element to be in the JsonModel) for some ajax request.

 My navigation is generated by a service class that extend
 DefaultNavigationFactory. In my Layout, is no problem. I can use
 $this-navigation()-breadcrumbs()...


 So, in my controller, i can retrieve my service like that:
 $container = $this-getServiceLocator()-get('NavigationAdmin');


 But now, how to retrieve the breadcrumbs or menu with $container ?

Those are actually two separate things -- the navigation container in
the service manager is a top-level object from the Zend\Navigation
component. The view helper navigation gives you access to this
container, but then provides access to additional view helpers -- that
what breadcrumbs and menu actually are, view helpers.

If you want access to those inside your controller, you will have to
inject them. You can do this by creating a factory for your
controller, and within that factory pulling the ViewHelperManager from
the service manager, and then the individual view helpers.

That said, I'd rethink _why_ you want access to the menu and
breadcrumbs in your controller. Usually, if you start mixing view
logic into controllers, it's a sign that you're mixing concerns that
shouldn't be.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF 1 EOL Policy

2013-07-29 Thread Matthew Weier O'Phinney
On Mon, Jul 29, 2013 at 7:35 AM, Timothy Choi tyteen4...@gmail.com wrote:
 Are there any current policies on how ZF1's EOL will be handled? Is
 the early 2014 date stated on ZF2 FAQ still correct?

The stated EOL was 18 to 24 months following a stable 2.0 release,
which puts the date somewhere between April and October of 2014; I
need to discuss with Zend management and the community review team
about specific dates.

Once the EOL is reached, we will no longer be updating the repository;
it will essentially be locked on whatever the last version is that we
release. We _may_ do security updates for longer; whether or not that
will happen, and how and for how long, is still to be determined.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.2.2 Released!

2013-07-24 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate
availability of Zend Framework 2.2.2! Packages and installation
instructions are available at:

http://framework.zend.com/downloads/latest

This is the second monthly maintenance release in the 2.2 series.

Changelog
-

This release features over 60 changes. Some notable changes include:

- The cURL adapter for Zend\Http will no longer double-decode
  gzip-encoded bodies. (#4555)
- A headLink() method was added to the HeadLink view helper so that its
  usage matches the documentation. (#4105)
- The validator plugin manager was updated to include the new
  PhoneNumber validator. (#4644)
- Abstract methods in the AbstractRestfulController were made
  non-abstract, and modified to set a 405 (Method Not Allowed) status.
  (#4808)

To see the full changelog, visit:

http://framework.zend.com/changelog/2.2.2

Thank You!
--

I'd like to thank everyone who provided issue reports, typo fixes,
maintenance improvements, bugfixes, and documentation improvements; your
efforts make the framework increasingly better!

Roadmap
---

Maintenance releases happen monthly on the third Wednesday. Version
2.3.0 is tentatively scheduled for September.


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Detect request path in Module

2013-07-18 Thread Matthew Weier O'Phinney
On Thu, Jul 18, 2013 at 9:01 AM, Norbert Máté mt.norb...@gmail.com wrote:
   I want to detect if the request is for a module and setup some thing only
 that case. I have found a solution:

 $matched = $router-match($request);
   if ($matched  $matched-getMatchedRouteName() == 'rest-api')

 My problem with this is that it detects the route and not the module. If I
 have to setup things for all the functions in a module than I will have to
 add here all the routes.

 Is there a better way?

Yes -- use events!

Here's an example: https://gist.github.com/weierophinney/6030213

Essentially, you listen to the route event, after routing has
occurred. If the matched controller has the same namespace as your
module, you do something.

--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF2 Routing question

2013-07-18 Thread Matthew Weier O'Phinney
On Thu, Jul 18, 2013 at 3:21 PM, Tomasz Kuter evo...@interia.pl wrote:
 Hi all,

 I am working on own CMS system in Zend Framework 2.
 It means I will have frontend and backend site.

 I would like to have backend at following url:
 /admin

 In administration panel there will be a few sections at the beginning e.g.
 webpages, news, media.
 These sections will be available as follow:
 /admin/webpages
 /admin/news
 /admin/media

 Each section has many actions e.g. add, edit, delete.

 I would like to have following modules:
 1. admin (general functionality)

 2. website (webpages management)
 a) index controller (frontend)
 b) admin controller (backend)

 3. news (news management)
 a) index controller (frontend)
 b) admin controller (backend)

 4. etc

 Currently I have all admin routes in file
 /module/Admin/config/module.config.php

 Is there a possibility to keep main /admin route in mentioned file,
 and sections route (e.g. /admin/webpages) in separate modules?


There's a module for that: https://github.com/ZF-Commons/ZfcAdmin

Essentially, it allows you to define your admin controllers and views
in the modules in which the functionality is defined, but then tie
into a centralized admin interface via routing.



--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Problem with radio buttons in form annotations

2013-07-17 Thread Matthew Weier O'Phinney
On Fri, Jul 12, 2013 at 1:50 AM, Jigal sanders jigalroe...@gmail.com wrote:
 Hi I am trying to create radio buttons based on a boolean  in my entities
 like this:

 /**
  *
  * visible - default false
  * @ORM\Column(type=boolean)
  * @Annotation\Type(Zend\Form\Element\Radio);
  * @Annotation\Options({
  *  label:Here are your choices:,
  *  value_options:{1:Yes, 0:No}});
  */
 protected $visible;

 But it gives this error:


 Zend\Form\View\Helper\FormMultiCheckbox::render requires that the
 element is of type Zend\Form\Element\MultiCheckbox

A few questions:

- Can you var_dump or inspect the element once you have the form to
determine what object type was created? My guess is that a Radio
element was not created, but I'm curious what _was_.

- Have you tried creating the element manually and rendering it? If
so, does it work? If not, what version of PHP and what version of ZF2
are you using?



 And my stacktrace

 Stack trace:
 #0
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\Form\View\Helper\FormMultiCheckbox.php(89):
 Zend\Form\View\Helper\FormMultiCheckbox-render(Object(Zend\Form\Element\Checkbox))
 #1 [internal function]:
 Zend\Form\View\Helper\FormMultiCheckbox-__invoke(Object(Zend\Form\Element\Checkbox))
 #2
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\View\Renderer\PhpRenderer.php(400):
 call_user_func_array(Object(Zend\Form\View\Helper\FormRadio), Array)
 #3 C:\wamp\www\myApp\module\MyApp\view\myApp\overview\edit.phtml(11):
 Zend\View\Renderer\PhpRenderer-__call('formRadio', Array)
 #4 C:\wamp\www\myApp\module\MyApp\view\myApp\overview\edit.phtml(11):
 Zend\View\Renderer\PhpRenderer-formRadio(Object(Zend\Form\Element\Checkbox))
 #5
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\View\Renderer\PhpRenderer.php(507):
 include('C:\wamp\www\kas...')
 #6
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\View\View.php(205):
 Zend\View\Renderer\PhpRenderer-render(Object(Zend\View\Model\ViewModel))
 #7
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\View\View.php(233):
 Zend\View\View-render(Object(Zend\View\Model\ViewModel))
 #8
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\View\View.php(198):
 Zend\View\View-renderChildren(Object(Zend\View\Model\ViewModel))
 #9
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\Mvc\View\Http\DefaultRenderingStrategy.php(102):
 Zend\View\View-render(Object(Zend\View\Model\ViewModel))
 #10 [internal function]:
 Zend\Mvc\View\Http\DefaultRenderingStrategy-render(Object(Zend\Mvc\MvcEvent))
 #11
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(468):
 call_user_func(Array, Object(Zend\Mvc\MvcEvent))
 #12
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(207):
 Zend\EventManager\EventManager-triggerListeners('render',
 Object(Zend\Mvc\MvcEvent), Array)
 #13
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php(347):
 Zend\EventManager\EventManager-trigger('render', Object(Zend\Mvc\MvcEvent))
 #14
 C:\wamp\www\myApp\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php(322):
 Zend\Mvc\Application-completeRequest(Object(Zend\Mvc\MvcEvent))
 #15 C:\wamp\www\myApp\public\index.php(12): Zend\Mvc\Application-run()
 #16 {main}



 Any idea's why it's trying to create a multiCheckbox in stead of radio
 buttons?






 kind regards,


 Jigal



--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] ZF2 - object instantiation

2013-07-17 Thread Matthew Weier O'Phinney
On Wed, Jul 17, 2013 at 9:44 AM, Björn Rylander hassl...@gmail.com wrote:
 I'm a little confused regarding the proper ZF2 pattern for object
 instantiation. I had come to the conclusion that all objects should be
 instantiated with factories. But looking at the Album tutorial I can see
 that the Album object and the AlbumForm object are directly instantiated in
 the AlbumController::addAction(). So, what is the ZF2 pattern for
 instantiating objects? Is there a rule when factories should be used or not
 used?

The rules of thumb are:

- will I need the same instance, OR
- will I need an instance using non-trivial instantiation (e.g.,
wanting to tie into existing initializers), OR
- will I need to be able to substitute an extending class/alternate
implementation

If the answer is any of the above is yes, it's likely a service, and
should be managed by the ServiceManager.

In the tutorial, the form is only used in one location, and has a very
specific set of rules. Tthe Album object is a result of querying the
database; we provide a _prototype_ instance that the result set can
hydrate when results are available.

If the object is a result of calculation, or a one-off, direct
instantiation is fine, and encouraged.

--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Question about ZF2 License

2013-06-30 Thread Matthew Weier O'Phinney
On Fri, Jun 28, 2013 at 5:56 PM, pauloelr paulo...@gmail.com wrote:
 I was cleaning up some of my projects using Zend Framework 2 and faced a
 doubt about License either in main project of ZF2 and on ZendSkeletonModule
 and ZendSkeletonApplication repositories: there is a file on root of main
 project and modules named license.txt with the license, in the first item of
 the license says that you must include this file with the project and i
 tottaly agree with that, perhaps if you start including many modules in your
 project will be a lot of identicaly files in the project, one in vendor
 folder, and one in wich module you add plus one more on the root of your
 project.

 So i'm wonderig if this is not the case to mantain only one copy of this
 file in the zend framework main project (in vendor folder) and remove this
 file from ZendSkeletonApplication and ZendSkeletonModule?

Technically, you only need to keep the copyright and license
annotations in each classfile; the LICENSE.txt does not need to be
retained, as these link to it.


 Besides that license files a feel other files also have a comment with the
 following information on top:

 /**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link http://github.com/zendframework/ZendSkeletonApplication for the
 canonical source repository
 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc.
 (http://www.zend.com)
 * @license http://framework.zend.com/license/new-bsd New BSD License
 */

 My question about this is if i can remove this comment and replace for the
 infromation about the application i'm developing since most of files that
 contains this disclaimer will be used only as sekeleton for the code i will
 provide?

 Thanks



 --
 View this message in context: 
 http://zend-framework-community.634137.n4.nabble.com/Question-about-ZF2-License-tp4660510.html
 Sent from the Zend Framework mailing list archive at Nabble.com.

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Unable to get configuration when calling from unit tests

2013-06-24 Thread Matthew Weier O'Phinney
On Thu, Jun 20, 2013 at 11:08 PM, Marco Pivetta ocram...@gmail.com wrote:
 As said on the doctrine ML (don't crosspost if you didn't get a reply
 immediately), I think the only problem here is that the zend skeleton
 module bootstrap (in its current state) is a mess.

Can you elaborate, please? and/or suggest a better solution?


--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Controller Plugin for service all in one or ....

2013-06-24 Thread Matthew Weier O'Phinney
On Fri, Jun 21, 2013 at 2:09 PM, whisher whishe...@gmail.com wrote:
 I'm wondering what's the best way
 to implement Controller Plugin
 Do I put all the services in a single plugin
 with an unique key in getControllerPluginConfig
 or put each service in a dedicate plugin and key ?

I don't understand the question. Can you give some examples of usage
and what you're trying to accomplish?



--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] zf2 - FlashMessenger not rendering messages

2013-06-24 Thread Matthew Weier O'Phinney
On Mon, Jun 24, 2013 at 8:42 AM, tonystamp tonyst...@hotmail.co.uk wrote:
 I am trying to use the flashmessenger controller/view plugin but i am not
 getting any output at all.

 In my controller i have:
 LocationController:
 /
   public function addAction(){
 /* snip */
 $this-flashMessenger()-addMessage('New location successfully
 added.');
 $this-redirect()-toRoute('location', array('action' ='list'));
 }

 public function listAction(){
 return array();
 }/

 ..and in my list.phtml view:
 /echo $this-flashMessenger()-render();/

 I have tried all different sorts (addInfoMessage with render('info') for
 example) but the messages do not seem to be filtering through. If i
 var_dump($this-flashMessenger()-getMessages()) in my view the script just
 hangs :?

Reminder: FlashMessenger is designed for messages to be displayed on
the NEXT request, not the current one. If you will be displaying
messages in the current request, simply return them as part of your
view model.



--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Re: zf2 - FlashMessenger not rendering messages

2013-06-24 Thread Matthew Weier O'Phinney
On Mon, Jun 24, 2013 at 4:27 PM, tonystamp tonyst...@hotmail.co.uk wrote:
 Agree. So does the redirect controller plugin not constitute another request?

Only if you return and send the response immediately. If you're still
returning a view model/array from your controller, you'll run into
issues. It's only on the next request, to the page you're redirected
to, that the messages you put in the FlashMessenger will be
accessible.


--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] Re: Populating a submit element?

2013-06-12 Thread Matthew Weier O'Phinney
On Wed, Jun 12, 2013 at 6:41 AM, Andreas Möller a...@localheinz.com wrote:
 No they wouldn't, so don't pass it to setData. But I should imaging people 
 would want to set the value on the submit element programtically, I don't 
 think there is a distinction between posted form data and normal setter 
 data, I think that may be the issue?

 The problem I see with this is that then, you would have to fiddle with the 
 form and request data and need to check whether the request data contains a 
 value for a submit element (which the form may or may not have).

 Typically, in a controller action I would just retrieve the data from the 
 postRedirectGet-plugin and pass it on to the form without worrying about the 
 details of what elements the form contains or for what elements data is 
 present in the requested data. Don't you agree?

Not really. Usually I don't associate validation with submit buttons,
so I don't care. That said, I see your point about the *view* *layer*,
where we may not want to set the value on it.

That said, if they do, the only time I'd worry about it is if I'm
doing switches based on the submit value. In such a case, though, you
simply have a default case that reports an error.

 I believe that $form-populateValues() should not populate submit elements.

I disagree with that. There are use cases where the submit value might
change -- you may have several buttons with the same name but
different values, and those may be used for branching or even be
something you want persisted. Making a blanket case that they should
never be included is problematic, especially as you can easily restore
the value if necessary, or handle it via validation.

--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] How to use Zend\Session\Service\SessionConfigFactory

2013-06-12 Thread Matthew Weier O'Phinney
Ralf --

Take a look at the original PR that contains the new factories, as it
has examples showing how to use the various Session factories:

- https://github.com/zendframework/zf2/pull/4268

Note that they are not fully integrated into the various session
consumers in the framework yet; there's some issues we need to address
first. That said, in your own factories, you can then pull the session
service, individual containers, etc. and inject them into the objects
you need.

On Wed, Jun 12, 2013 at 9:49 AM, Ralf Eggert r.egg...@travello.de wrote:
 Hi,

 ok, it does work like this:

 ==
 class Module implements
 BootstrapListenerInterface,
 ConfigProviderInterface,
 AutoloaderProviderInterface
 {
 public function onBootstrap(EventInterface $e)
 {
 // configure session

 $e-getApplication()-getServiceManager()-get('Zend\Session\Config\ConfigInterface');
 }
 }
 ==

 But still I would expect that I don't need this step to get it run.

 Comments?

 Regards,

 Ralf

 --
 List: fw-general@lists.zend.com
 Info: http://framework.zend.com/archives
 Unsubscribe: fw-general-unsubscr...@lists.zend.com





-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




Re: [fw-general] How to use Zend\Session\Service\SessionConfigFactory

2013-06-12 Thread Matthew Weier O'Phinney
On Wed, Jun 12, 2013 at 3:19 PM, Ralf Eggert r.egg...@travello.de wrote:
 Take a look at the original PR that contains the new factories, as it
 has examples showing how to use the various Session factories:

 - https://github.com/zendframework/zf2/pull/4268

 Actually, that PR was the only piece of documentation I found which I
 used to set up the SessionConfigFactory.

 Note that they are not fully integrated into the various session
 consumers in the framework yet; there's some issues we need to address
 first. That said, in your own factories, you can then pull the session
 service, individual containers, etc. and inject them into the objects
 you need.

 Ok, that is clear when it comes to the session manager or session
 container stuff. But for the session configuration I would typically
 need that within the bootstrapping process because the session should be
 setup on each request. It does feel a little weird to request a service
 from the service manager to change the session configuration. Since I
 guess it is a basic feature will it not make sense to initialize the
 SessionConfigFactory automatically whenever a session_config block is
 found in the configuration data?

Not necessarily, actually. There's overhead in starting a session -
whatever save handler you have configured has to grab the existing
session from storage. If your page doesn't require a session, that's
overhead you don't need -- e.g., if it's a static page with no dynamic
elements, or API endpoints, etc.

So, typically, you'll grab the session and inject it into services
that interact with it (flash messenger, controllers, auth, etc.) --
that way, the session is only initialized when you actually need to
interact with it. This is, of course, why we haven't integrated it
entirely yet -- we have some open questions about how/when that should
happen. For now, you will initialize it when you need it. If that's on
every page, then do it via a bootstrap event listener.


--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[fw-general] Zend Framework 2.2.1 Released!

2013-06-12 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate
availability of Zend Framework 2.2.1! Packages and installation
instructions are available at:

- http://framework.zend.com/downloads/latest

This is the first monthly maintenance release in the 2.2 series.

Changelog
-

This release features almost 70 changes, ranging from minor
typographical issues to changes to allow easier utilisation of new
features introduced in 2.2 (e.g., you can now actually select the new
TranslatorAwareTreeRouteStack as a router via configuration). The full
changelog for 2.2.1 is available:

- http://framework.zend.com/changelog/2.2.1

Thank You!
--

I'd like to thank everyone who provided issue reports, typo fixes,
maintenance improvements, bugfixes, and documentation improvements; your
efforts make the framework increasingly better!

Roadmap
---

Maintenance releases happen monthly on the third Wednesday. Version
2.3.0 is tentatively scheduled for the end of August.


--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




  1   2   3   4   5   6   7   8   9   10   >