Skip to content

3. Using Packagist API Bundle

Alexey Samara edited this page Dec 22, 2017 · 8 revisions

Get list of packages

Arguments:

vendor (not required) - Get package list for selected vendor

type (not required) - Get package list for selected type.

Supported types: symfony-bundle, wordpress-plugin, typo3-cms-extension, library, project, metapackage, composer-plugin

Usage example:

<?php

namespace App\Acme;

use WowApps\PackagistBundle\Service\Packagist;

class MyAppClass
{
    public function getPackagesList()
    {
        $packagist = new Packagist();
        var_dump($packagist->getPackageList('wow-apps', 'symfony-bundle'));
    }
}

Will return:

array(3) {
  [0]=>
  string(26) "wow-apps/symfony-packagist"
  [1]=>
  string(29) "wow-apps/symfony-proxybonanza"
  [2]=>
  string(26) "wow-apps/symfony-slack-bot"
}

SensioLabsInsight

Clone this wiki locally