Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Notice: Use of undefined constant XML_PI_NODE - assumed 'XML_PI_NODE'

Exception

ErrorException

  1.      * Construct new XmlEncoder and allow to change the root node element name.
  2.      *
  3.      * @param int|null $loadOptions      A bit field of LIBXML_* constants
  4.      * @param int[]    $ignoredNodeTypes an array of ignored XML node types, each one of the DOM Predefined XML_* Constants
  5.      */
  6.      public function  __construct ( string $rootNodeName  'response' int $loadOptions  null , array  $ignoredNodeTypes  = [ XML_PI_NODE XML_COMMENT_NODE ])
  7.     {
  8.          $this -> rootNodeName  $rootNodeName ;
  9.          $this -> loadOptions  null  !==  $loadOptions  $loadOptions  LIBXML_NONET  LIBXML_NOBLANKS ;
  10.          $this -> ignoredNodeTypes  $ignoredNodeTypes ;
  11.     }
XmlEncoder -> __construct () in src/Controller/ AdminController.php (line 954)
  1.                 break;
  2.             default:
  3.                 return new  JsonResponse (array( "error"  =>  "no such class" ));
  4.         }
  5.          $entity_table  $this -> getDoctrine ()-> getRepository ( $class )-> findAll ();
  6.          $encoders  = array(new  XmlEncoder (), new  JsonEncoder ());
  7.          $normalizers  = array(new  ObjectNormalizer ());
  8.          $serializer  = new  Serializer ( $normalizers $encoders );
  9.          $jsonContent  $serializer -> serialize ( $entity_table 'json' );
  10.         return new  JsonResponse ( json_decode ( $jsonContent ));
  11.     }
AdminController -> getEntityTable ('customer_tag') in src/Controller/ AdminController.php (line 428)
  1.          $data  json_decode ( $request -> getContent (),  true );
  2.          $tablesToGetFromDB  = array( "customer_tag" "sub_issue_tag" );
  3.          $allTagTables  = array();
  4.         try {
  5.             foreach ( $tablesToGetFromDB  as  $table_name ) {
  6.                  $table  $this -> getEntityTable ( $table_name );
  7.                  $content  json_decode ( $table -> getContent ());
  8.                  $content  $this -> addTagsToTable ( $content $table_name );
  9.                  $associated_groups  $this -> getAssociated_groups ( GroupsTagtablesRelations ::class, [ 'tagTable'  =>  $table_name ]);
  10.                  $allTagTables [] = array( "table_name"  =>  $table_name "tags"  =>  $content "associated_groups"  =>  $associated_groups );
in vendor/symfony/http-kernel/ HttpKernel.php -> getTablesData (line 149)
  1.          $this -> dispatcher -> dispatch ( KernelEvents :: CONTROLLER_ARGUMENTS $event );
  2.          $controller  $event -> getController ();
  3.          $arguments  $event -> getArguments ();
  4.          // call controller
  5.          $response  = \ call_user_func_array ( $controller $arguments );
  6.          // view
  7.          if (! $response  instanceof  Response ) {
  8.              $event  = new  GetResponseForControllerResultEvent ( $this $request $type $response );
  9.              $this -> dispatcher -> dispatch ( KernelEvents :: VIEW $event );
  1.      public function  handle ( Request $request $type  HttpKernelInterface :: MASTER_REQUEST $catch  true )
  2.     {
  3.          $request -> headers -> set ( 'X-Php-Ob-Level' ob_get_level ());
  4.         try {
  5.             return  $this -> handleRaw ( $request $type );
  6.         } catch (\ Exception $e ) {
  7.             if ( $e  instanceof  RequestExceptionInterface ) {
  8.                  $e  = new  BadRequestHttpException ( $e -> getMessage (),  $e );
  9.             }
  10.             if ( false  ===  $catch ) {
  1.          $this -> boot ();
  2.         ++ $this -> requestStackSize ;
  3.          $this -> resetServices  true ;
  4.         try {
  5.             return  $this -> getHttpKernel ()-> handle ( $request $type $catch );
  6.         } finally {
  7.             -- $this -> requestStackSize ;
  8.         }
  9.     }
Kernel -> handle ( object( Request)) in public/ index.php (line 52)
  1.      Request :: setTrustedHosts ( explode ( ',' $trustedHosts ));
  2. }
  3. $kernel  = new  Kernel ( $env $debug );
  4. $request  Request :: createFromGlobals ();
  5. $response  $kernel -> handle ( $request );
  6. $response -> send ();
  7. $kernel -> terminate ( $request $response );

Logs

No log messages

Stack Trace

ErrorException

ErrorException:
Notice: Use of undefined constant XML_PI_NODE - assumed 'XML_PI_NODE'

  at vendor/symfony/serializer/Encoder/XmlEncoder.php:48
  at Symfony\Component\Serializer\Encoder\XmlEncoder->__construct()
     (src/Controller/AdminController.php:954)
  at App\Controller\AdminController->getEntityTable('customer_tag')
     (src/Controller/AdminController.php:428)
  at App\Controller\AdminController->getTablesData(object(Request))
     (vendor/symfony/http-kernel/HttpKernel.php:149)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:66)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:188)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:52)