yiisoft / yii

Yii PHP Framework 1.1.x
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
4.84k stars 2.28k forks source link

Upgrading to version 1.1.17+ broke my routes. #4542

Closed trigger202 closed 10 months ago

trigger202 commented 10 months ago

What steps will reproduce the problem?

I am having issues with broken links after upgrading from Yii 1.1.13 to 1.1.28 this because of the change made in Yii .1.17 regarding `parsingOnly' attribute in UrlRule.

I noticed any route that has optional parameter fails 'pattern' => 'agent/<action:(start)>(/<reference:([A-Za-z0-9\-]+)>)?' which should match /agent/start/1F21-2K1I-INS

What is the recommended solution for this?

I have many routes and hesitant about breaking my application.

one thing that worked for me so far is to separate into mutliple rules.

What is the expected result?

'pattern' => 'agent/<action:(start)>(/<reference:([A-Za-z0-9\-]+)>)?' which should match /agent/start/1F21-2K1I-INS

What do you get instead?

I get 404 page.

Additional info

Q A
Yii version 1.1.28?
PHP version 7.1?
Operating system MacOs (sonoma)
marcovtwout commented 10 months ago

@trigger202 Sorry, but this is not the right place to ask for support in this case. The release that maybe broke your application is 6+ years old and Yii is only receiving security and compatibility fixes at this time. If there is a demonstratable bug in the framework we may look at it, but it could be in your application code or config as well.