pawella/svn-tool

Svn tool by integrate composer

0.1.1 2018-03-31 16:00 UTC

This package is auto-updated.

Last update: 2024-03-29 03:44:39 UTC


README

Read subversion repository and created packages.json file by composer usage

Getting Started

Provides a service site that scans your external, private SVN repository, preparing a package.json file that will be used by composer.

Installing

Add a library to your project.

composer require pawella/svn-tool

Sample application

<?php

require __DIR__.'/../../vendor/autoload.php';

use SvnTool\Service;
use Zend\Cache\StorageFactory;


$service = new Service();

/**
 * Usage caching is optional.
 */
$cache = StorageFactory::factory([
    'adapter' => [
        'name'    => 'Filesystem',
        'options' => [
            'ttl' => 60,
            'cache_dir' => __DIR__.'/../cache'
        ],
    ],
    'plugins' => [
        'exception_handler' => ['throw_exceptions' => false],
        'Serializer'
    ],
]);
$service->setCache($cache);

$service->setRepositories([
    'https://userByRepo:password@svn.example.com/svn/repository',
    'https://userByRepo:password@svn.otherhost.com/repository'
]);

$service->responseJsonPackage();

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone who's code was used
  • Inspiration
  • etc