public function postUpdate(LifecycleEventArgs $args)
    {
        $entity = $args->getObject();
        if ($entity instanceof PackageVersionEntity) {
            $em = $args->getObjectManager();
            /* @var \Doctrine\ORM\EntityManager $em */
            $unitOfWork = $em->getUnitOfWork();
            $changeSet = $unitOfWork->getEntityChangeSet($entity);
            if (in_array('version', $changeSet)) {
                $this->refreshPackageLatestVersion($em, $entity->getPackage());
            }
        }
    }
public function postUpdate(LifecycleEventArgs $args)
    {
        $entity = $args->getObject();
        if ($entity instanceof PackageVersionEntity) {
            $em = $args->getObjectManager();
            /* @var \Doctrine\ORM\EntityManager $em */
            $unitOfWork = $em->getUnitOfWork();
            $changeSet = $unitOfWork->getEntityChangeSet($entity);
            if (in_array('version', $changeSet)) {
                $this->refreshPackageLatestVersion($em, $entity->getPackage());
            }
        }
    }
public function postUpdate ( LifecycleEventArgs $ args ) { $ entity = $ args -> getObject ( ) ; if ( $ entity instanceof PackageVersionEntity ) { $ em = $ args -> getObjectManager ( ) ; /* @var \Doctrine\ORM\EntityManager $em */ $ unitOfWork = $ em -> getUnitOfWork ( ) ; $ changeSet = $ unitOfWork -> getEntityChangeSet ( $ entity ) ; if ( in_array ( 'version' , $ changeSet ) ) { $ this -> refreshPackageLatestVersion ( $ em , $ entity -> getPackage ( ) ) ; } } }
Callback method called when a modified entity is going to be saved.

@param LifecycleEventArgs $args
Callback method called when a modified entity is going to be saved .