Jelajahi Sumber

Update vendors, added composer vendor, added link parsers/relations

Jordi Boggiano 13 tahun lalu
induk
melakukan
1a71cb9d84

+ 1 - 0
app/autoload.php

@@ -15,6 +15,7 @@ $loader->registerNamespaces(array(
     'Assetic'          => __DIR__.'/../vendor/assetic/src',
     'Metadata'         => __DIR__.'/../vendor/metadata/src',
     'FOS'              => __DIR__.'/../vendor/bundles',
+    'Composer'         => __DIR__.'/../vendor/composer/src',
     'Packagist'        => __DIR__.'/../src',
 ));
 $loader->registerPrefixes(array(

+ 14 - 8
deps

@@ -1,6 +1,6 @@
 [symfony]
     git=http://github.com/symfony/symfony.git
-    version=v2.0.0
+    version=v2.0.3
 
 [twig]
     git=http://github.com/fabpot/Twig.git
@@ -8,27 +8,27 @@
 
 [monolog]
     git=http://github.com/Seldaek/monolog.git
-    version=1.0.0
+    version=1.0.1
 
 [doctrine-common]
     git=http://github.com/doctrine/common.git
-    version=2.1.0
+    version=2.1.1
 
 [doctrine-dbal]
     git=http://github.com/doctrine/dbal.git
-    version=2.1.0
+    version=2.1.2
 
 [doctrine]
     git=http://github.com/doctrine/doctrine2.git
-    version=2.1.0
+    version=2.1.1
 
 [swiftmailer]
     git=http://github.com/swiftmailer/swiftmailer.git
-    version=v4.1.0
+    version=v4.1.2
 
 [assetic]
     git=http://github.com/kriswallsmith/assetic.git
-    version=v1.0.1
+    version=v1.0.2
 
 [twig-extensions]
     git=http://github.com/fabpot/Twig-extensions.git
@@ -37,6 +37,10 @@
     git=http://github.com/schmittjoh/metadata.git
     version=1.0.0
 
+[composer]
+    git=http://github.com/composer/composer.git
+    version=origin/master
+
 [SensioFrameworkExtraBundle]
     git=http://github.com/sensio/SensioFrameworkExtraBundle.git
     target=/bundles/Sensio/Bundle/FrameworkExtraBundle
@@ -44,10 +48,12 @@
 [JMSSecurityExtraBundle]
     git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
     target=/bundles/JMS/SecurityExtraBundle
+    version=origin/1.0.x
 
 [SensioDistributionBundle]
     git=http://github.com/sensio/SensioDistributionBundle.git
     target=/bundles/Sensio/Bundle/DistributionBundle
+    version=origin/1.0
 
 [SensioGeneratorBundle]
     git=http://github.com/sensio/SensioGeneratorBundle.git
@@ -56,7 +62,7 @@
 [AsseticBundle]
     git=http://github.com/symfony/AsseticBundle.git
     target=/bundles/Symfony/Bundle/AsseticBundle
-    version=v1.0.0RC2
+    version=v1.0.1
 
 [FOSUserBundle]
     git=git://github.com/FriendsOfSymfony/FOSUserBundle.git

+ 13 - 14
deps.lock

@@ -1,16 +1,15 @@
-symfony c3ebdbf9cceddb82cd2089aaef8c7b992e536363
+symfony 6a25df0ebf92074bf541fc7ca53d9fcd27981c3d
 twig 396435ecd05556adb0a8bd05b14641cb4f8a8aa5
-monolog 433b98d4218c181bae01865901aac045585e8a1a
-doctrine-common 40f1bf16e84ddc5291a6a63aa00b9879c40e3500
-doctrine-dbal 0127ee98a4301f2f6e3463c824adc3a3687f901f
-doctrine dfdb7353065407afc997956e23f3a44ec3effd72
-swiftmailer c53c8c1ab88c78c463ba65086d93d00193957e94
-assetic 3333d371c4511abcdec7bad86e15ac2be3b10f03
-twig-extensions 6b0cc16934b6e62ef07c8d2e59f9f13ff3193d3d
+monolog 303b8a83c87d5c6d749926cf02620465a5dcd0f2
+doctrine-common 174111c8d245d560e1af4c7455b730347f85686d
+doctrine-dbal edc628f7e7fa5a116b9b41838e7955c03f7af2e0
+doctrine 05d12e20be58ab4d5fa403c5bd6ac06d1fce97e5
+swiftmailer 8c3165691e36302405926abbae7526549db8b899
+assetic f829ad23d23c87480151a21faad49fefe7c09e5d
+twig-extensions eba4f5d572bec05c72a47bbd73ba0a3330cf8f54
 metadata 8717ad2a5689480765d9ffafe925cd8a2457e582
-SensioFrameworkExtraBundle bced40d4d123f5171f888d6e56bb638b8c2a5e57
-JMSSecurityExtraBundle 936892c9735f76037393639f1410773715bf403c
-SensioDistributionBundle 029151792beac272548fe9df183e15b9be521870
-SensioGeneratorBundle 84c41ef39046ba652c0201c29816a0ff7b23e1f5
-AsseticBundle 9c1b7269a4517d1ae94af2dc0d6d6fc4b31e6c10
-FOSUserBundle 67300def4b2628512197c1fe05cd25727c309e20
+SensioFrameworkExtraBundle 9b9194a47effc66b08d44ae110b982352119ca17
+JMSSecurityExtraBundle b8b7eb294ed83d83ca7260ac018e701f08003538
+SensioDistributionBundle 2082cb99d408fd89243059c6eff866347ec00bbe
+SensioGeneratorBundle 88ecf05691825c81b6a19ca6e2dc1849f1a5dcd4
+AsseticBundle 41b5913b5086a0909af92adcb4a6005ee0051b16

+ 32 - 21
src/Packagist/WebBundle/Command/UpdatePackagesCommand.php

@@ -22,7 +22,6 @@ use Symfony\Component\Finder\Finder;
 use Packagist\WebBundle\Entity\Version;
 use Packagist\WebBundle\Entity\Tag;
 use Packagist\WebBundle\Entity\Author;
-use Packagist\WebBundle\Entity\Requirement;
 use Packagist\WebBundle\Repository\Repository\RepositoryInterface;
 
 /**
@@ -30,6 +29,15 @@ use Packagist\WebBundle\Repository\Repository\RepositoryInterface;
  */
 class UpdatePackagesCommand extends ContainerAwareCommand
 {
+    protected $supportedLinkTypes = array(
+        'require'   => 'RequireLink',
+        'conflict'  => 'ConflictLink',
+        'provide'   => 'ProvideLink',
+        'replace'   => 'ReplaceLink',
+        'recommend' => 'RecommendLink',
+        'suggest'   => 'SuggestLink',
+    );
+
     /**
      * {@inheritdoc}
      */
@@ -193,7 +201,7 @@ EOF
         $version->getTags()->clear();
         if (isset($data['keywords'])) {
             foreach ($data['keywords'] as $keyword) {
-                $version->addTags(Tag::getByName($em, $keyword, true));
+                $version->addTag(Tag::getByName($em, $keyword, true));
             }
         }
 
@@ -221,33 +229,36 @@ EOF
                 }
                 $author->setUpdatedAt(new \DateTime);
                 if (!$version->getAuthors()->contains($author)) {
-                    $version->addAuthors($author);
+                    $version->addAuthor($author);
                 }
                 if (!$author->getVersions()->contains($version)) {
-                    $author->addVersions($version);
+                    $author->addVersion($version);
                 }
             }
         }
 
