upgrade icon indicating copy to clipboard operation
upgrade copied to clipboard

Missing upgrade elements

Open dereuromark opened this issue 1 year ago • 4 comments

Just adding them as note for now, if someone wants to tackle those

 use Cake\Routing\RouteBuilder;
 
-Router::prefix('Admin', function (RouteBuilder $routes) {
+$routes->prefix('Admin', function (RouteBuilder $routes) {
 	$routes->plugin('Management', function (RouteBuilder $routes) {
 		$routes->fallbacks();
 	});
 });
 
-Router::plugin('Management', function (RouteBuilder $routes) {
+$routes->plugin('Management', function (RouteBuilder $routes) {
 	$routes->fallbacks();
 });

for plugin routes.php files


if ($this->RequestHandler->prefers('rss'))

replacement

dereuromark avatar Aug 23 '24 15:08 dereuromark

-$this->set('_serialize', 'result');
+$this->viewBuilder()->setOption('serialize', 'result');

as well as

-TableRegistry::get()
+TableRegistry::getTableLocator()->get()

also was sth that needed to be done manually it seems.

dereuromark avatar Aug 24 '24 08:08 dereuromark

I think the recommended way to fetch table instances is via the LocatorAwareTrait, not directly from the TableRegistry, right?

If so then we'd need to add the trait via rector as well and replace it with

$this->fetchTable();

LordSimal avatar Aug 24 '24 09:08 LordSimal

Sure but for now the quick way would be a simpler replace. Either way works.

dereuromark avatar Aug 24 '24 10:08 dereuromark

Sure but for now the quick way would be a simpler replace. Either way works.

While the simple replacement isn't the most correct, the upgrade process will be smoother if we had the simple method replacement.

markstory avatar Aug 26 '24 03:08 markstory