scottbass3 / harbor-api-bundle
A Wrapper for Harbor API v2 Client library for PHP
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.3
- php-http/httplug: ^2.4
- scottbass3/harbor-api-client: ^1.0
- symfony/framework-bundle: *
- symfony/http-client: ^7.3
This package is not auto-updated.
Last update: 2025-08-23 13:18:42 UTC
README
A Symfony bundle to communicate with Harbor API v2. This bundle is a wrapper for harbor api client.
Installation
If your application is using Symfony Flex, run this command to install the bundle :
composer require scottbass3/harbor-api-bundle
Then add the configuration in your packages config directory :
# config/packages/scottbass3_harbor_api.yaml scottbass3_harbor_api: base_uri: 'https://exemple.com/api/v2.0' login: 'test' password: 'changeme'
Basic Usage
namespace App\Controller; use Scottbass3\HarborApiBundle\HarborClient; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class DefaultController extends AbstractController { public function index(HarborClient $client) { $projectReq = (new ProjectReq()) ->setProjectName('my-project'); $client->getHarborClient()->createProject($projectReq); $artifacts = $client->getHarborClient()->listArtifacts('my-project', 'my-repository'); } }