-        foreach ($version->getRequirements() as $req) {
-            // clear requirements that have changed/disappeared (for updates)
-            if (!isset($data['require'][$req->getPackageName()]) || $data['require'][$req->getPackageName()] !== $req->getPackageVersion()) {
-                $version->getRequirements()->removeElement($req);
-                $em->remove($req);
-            } else {
-                // clear those that are already set
-                unset($data['require'][$req->getPackageName()]);
+        foreach ($this->supportedLinkTypes as $linkType => $linkEntity) {
+            foreach ($version->{'get'.$linkType}() as $link) {
+                // clear links that have changed/disappeared (for updates)
+                if (!isset($data[$linkType][$link->getPackageName()]) || $data[$linkType][$link->getPackageName()] !== $link->getPackageVersion()) {
+                    $version->get{'get'.$linkType}()->removeElement($link);
+                    $em->remove($link);
+                } else {
+                    // clear those that are already set
+                    unset($data[$linkType][$link->getPackageName()]);
+                }
             }
-        }
 
-        if (isset($data['require'])) {
-            foreach ($data['require'] as $requireName => $requireVersion) {
-                $requirement = new Requirement();
-                $requirement->setPackageName($requireName);
-                $requirement->setPackageVersion($requireVersion);
-                $version->addRequirements($requirement);
-                $requirement->setVersion($version);
-                $em->persist($requirement);
+            if (isset($data[$linkType])) {
+                foreach ($data[$linkType] as $linkPackageName => $linkPackageVersion) {
+                    $class = 'Packagist\WebBundle\Entity\\'.$linkEntity;
+                    $link = new $class;
+                    $link->setPackageName($linkPackageName);
+                    $link->setPackageVersion($linkPackageVersion);
+                    $version->{'add'.$linkType}($link);
+                    $link->setVersion($version);
+                    $em->persist($link);
+                }
             }
         }
     }

+ 1 - 1
src/Packagist/WebBundle/Controller/WebController.php

@@ -64,7 +64,7 @@ class WebController extends Controller
             if ($form->isValid()) {
                 try {
                     $user = $this->getUser();
-                    $package->addMaintainers($user);
+                    $package->addMaintainer($user);
                     $em = $this->getDoctrine()->getEntityManager();
                     $em->persist($package);
                     $em->flush();

+ 3 - 3
src/Packagist/WebBundle/Entity/Author.php

@@ -136,11 +136,11 @@ class Author
     /**
      * Add versions
      *
-     * @param Packagist\WebBundle\Entity\Version $versions
+     * @param Packagist\WebBundle\Entity\Version $version
      */
-    public function addVersions(Version $versions)
+    public function addVersion(Version $version)
     {
-        $this->versions[] = $versions;
+        $this->versions[] = $version;
     }
 
     /**

+ 29 - 0
src/Packagist/WebBundle/Entity/ConflictLink.php

@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * This file is part of Packagist.
+ *
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
+ *     Nils Adermann <naderman@naderman.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Packagist\WebBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(name="link_conflict")
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+class ConflictLink extends PackageLink
+{
+    /**
+     * @ORM\ManyToOne(targetEntity="Packagist\WebBundle\Entity\Version", inversedBy="conflict")
+     */
+    private $version;
+}

+ 3 - 3
src/Packagist/WebBundle/Entity/Package.php

@@ -308,11 +308,11 @@ class Package
     /**
      * Add maintainers
      *
-     * @param Packagist\WebBundle\Entity\User $maintainers
+     * @param Packagist\WebBundle\Entity\User $maintainer
      */
-    public function addMaintainers(User $maintainers)
+    public function addMaintainer(User $maintainer)
     {
-        $this->maintainers[] = $maintainers;
+        $this->maintainers[] = $maintainer;
     }
 
     /**

+ 3 - 9
src/Packagist/WebBundle/Entity/Requirement.php → src/Packagist/WebBundle/Entity/PackageLink.php

@@ -16,11 +16,10 @@ use Doctrine\ORM\Mapping as ORM;
 use Symfony\Component\Validator\Constraints as Assert;
 
 /**
- * @ORM\Entity
- * @ORM\Table(name="requirement")
+ * @ORM\MappedSuperclass()
  * @author Jordi Boggiano <j.boggiano@seld.be>
  */
-class Requirement
+abstract class PackageLink
 {
     /**
      * @ORM\Id
@@ -39,11 +38,6 @@ class Requirement
      */
     private $packageVersion;
 
-    /**
-     * @ORM\ManyToOne(targetEntity="Packagist\WebBundle\Entity\Version", inversedBy="requirements")
-     */
-    private $version;
-
     public function toArray()
     {
         return array($this->packageName => $this->packageVersion);
@@ -123,4 +117,4 @@ class Requirement
     {
         return $this->packageName.' '.$this->packageVersion;
     }
-}
+}

+ 29 - 0
src/Packagist/WebBundle/Entity/ProvideLink.php

@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * This file is part of Packagist.
+ *
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
+ *     Nils Adermann <naderman@naderman.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Packagist\WebBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(name="link_provide")
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+class ProvideLink extends PackageLink
+{
+    /**
+     * @ORM\ManyToOne(targetEntity="Packagist\WebBundle\Entity\Version", inversedBy="provide")
+     */
+    private $version;
+}

+ 29 - 0
src/Packagist/WebBundle/Entity/RecommendLink.php

@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * This file is part of Packagist.
+ *
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
+ *     Nils Adermann <naderman@naderman.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Packagist\WebBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(name="link_recommend")
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+class RecommendLink extends PackageLink
+{
+    /**
+     * @ORM\ManyToOne(targetEntity="Packagist\WebBundle\Entity\Version", inversedBy="recommend")
+     */
+    private $version;
+}

+ 29 - 0
src/Packagist/WebBundle/Entity/ReplaceLink.php

@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * This file is part of Packagist.
+ *
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
+ *     Nils Adermann <naderman@naderman.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Packagist\WebBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(name="link_replace")
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+class ReplaceLink extends PackageLink
+{
+    /**
+     * @ORM\ManyToOne(targetEntity="Packagist\WebBundle\Entity\Version", inversedBy="replace")
+     */
+    private $version;
+}

+ 29 - 0
src/Packagist/WebBundle/Entity/RequireLink.php

@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * This file is part of Packagist.
+ *
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
+ *     Nils Adermann <naderman@naderman.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Packagist\WebBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(name="link_require")
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+class RequireLink extends PackageLink
+{
+    /**
+     * @ORM\ManyToOne(targetEntity="Packagist\WebBundle\Entity\Version", inversedBy="require")
+     */
+    private $version;
+}

+ 29 - 0
src/Packagist/WebBundle/Entity/SuggestLink.php

@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * This file is part of Packagist.
+ *
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
+ *     Nils Adermann <naderman@naderman.de>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Packagist\WebBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * @ORM\Entity
+ * @ORM\Table(name="link_suggest")
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ */
+class SuggestLink extends PackageLink
+{
+    /**
+     * @ORM\ManyToOne(targetEntity="Packagist\WebBundle\Entity\Version", inversedBy="suggest")
+     */
+    private $version;
+}

+ 163 - 67
src/Packagist/WebBundle/Entity/Version.php

@@ -19,7 +19,7 @@ use Symfony\Component\Validator\Constraints as Assert;
  * @ORM\Entity
  * @ORM\Table(
  *     name="package_version",
- *     uniqueConstraints={@ORM\UniqueConstraint(name="pkg_ver_idx",columns={"package_id","version","versionType","development"})}
+ *     uniqueConstraints={@ORM\UniqueConstraint(name="pkg_ver_idx",columns={"package_id","version"})}
  * )
  * @author Jordi Boggiano <j.boggiano@seld.be>
  */
@@ -80,12 +80,6 @@ class Version
      */
     private $version;
 
-    /**
-     * @ORM\Column
-     * @Assert\NotBlank()
-     */
-    private $versionType;
-
     /**
      * @ORM\Column(type="boolean")
      * @Assert\NotBlank()
@@ -107,9 +101,34 @@ class Version
     private $authors;
 
     /**
-     * @ORM\OneToMany(targetEntity="Packagist\WebBundle\Entity\Requirement", mappedBy="version")
+     * @ORM\OneToMany(targetEntity="Packagist\WebBundle\Entity\RequireLink", mappedBy="version")
      */
-    private $requirements;
+    private $require;
+
+    /**
+     * @ORM\OneToMany(targetEntity="Packagist\WebBundle\Entity\ReplaceLink", mappedBy="version")
+     */
+    private $replace;
+
+    /**
+     * @ORM\OneToMany(targetEntity="Packagist\WebBundle\Entity\ConflictLink", mappedBy="version")
+     */
+    private $conflict;
+
+    /**
+     * @ORM\OneToMany(targetEntity="Packagist\WebBundle\Entity\ProvideLink", mappedBy="version")
+     */
+    private $provide;
+
+    /**
+     * @ORM\OneToMany(targetEntity="Packagist\WebBundle\Entity\RecommendLink", mappedBy="version")
+     */
+    private $recommend;
+
+    /**
+     * @ORM\OneToMany(targetEntity="Packagist\WebBundle\Entity\SuggestLink", mappedBy="version")
+     */
+    private $suggest;
 
     /**
      * @ORM\Column(type="text")
@@ -166,7 +185,7 @@ class Version
             'description' => $this->description,
             'keywords' => $tags,
             'homepage' => $this->homepage,
-            'version' => $this->version . ($this->versionType ? '-'.$this->versionType : '') . ($this->development ? '-dev':''),
+            'version' => $this->version,
             'license' => $this->license,
             'authors' => $authors,
             'require' => $requirements,
@@ -180,10 +199,7 @@ class Version
 
     public function equals(Version $version)
     {
-        return $version->getName() === $this->getName()
-            && $version->getVersion() === $this->getVersion()
-            && $version->getVersionType() === $this->getVersionType()
-            && $version->getDevelopment() === $this->getDevelopment();
+        return $version->getName() === $this->getName() && $version->getVersion() === $this->getVersion();
     }
 
     /**
@@ -396,16 +412,6 @@ class Version
         return $this->package;
     }
 
-    /**
-     * Add tags
-     *
-     * @param Packagist\WebBundle\Entity\Tag $tags
-     */
-    public function addTags(Tag $tags)
-    {
-        $this->tags[] = $tags;
-    }
-
     /**
      * Get tags
      *
@@ -485,123 +491,213 @@ class Version
         return $this->updatedAt;
     }
 
+    /**
+     * Get authors
+     *
+     * @return Doctrine\Common\Collections\Collection
+     */
+    public function getAuthors()
+    {
+        return $this->authors;
+    }
+
+    /**
+     * Set type
+     *
+     * @param string $type
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+    }
+
+    /**
+     * Get type
+     *
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+
+    /**
+     * Set extra
+     *
+     * @param array $extra
+     */
+    public function setExtra($extra)
+    {
+        $this->extra = $extra;
+    }
+
+    /**
+     * Get extra
+     *
+     * @return array
+     */
+    public function getExtra()
+    {
+        return $this->extra;
+    }
+
+    /**
+     * Set development
+     *
+     * @param Boolean $development
+     */
+    public function setDevelopment($development)
+    {
+        $this->development = $development;
+    }
+
+    /**
+     * Get development
+     *
+     * @return Boolean
+     */
+    public function getDevelopment()
+    {
+        return $this->development;
+    }
+
+    /**
+     * Add tags
+     *
+     * @param Packagist\WebBundle\Entity\Tag $tags
+     */
+    public function addTag(\Packagist\WebBundle\Entity\Tag $tags)
+    {
+        $this->tags[] = $tags;
+    }
+
     /**
      * Add authors
      *
      * @param Packagist\WebBundle\Entity\Author $authors
      */
-    public function addAuthors(Author $authors)
+    public function addAuthor(\Packagist\WebBundle\Entity\Author $authors)
     {
         $this->authors[] = $authors;
     }
 
     /**
-     * Get authors
+     * Add require
+     *
+     * @param Packagist\WebBundle\Entity\RequireLink $require
+     */
+    public function addRequireLink(RequireLink $require)
+    {
+        $this->require[] = $require;
+    }
+
+    /**
+     * Get require
      *
      * @return Doctrine\Common\Collections\Collection
      */
-    public function getAuthors()
+    public function getRequire()
     {
-        return $this->authors;
+        return $this->require;
     }
 
     /**
-     * Add requirements
+     * Add replace
      *
-     * @param Packagist\WebBundle\Entity\Requirement $requirements
+     * @param Packagist\WebBundle\Entity\ReplaceLink $replace
      */
-    public function addRequirements(Requirement $requirements)
+    public function addReplaceLink(ReplaceLink $replace)
     {
-        $this->requirements[] = $requirements;
+        $this->replace[] = $replace;
     }
 
     /**
-     * Get requirements
+     * Get replace
      *
      * @return Doctrine\Common\Collections\Collection
      */
-    public function getRequirements()
+    public function getReplace()
     {
-        return $this->requirements;
+        return $this->replace;
     }
 
     /**
-     * Set type
+     * Add conflict
      *
-     * @param string $type
+     * @param Packagist\WebBundle\Entity\ConflictLink $conflict
      */
-    public function setType($type)
+    public function addConflictLink(ConflictLink $conflict)
     {
-        $this->type = $type;
+        $this->conflict[] = $conflict;
     }
 
     /**
-     * Get type
+     * Get conflict
      *
-     * @return string
+     * @return Doctrine\Common\Collections\Collection
      */
-    public function getType()
+    public function getConflict()
     {
-        return $this->type;
+        return $this->conflict;
     }
 
     /**
-     * Set extra
+     * Add provide
      *
-     * @param array $extra
+     * @param Packagist\WebBundle\Entity\ProvideLink $provide
      */
-    public function setExtra($extra)
+    public function addProvideLink(ProvideLink $provide)
     {
-        $this->extra = $extra;
+        $this->provide[] = $provide;
     }
 
     /**
-     * Get extra
+     * Get provide
      *
-     * @return array
+     * @return Doctrine\Common\Collections\Collection
      */
-    public function getExtra()
+    public function getProvide()
     {
-        return $this->extra;
+        return $this->provide;
     }
 
     /**
-     * Set versionType
+     * Add recommend
      *
-     * @param string $versionType
+     * @param Packagist\WebBundle\Entity\RecommendLink $recommend
      */
-    public function setVersionType($versionType)
+    public function addRecommendLink(RecommendLink $recommend)
     {
-        $this->versionType = $versionType;
+        $this->recommend[] = $recommend;
     }
 
     /**
-     * Get versionType
+     * Get recommend
      *
-     * @return string
+     * @return Doctrine\Common\Collections\Collection
      */
-    public function getVersionType()
+    public function getRecommend()
     {
-        return $this->versionType;
+        return $this->recommend;
     }
 
     /**
-     * Set development
+     * Add suggest
      *
-     * @param Boolean $development
+     * @param Packagist\WebBundle\Entity\SuggestLink $suggest
      */
-    public function setDevelopment($development)
+    public function addSuggestLink(SuggestLink $suggest)
     {
-        $this->development = $development;
+        $this->suggest[] = $suggest;
     }
 
     /**
-     * Get development
+     * Get suggest
      *
-     * @return Boolean
+     * @return Doctrine\Common\Collections\Collection
      */
-    public function getDevelopment()
+    public function getSuggest()
     {
-        return $this->development;
+        return $this->suggest;
     }
 }