Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 801 Bytes

UPGRADING.md

File metadata and controls

19 lines (13 loc) · 801 Bytes

From 0.11 to 0.12

  • GraphNavigator::detachObject has been removed, you can directly use Context::stopVisiting instead.

  • VisitorInterface::getNavigator was deprecated, instead use Context::accept

  • Serializer::setGroups, Serializer::setExclusionStrategy and Serializer::setVersion were removed, these settings must now be passed as part of a new Context object.

    Before:

      $serializer->setVersion(1);
      $serializer->serialize($data, 'json');
    

    After:

      $serializer->serialize($data, 'json', Context::create()->setVersion(1));
    
  • All visit??? methods of the VisitorInterface, now require a third argument, the Context; the context is for example passed as an additional argument to handler, exclusion strategies, and also available in event listeners.