|
@@ -16,6 +16,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
use Symfony\Component\Validator\ExecutionContext;
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
+use Composer\IO\NullIO;
|
|
|
use Composer\Repository\VcsRepository;
|
|
|
use Composer\Repository\RepositoryManager;
|
|
|
|
|
@@ -173,7 +174,7 @@ class Package
|
|
|
/**
|
|
|
* Get id
|
|
|
*
|
|
|
- * @return string $id
|
|
|
+ * @return string
|
|
|
*/
|
|
|
public function getId()
|
|
|
{
|
|
@@ -193,7 +194,7 @@ class Package
|
|
|
/**
|
|
|
* Get name
|
|
|
*
|
|
|
- * @return string $name
|
|
|
+ * @return string
|
|
|
*/
|
|
|
public function getName()
|
|
|
{
|
|
@@ -233,7 +234,7 @@ class Package
|
|
|
/**
|
|
|
* Get description
|
|
|
*
|
|
|
- * @return text $description
|
|
|
+ * @return string
|
|
|
*/
|
|
|
public function getDescription()
|
|
|
{
|
|
@@ -243,7 +244,7 @@ class Package
|
|
|
/**
|
|
|
* Set createdAt
|
|
|
*
|
|
|
- * @param datetime $createdAt
|
|
|
+ * @param \DateTime $createdAt
|
|
|
*/
|
|
|
public function setCreatedAt($createdAt)
|
|
|
{
|
|
@@ -253,7 +254,7 @@ class Package
|
|
|
/**
|
|
|
* Get createdAt
|
|
|
*
|
|
|
- * @return datetime $createdAt
|
|
|
+ * @return \DateTime
|
|
|
*/
|
|
|
public function getCreatedAt()
|
|
|
{
|
|
@@ -274,14 +275,8 @@ class Package
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- $repositoryManager = new RepositoryManager;
|
|
|
- $repositoryManager->setRepositoryClass('composer', 'Composer\Repository\ComposerRepository');
|
|
|
- $repositoryManager->setRepositoryClass('vcs', 'Composer\Repository\VcsRepository');
|
|
|
- $repositoryManager->setRepositoryClass('pear', 'Composer\Repository\PearRepository');
|
|
|
- $repositoryManager->setRepositoryClass('package', 'Composer\Repository\PackageRepository');
|
|
|
-
|
|
|
try {
|
|
|
- $repository = new VcsRepository(array('url' => $repository));
|
|
|
+ $repository = new VcsRepository(array('url' => $repository), new NullIO());
|
|
|
|
|
|
$repo = $this->repositoryClass = $repository->getDriver();
|
|
|
if (!$repo) {
|
|
@@ -305,7 +300,7 @@ class Package
|
|
|
/**
|
|
|
* Add versions
|
|
|
*
|
|
|
- * @param Packagist\WebBundle\Entity\Version $versions
|
|
|
+ * @param \Packagist\WebBundle\Entity\Version $versions
|
|
|
*/
|
|
|
public function addVersions(Version $versions)
|
|
|
{
|
|
@@ -315,7 +310,7 @@ class Package
|
|
|
/**
|
|
|
* Get versions
|
|
|
*
|
|
|
- * @return string $versions
|
|
|
+ * @return \Doctrine\Common\Collections\Collection
|
|
|
*/
|
|
|
public function getVersions()
|
|
|
{
|
|
@@ -325,7 +320,7 @@ class Package
|
|
|
/**
|
|
|
* Set updatedAt
|
|
|
*
|
|
|
- * @param datetime $updatedAt
|
|
|
+ * @param \DateTime $updatedAt
|
|
|
*/
|
|
|
public function setUpdatedAt($updatedAt)
|
|
|
{
|
|
@@ -335,7 +330,7 @@ class Package
|
|
|
/**
|
|
|
* Get updatedAt
|
|
|
*
|
|
|
- * @return datetime $updatedAt
|
|
|
+ * @return \DateTime
|
|
|
*/
|
|
|
public function getUpdatedAt()
|
|
|
{
|
|
@@ -345,7 +340,7 @@ class Package
|
|
|
/**
|
|
|
* Set crawledAt
|
|
|
*
|
|
|
- * @param datetime $crawledAt
|
|
|
+ * @param \DateTime $crawledAt
|
|
|
*/
|
|
|
public function setCrawledAt($crawledAt)
|
|
|
{
|
|
@@ -355,7 +350,7 @@ class Package
|
|
|
/**
|
|
|
* Get crawledAt
|
|
|
*
|
|
|
- * @return datetime $crawledAt
|
|
|
+ * @return \DateTime
|
|
|
*/
|
|
|
public function getCrawledAt()
|
|
|
{
|
|
@@ -365,7 +360,7 @@ class Package
|
|
|
/**
|
|
|
* Set indexedAt
|
|
|
*
|
|
|
- * @param datetime $indexedAt
|
|
|
+ * @param \DateTime $indexedAt
|
|
|
*/
|
|
|
public function setIndexedAt($indexedAt)
|
|
|
{
|
|
@@ -375,7 +370,7 @@ class Package
|
|
|
/**
|
|
|
* Get indexedAt
|
|
|
*
|
|
|
- * @return datetime $indexedAt
|
|
|
+ * @return \DateTime
|
|
|
*/
|
|
|
public function getIndexedAt()
|
|
|
{
|
|
@@ -385,7 +380,7 @@ class Package
|
|
|
/**
|
|
|
* Add maintainers
|
|
|
*
|
|
|
- * @param Packagist\WebBundle\Entity\User $maintainer
|
|
|
+ * @param \Packagist\WebBundle\Entity\User $maintainer
|
|
|
*/
|
|
|
public function addMaintainer(User $maintainer)
|
|
|
{
|
|
@@ -395,7 +390,7 @@ class Package
|
|
|
/**
|
|
|
* Get maintainers
|
|
|
*
|
|
|
- * @return Doctrine\Common\Collections\Collection $maintainers
|
|
|
+ * @return \Doctrine\Common\Collections\Collection
|
|
|
*/
|
|
|
public function getMaintainers()
|
|
|
{
|