Compatibility mode in suitecrm 8?

Hi @brucemcIntyre

Two possible approaches to do this change in a upgrade safe way.

Option 1. Full module_routing.yaml override

  1. create a file called extensions/<my-ext>/config/module_routing.yaml
  2. Copy the full content of core module_routing.yaml to the new file
  3. Do the changes you need

Option 2. Override just the modules you want

  1. create a file called extensions/<my-ext>/config/module_routing.php
  2. Use php code to just update the entries you want, something like:
 <?php

    use Symfony\Component\DependencyInjection\Container;

    if (!isset($container)) {
        return;
    }

    /** @var Container $container */
    $routes = $container->getParameter('legacy.module_routing');

    if (!isset($routes['accounts'])) {
        $routes['accounts'] = [];
    }

    // do the changes you want to routes accounts
    // $routes['accounts'] ...

    //set the routes again
    $container->setParameter('legacy.module_routing', $routes);
1 Like