Browse Source

Add search url to packages.json

Jordi Boggiano 12 years ago
parent
commit
3b29013e14
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/Packagist/WebBundle/Package/Dumper.php

+ 1 - 0
src/Packagist/WebBundle/Package/Dumper.php

@@ -258,6 +258,7 @@ class Dumper
         $this->files['p/packages.json']['notify'] = str_replace('VND/PKG', '%package%', $url);
         $this->files['p/packages.json']['notify-batch'] = $this->router->generate('track_download_batch');
         $this->files['p/packages.json']['providers-url'] = $this->router->generate('home') . 'p/%package%$%hash%.json';
+        $this->files['p/packages.json']['search'] = $this->router->generate('search', array('_format' => 'json')) . '?q=%query%';
 
         // TODO deprecated, remove eventually, together with includes & providers-includes
         $this->files['p/packages.json']['notify_batch'] = $this->files['p/packages.json']['notify-batch'];