I would like to bump this up, as unless this problem has been fixed in > 2.0.7 it most likely still exists.
The problem originates in the \Phalcon\Mvc\Url::get function. When the reverse routing happens, the pattern is cut short by 1 char when :int is used. So, for example for route "/view/:int/print" gets replaced as "/view/4/prin" as the op has presented.
The bigger problem is when you have a second regex condition in the route e.g. "/view/:int/(notes|history)". The use of ":int" breaks the regex and it can't fill in the option when using "$url->get(array('for'=>'view-specific', 'id'=>4, 'display'=>'notes'))". The uri generated is "/view/4/". When defining the route, if "([0-9]+)" is used instead of ":int", the output is "/view/4/notes" as expected.
So, the current solution seems to be to use the regex instead of ":int", but :int is nice and it would be good if fixed!
Sample route:
[code]
$group->add('/view/:int/(notes|history)', array(
'controller' => 'index',
'action' => 'testview',
'id' => 1,
'display' => 2
))->setName('testview');
[/code]
[code]
Sample URI reverse route call
$this->uri->get(array(
'for' => 'testview',
'id' => 4,
'display' => 'notes'
));
[/code]