Ejemplo n.º 1
0
 public function getInstallDate()
 {
     //get the composer.json file of the package to check its modified-date
     $repository = $this->installedPackage->getRepository();
     $reflection = new \ReflectionClass('Composer\\Repository\\FilesystemRepository');
     $p = $reflection->getProperty('file');
     $p->setAccessible(true);
     $file = $p->getValue($repository);
     $installDate = filemtime($file->getPath());
     return \DateTime::createFromFormat('U', $installDate);
 }