Browse Source

Mark the package as updated when a version is removed

Jordi Boggiano 12 years ago
parent
commit
02e5de6bdd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/Packagist/WebBundle/Entity/VersionRepository.php

+ 2 - 0
src/Packagist/WebBundle/Entity/VersionRepository.php

@@ -32,6 +32,8 @@ class VersionRepository extends EntityRepository
     {
         $em = $this->getEntityManager();
         $version->getPackage()->getVersions()->removeElement($version);
+        $version->getPackage()->setCrawledAt(new \DateTime);
+        $version->getPackage()->setUpdatedAt(new \DateTime);
 
         foreach ($version->getAuthors() as $author) {
             /** @var $author Author */