Download the PHP package okvpn/packeton without Composer

On this page you can find all versions of the php package okvpn/packeton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package packeton

Packeton - Private PHP package repository for vendors

Run Tests PHP Version Require Hits-of-Code Docker pulls License

Fork of Packagist. The Open Source alternative of Private Packagist for vendors, that based on Satis and Packagist.

Full documentation docs.packeton.org

Features

What was changed in this fork?

Table of content

Demo

See our Administration Demo. Username/password (admin/123456)

Install and Run in Docker

You can use packeton/packeton image or GitHub container registry ghcr.io/vtsykun/packeton:latest image

After container is running, you may wish to create an admin user via command packagist:user:manager

Or build and run docker container with docker-compose:

Docker Environment variables

Installation

Requirements

  1. Clone the repository
  2. Install dependencies: composer install
  3. Create .env.local and copy needed environment variables into it, see docker Environment variables section
  4. Run bin/console doctrine:schema:update --force --complete to set up the DB
  5. Create admin user via console.

  6. (optional) If you changed the configuration files, then you need to clear the cache rm -rf var/cache/* or php bin/console cache:clear

  7. Enable cron tabs and background jobs. Enable crontab crontab -e -u www-data or use Docker friendly build-in cron demand runner.

Example, run cron as background process without crontab. Can use with supervisor.

Setup Supervisor to run worker.

Create a new supervisor configuration.

Add the following lines to the file.

  1. IMPORTANT Make sure that web-server, cron and supervisor run under the same user, that should have an ssh key that gives it read (clone) access to your git/svn/hg repositories. If you run application under www-data you can add your ssh keys to /var/www/.ssh/

You should now be able to access the site, create a user, etc.

  1. Make a VirtualHost with DocumentRoot pointing to public/

Ssh key access and composer oauth token.

Packagist uses the Composer global config and global ssh-key to get read access to your repositories, so the supervisor worker packagist:run-workers and web-server must run under the user, that have ssh key or composer config that gives it read (clone) access to your git/svn/hg repositories. For example, if your application runs under www-data and have home directory /var/www, directory structure must be like this.

Example ssh config for multiple SSH Keys for different github account/repos, see here for details

If you have the error inserting your ssh in admin panel is because the ssh key was generated with newer OpenSSH. New keys with OpenSSH private key format can be converted using ssh-keygen utility to the old PEM format.

You can add GitHub/GitLab access token to auth.json of composer home dir (default APP_COMPOSER_HOME="%kernel.project_dir%/var/.composer") or use UI credentials, see here

Allow connections to http

You can create config.json in the composer home (see APP_COMPOSER_HOME env var) or add this option in the UI credentials form.

Don't use GitHub Api.

We disable usage GitHub API by default to force use ssh key or clone the repository via https as it would with any other git repository. You can enable it again with env option GITHUB_NO_API see here.

Configuration

In order to add a configuration add a file with any name to the folder config/packages/*. The config will merge with default values in priority sorted by filename.

The configuration for Docker installation is available at /data/config.yaml. Also, you can use docker volume to add config directly at path config/packages/ldap.yaml.

Where /var/www/packagist/ default ROOT for docker installation.

Full example of configuration.

Metadata format.

Packeton support metadata for Composer 1 and 2. For performance reasons, for Composer 1 uses metadata depending on the user-agent header: providers-lazy-url if ua != 1; provider-includes if ua == 1;

Format strategy UA 1 UA 2 UA is NULL
auto provider-includes metadata-url providers-lazy-url metadata-url providers-lazy-url metadata-url
only_v1 provider-includes provider-includes provider-includes
only_v2 metadata-url metadata-url metadata-url
full provider-includes metadata-url provider-includes metadata-url provider-includes metadata-url

Where UA 1 - Composer User-Agent = 1. UA 2 - Composer User-Agent = 2.

Update Webhooks

You can use GitLab, Gitea, GitHub, and Bitbucket project post-receive hook to keep your packages up to date every time you push code. More simple way use group webhooks, to prevent from being added it per each repository manually.

Provider Group webhook support Target Path
GitHub Yes https://example.org/api/github?token=
GitLab Only paid plan https://example.org/api/update-package?token=
Gitea Yes https://example.org/api/update-package?token=
Bitbucket Yes https://example.org/api/bitbucket?token=
Custom - https://example.org/api/update-package/{packnam}?token=

Bitbucket Webhooks

To enable the Bitbucket web hook, go to your BitBucket repository, open the settings and select "Webhooks" in the menu. Add a new hook. Y ou have to enter the Packagist endpoint, containing both your username and API token. Enter https://<app>/api/bitbucket?token=user:token as URL. Save your changes and you're done.

GitLab Service

To enable the GitLab service integration, go to your GitLab repository, open the Settings > Integrations page from the menu. Search for Packagist in the list of Project Services. Check the "Active" box, enter your packeton.org username and API token. Save your changes and you're done.

GitLab Group Hooks

Group webhooks will apply to all projects in a group and allow to sync all projects. To enable the Group GitLab webhook you must have the paid plan. Go to your GitLab Group > Settings > Webhooks. Enter https://<app>/api/update-package?token=user:token as URL.

GitHub Webhooks

To enable the GitHub webhook go to your GitHub repository. Click the "Settings" button, click "Webhooks". Add a new hook. Enter https://<app>/api/github?token=user:token as URL.

Manual or other hook setup

If you do not use Bitbucket or GitHub there is a generic endpoint you can call manually from a git post-receive hook or similar. You have to do a POST request to https://example.org/api/update-package?token=user:api_token with a request body looking like this:

It will be works with Gitea by default.

Also, you can use package name in path parameter, see ApiController

You can do this using curl for example:

Instead of using repo url you can use directly composer package name. You have to do a POST request with a request body.

Custom webhook format transformer

You can create a proxy middleware to transform JSON payload to the applicable inner format. In the first you need create a new Rest Endpoint to accept external request.

Go to Settings > Webhooks and click Add webhook. Fill the form:

For example, if the input request has a format, the twig payload may look like this:

See twig expression syntax for details.

Click the "Save button"

Now if you call the url https://APP_URL/api/webhook-invoke/your-unique-name?token=<user>:<token> request will be forward to https://APP_URL/api/update-package?token=user:token with converted POST payload according to your rules.

Usage and Authentication

By default, admin user have access to all repositories and able to submit packages, create users, view statistics. The customer users can only see related packages and own profile with instruction how to use api token.

To authenticate composer access to repository needs add credentials globally into auth.json, for example:

API Token you can found in your Profile.

Configure this private repository in your composer.json.

Create admin and maintainer users.

Application Roles

You can create a user and then promote to admin or maintainer via console using fos user bundle commands.

LICENSE

MIT


All versions of packeton with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-redis Version *
babdev/pagerfanta-bundle Version ^4.0 || dev-symfony-7 as 4.9.99
cebe/markdown Version ^1.1
composer/composer Version ^2.5
doctrine/annotations Version ^1.0
doctrine/cache Version ^1.10
doctrine/common Version ^3
doctrine/dbal Version ^3.7
doctrine/doctrine-bundle Version ^2.9
doctrine/orm Version ^2.15
ezyang/htmlpurifier Version ^4.16
firebase/php-jwt Version ^6.5
friendsofphp/proxy-manager-lts Version ^1.0
knplabs/knp-menu-bundle Version ^3.2
laminas/laminas-feed Version ^2.20
league/flysystem-async-aws-s3 Version ^3.15
league/flysystem-bundle Version ^3.1
nelmio/cors-bundle Version ^2.2
nelmio/security-bundle Version ^3.0
okvpn/cron-bundle Version ^1.1
okvpn/expression-language Version ^1.0
oro/doctrine-extensions Version ^2.0
pagerfanta/core Version ^3.7
pagerfanta/doctrine-orm-adapter Version ^3.7
pagerfanta/twig Version ^3.7
snc/redis-bundle Version ^4.4
symfony/asset Version ^6.4 || ^7.0
symfony/console Version ^6.4 || ^7.0
symfony/debug-bundle Version ^6.4 || ^7.0
symfony/dotenv Version ^6.4 || ^7.0
symfony/expression-language Version ^6.4 || ^7.0
symfony/flex Version ^2
symfony/form Version ^6.4 || ^7.0
symfony/framework-bundle Version ^6.4 || ^7.0
symfony/http-client Version ^6.4 || ^7.0
symfony/ldap Version ^6.4 || ^7.0
symfony/lock Version ^6.4 || ^7.0
symfony/mailer Version ^6.4 || ^7.0
symfony/mime Version ^6.4 || ^7.0
symfony/monolog-bundle Version ^3.8
symfony/process Version ^6.4 || ^7.0
symfony/property-access Version ^6.4 || ^7.0
symfony/property-info Version ^6.4 || ^7.0
symfony/runtime Version ^6.4 || ^7.0
symfony/security-bundle Version ^6.4 || ^7.0
symfony/serializer Version ^6.4 || ^7.0
symfony/translation Version ^6.4 || ^7.0
symfony/twig-bundle Version ^6.4 || ^7.0
symfony/validator Version ^6.4 || ^7.0
symfony/var-exporter Version ^6.4 || ^7.0
symfony/web-link Version ^6.4 || ^7.0
symfony/yaml Version ^6.4 || ^7.0
twig/extra-bundle Version ^3.4
twig/string-extra Version ^3.4
twig/twig Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package okvpn/packeton contains the following files

Loading the files please wait ....