giftcards/packagist-bundle

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Additional functionality for Packagist

1.0.1 2013-12-10 19:10 UTC

This package is auto-updated.

Last update: 2021-08-25 23:31:22 UTC


README

Additional Functionality

  1. Atlassian Stash Integration

    Should be used with this Stash Plugin
    Plugin Documentation

  2. Global Maintainer Console Command

Installation

app/AppKernel.php

Register the new bundle in your AppKernel file

	    new Nelmio\SolariumBundle\NelmioSolariumBundle(),
        new Nelmio\SecurityBundle\NelmioSecurityBundle(),
	    new GiftCards\PackagistBundle\GiftCardsPackagistBundle(),
    );

app/config/config.yml

Configure the stash connection

    gift_cards_packagist:
        protocol: ssh
        domain: stash.domain.com

app/config/routing.yml

Include the bundle routing file

    gift_cards_packagist:
        resource: "@GiftCardsPackagistBundle/Resources/config/routing.yml"

Setup a Stash User in Packagist

Because Stash does not supply the information for the user who triggered the hook, you must create a generic Stash user. Once this user is created you will need to login and copy the API Token. The token and the username are used to authenticate Stash with Packagist. If you're configuring a hook for a repository specific to your user you can use your own credentials.

NOTE: For Stash to update Packagist the Stash user will need to be a maintainer on every package from Stash.

Configure a Post-Receive hook in Stash

Setup a Post-Receive hook for each repository which is tracked in packagist. Configure it with a similiar url: http://<packagist domain>/api/stash?username=<stash user>&apiToken=<stash user token>