vendor/friendsofsymfony/jsrouting-bundle/Resources/config/routing/routing.php line 19

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the FOSJsRoutingBundle package.
  4. *
  5. * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
  11. use Symfony\Component\Routing\Loader\XmlFileLoader;
  12. return function (RoutingConfigurator $routes): void {
  13. foreach (debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT) as $trace) {
  14. if (isset($trace['object']) && $trace['object'] instanceof XmlFileLoader && 'doImport' === $trace['function']) {
  15. if (__DIR__ === dirname(realpath($trace['args'][3]))) {
  16. trigger_deprecation('friendsofsymfony/jsrouting-bundle', '3.6', 'The "routing-sf4.xml" routing configuration file is deprecated, import "routing.php" instead.');
  17. break;
  18. }
  19. }
  20. }
  21. $routes->add('fos_js_routing_js', '/js/routing.{_format}')
  22. ->methods(['GET'])
  23. ->controller('fos_js_routing.controller::indexAction')
  24. ->requirements(['_format' => 'js|json'])
  25. ->defaults(['_format' => 'js'])
  26. ;
  27. };