Hotfix/zend test with console route #4010

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@blanchonvincent
Contributor

Fix split on space to retrieve argument console. I used array and temporary string to fix, but i am sure a regex can be better.

Contributor

I will test with regex, it's will be more clean.

farnoux commented Mar 12, 2013

FYI I worked on this last night and came up with the following code (using a regex):

if ($this->useConsoleRequest) {
        preg_match_all('/(--\S+[= ]"\S*\s*\S*")|(--\S+=\S+|--\S+\s\S+|\S+)/', $url, $matches);
        $params = str_replace(array(' "', '"'), array('=', ''), $matches[0]);
        $request->params()->exchangeArray($params);
        return $this;
}
Contributor

I change the PR with the regex and add test case.

@farnoux Thank you for your help !

farnoux commented Mar 12, 2013

My pleasure! Glad it helped :)

@weierophinney weierophinney added a commit that referenced this pull request Mar 12, 2013
@weierophinney weierophinney [#4010] CS fixes
- trailing whitespace
b4b8793
@weierophinney weierophinney added a commit that referenced this pull request Mar 12, 2013
@weierophinney weierophinney Merge branch 'hotfix/4010' into develop
Forward port #4010
3659323
@weierophinney weierophinney added a commit that closed this pull request Mar 12, 2013
@weierophinney weierophinney Merge branch 'hotfix/4010'
Close #4010
087f459
@curious-eyes curious-eyes added a commit to curious-eyes/zf2 that referenced this pull request Mar 18, 2013
@weierophinney @curious-eyes weierophinney + curious-eyes [#4010] CS fixes
- trailing whitespace
e8fc3cf
@weierophinney weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#4010 from blanchonvinc…
…ent/hotfix/zend-test-with-console-route

Hotfix/zend test with console route
5c73b74
@weierophinney weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
@weierophinney weierophinney [zendframework/zendframework#4010] CS fixes
- trailing whitespace
55e1820
@weierophinney weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/4010' d13dd3d
@weierophinney weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'hotfix/4010' into develop f716062
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment