Zend\Mvc\Router\Console\Simple not compatible with older versions of pcre (and therefore CentOS) #4134

Closed
rurri opened this Issue Mar 28, 2013 · 2 comments

Projects

None yet

2 participants

@rurri

Version 6.x of PCRE does not recognize ?< as a valid preg_match command.

It DOES recognize ?P<

A Search and replace on all instances in this file of ?< with ?P< fixes the issue.

php documentation states that both ?< and ?P< are allowed, so changing this will allow CentOS and other OS's built on an older version of PCRE to work while not breaking newer versions.

From http://php.net/manual/en/function.preg-match.php:
"Named subpatterns now accept the syntax (?) and (?'name') as well as (?P). Previous versions accepted only (?P)."

@DASPRiD
Zend Framework member

Since you already replaced all occurrences, do you mind opening a PR for it?

@rurri

PHPUnit failures prior to change: https://gist.github.com/rurri/5265889

Now yields:

phpunit ZendTest/Mvc/Router/Console/SimpleTest.php
PHPUnit 3.7.19 by Sebastian Bergmann.

Configuration read from /home/jchambers/zf2/tests/phpunit.xml.dist

................................................................. 65 / 83 ( 78%)
..................

Time: 0 seconds, Memory: 5.75Mb

OK (83 tests, 266 assertions)

@weierophinney weierophinney added a commit that closed this issue Mar 28, 2013
@weierophinney weierophinney Merge branch 'hotfix/4138'
Close #4138
Fixes #4134
5ecfed9
@ghost Unknown pushed a commit that referenced this issue Jul 14, 2013
@weierophinney weierophinney Merge branch 'hotfix/4138'
Close #4138
Fixes #4134
7b53535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment