If you have say the following controller structure
<?php
namespace appcontrollers;
use Yii;
use yiiwebController;
/**
* Test controller
*/
class TestController extends Controller
{
public function actionMyaction(){
...
//action logic
}
public function actionMyAction(){
...
//action logic
}
}
The first route can be accessed using the path example.com/test/myaction
The second route per Yii 1.x logic should be accessible from the path example.com/test/myAction
in Yii2.x routing is using hyphenated structure and is accessible only from example.com/test/my-action
Is there anyway to enable routing using camelCase structure in Yii2 preferably without extending with routing classes ?
This is important as it breaks all link ( which are of course all over the internet) backward compatibility and thus Yii1.x app can never be migrated to Yii2.x even if the code is fully rewritten. What was the reason for this change?
See Question&Answers more detail:os