Packeton - Private PHP package repository for vendors

Overview

Packeton - Private PHP package repository for vendors

Docker pulls Docker stars Docker version Docker layers

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

Features

  • Compatible with composer.
  • Support update webhook for GitHub, Bitbucket and GitLab.
  • Support custom webhook format.
  • Customers user and groups.
  • Generic Packeton webhooks
  • Limit access by vendor and versions.
  • Allow to freeze updates for the new releases after expire a customers license.
  • Mirroring for packages' zip files and downloads its from your host.
  • Allow to add ssh keys from UI and use multiple SSH Keys settings for different github/git accounts.

What was changed in this fork?

  • Disable anonymously access, registrations, spam/antispam, added groups and permissions.
  • Support MySQL and PostgresSQL.
  • Removed HWIOBundle, Algolia, GoogleAnalytics and other not used dependencies.

Table of content

Demo

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

Demo

Install and Run in Docker

Pull the image from docker hub https://hub.docker.com/r/okvpn/packeton:

docker pull okvpn/packeton

Run the image (with docker-composer):

version: '3'

services:
    packagist:
        image: okvpn/packeton:latest
        container_name: packagist
        restart: unless-stopped
        hostname: packagist
        volumes:
            - .docker/redis:/var/lib/redis  # Redis data
            - .docker/zipball:/var/www/packagist/app/zipball # Zipped archive cache for "dist" downloads
            - .docker/composer:/var/www/.composer  # Composer cache
            - .docker/ssh:/var/www/.ssh # Share here your ssh keys
        environment:
            PRIVATE_REPO_DOMAIN_LIST: bitbucket.org gitlab.com github.com
            PACKAGIST_DIST_HOST: https://pkg.okvpn.org # Dist url to download the zip package.
            DATABASE_HOST: 172.17.0.1
            DATABASE_PORT: 5432
            DATABASE_DRIVER: pdo_pgsql
            DATABASE_USER: postgres
            DATABASE_NAME: packagist
            DATABASE_PASSWORD: 123456
            ADMIN_USER: admin
            ADMIN_PASSWORD: composer
            ADMIN_EMAIL: [email protected]
            GITHUB_NO_API: 'true'
        ports:
          - 127.0.0.1:8080:80

Also you can configure Packeton server to run behind a NGINX reverse proxy. For example to enable ssl.

server {
    listen *:443 ssl http2;

    server_name pkg.okvpn.org;

    ssl_certificate /etc/letsencrypt/live/pkg.okvpn.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/pkg.okvpn.org/privkey.pem;
    ssl_dhparam /etc/nginx/ssl/dh.pem;
    ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4';
 
    ssl_protocols TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_session_cache  builtin:1000  shared:SSL:10m;
    ssl_session_timeout  5m;
    access_log  off;
    error_log  /var/log/nginx/pkg_error.log;

    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 16k;
    gzip_http_version 1.1;
    gzip_min_length 2048;
    gzip_types text/css image/svg+xml application/octet-stream application/javascript text/javascript application/json;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8080/;
    }
}

server {
    if ($host = pkg.okvpn.org) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    return 301 https://$host$request_uri;
    server_name pkg.okvpn.org;
}

Installation

Requirements

  • MySQL or PostgresSQL for the main data store.
  • Redis for some functionality (favorites, download statistics, worker queue).
  • git/svn/hg depending on which repositories you want to support.
  • Supervisor to run a background job worker
  1. Clone the repository
  2. Copy and edit app/config/parameters.yml and change the relevant values for your setup.
  3. Install dependencies: composer install
  4. Run bin/console doctrine:schema:create to setup the DB
  5. Run bin/console assets:install web to deploy the assets on the web dir.
  6. Run bin/console cache:warmup --env=prod and app/console cache:warmup --env=prod to warmup cache
  7. Create admin user via console.
php bin/console fos:user:create
# Add admin role
php bin/console fos:user:promote 
   
     ROLE_ADMIN
# Add maintainer role
php bin/console fos:user:promote 
    
      ROLE_MAINTAINER

    
   
  1. Enable cron tabs and background jobs. Enable crontab crontab -e -u www-data
* * * * * /var/www/packagist/bin/console --env=prod okvpn:cron >> /dev/null

Setup Supervisor to run worker.

sudo apt -y --no-install-recommends install supervisor

Create a new supervisor configuration.

sudo vim /etc/supervisor/conf.d/packagist.conf

Add the following lines to the file.

[program:packagist-workers]
environment =
        HOME=/var/www/
command=/var/www/packagist/bin/console packagist:run-workers --env=prod --no-debug
directory=/var/www/packagist/
process_name=%(program_name)s_%(process_num)02d
numprocs=1
autostart=true
autorestart=true
startsecs=0
redirect_stderr=true
priority=1
user=www-data
  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 web/

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.

    └── /var/www/
        ├── .ssh/ # ssh keys directory
        │   ├── config
        │   ├── id_rsa # main ssh key
        │   ├── private_key_2 # additional ssh key
        │   └── private_key_3
        │
        └── .composer/ # composer home
            ├── auth.json
            └── config.json
    

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

# .ssh/config - example

Host github-oroinc
	HostName github.com
	User git
	IdentityFile /var/www/.ssh/private_key_2
	IdentitiesOnly yes

Host github-org2
	HostName github.com
	User git
	IdentityFile /var/www/.ssh/private_key_3
	IdentitiesOnly yes

You can add GitHub/GitLab access token to auth.json, see here

{
    "github-oauth": {
        "github.com": "xxxxxxxxxxxxx"
    }
}

Don't use GitHub Api.

By default composer will use GitHub API to get metadata for your GitHub repository, you can add use-github-api to composer config.json to always use ssh key and clone the repository as it would with any other git repository, see here

Update Webhooks

You can use GitLab, GitHub, and Bitbucket project post-receive hook to keep your packages up to date every time you push code.

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:// /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:// /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:// /api/github?token=user:token as URL.

Manual 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://pkg.okvpn.org/api/update-package?token=user:api_token with a request body looking like this:

{
  "repository": {
    "url": "PACKAGIST_PACKAGE_URL"
  }
}

Also you can overwrite regex that was used to parse the repository url, see ApiController

[a-z0-9.-]+)(?::[0-9]+/|[:/])(scm/)?(?P [\\w.-]+(?:/[\\w.-]+?)+)(?:\\.git|/)?$}i" } }">
{
  "repository": {
    "url": "PACKAGIST_PACKAGE_URL"
  },
  "packeton": {
    "regex": "{^(?:ssh://git@|https?://|git://|git@)?(?P
    
     [a-z0-9.-]+)(?::[0-9]+/|[:/])(scm/)?(?P
     
      [\\w.-]+(?:/[\\w.-]+?)+)(?:\\.git|/)?$}i"
  }
}

     
    

You can do this using curl for example:

curl -XPOST -H 'content-type:application/json' 'https://pkg.okvpn.org/api/update-package?token=user:api_token' -d' {"repository":{"url":"PACKAGIST_PACKAGE_URL"}}'

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

{
  "composer": {
    "package_name": "okvpn/test"
  }
}
{
  "composer": {
    "package_name": ["okvpn/test", "okvpn/pack2"]
  }
}

Custom webhook format transformer

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

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

  • url - https:// /api/update-package?token=user:token
  • More options > Name restriction - #your-unique-name# (must be a valid regex)
  • Trigger > By HTTP requests to https://APP_URL/api/webhook-invoke/{name} - select checkbox
  • Payload - Write a script using twig expression to transform external request to POST request from previous example.

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

{
   "repository":{
      "slug":"vtsykun-packeton",
      "id":11,
      "name":"vtsykun-packeton",
      "scmId":"git",
      "state":"AVAILABLE",
      "links": {
          "clone": [
              {"href": "https://github.com/vtsykun/packeton.git"}
          ]
      }
   }
}
{% set repository = request.repository.links.clone[0].href %}
{% if repository is null %}
    {{ interrupt('Request does not contains repository link') }}
{% endif %}

{% set response = {
    'repository': {'url': repository },
    'packeton': {'regex': '{^(?:ssh://git@|https?://|git://|git@)?(?P
   
    [a-z0-9.-]+)(?::[0-9]+/|[:/])(scm/)?(?P
    
     [\\w.-]+(?:/[\\w.-]+?)+)(?:\\.git|/)?$}i
     '
    
   } 
} %}

{{ response|json_encode }}

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= : 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:

composer config --global --auth http-basic.pkg.okvpn.org 
    
    

    
   

API Token you can found in your Profile.

Configure this private repository in your composer.json.

{
  "repositories": [{
      "type": "composer",
      "url": "https://packeton.company.com"
  }],
  "require": {
    "company/name1": "1.0.*",
    ....
  }
}

Create admin and maintainer users.

Only admin and maintainer user can submit a new package. Only admin user can create the new customer users. You can create an user and then promote to admin or maintainer via console using fos user bundle commands.

php bin/console fos:user:create
php bin/console fos:user:promote 
   
     ROLE_ADMIN

   

LICENSE

MIT

Comments
  • 400 Bad Request at first run

    400 Bad Request at first run

    Hi,

    I installed successfully packeton from sources but when I try to access the page (first time) on my browser, I got this error:

    Oops! An Error Occurred
    The server returned a "400 Bad Request".
    Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
    

    I've also noticed that what is causing the bad request is the xhr request to / and /favicon.ico.

    How can I fix it?

    Thanks

    opened by maicol07 17
  • Api authorization not working

    Api authorization not working

    Hello,

    I've successfully setup packeton and everything works fine except the API authentication. I always get an Invalid credentials error:

    bash-4.4$ composer --version
    Composer version 1.10.6 2020-05-06 10:28:10
    

    composer.json

    {
            "repositories": [
                    {"type": "composer", "url": "https://.....com/"}
            ],
            "name": "testABC/a-test",
            "description" : "Just a test",
            "license": "GPL-2.0-or-later",
            "config": {
                    "platform": {
                            "php": "7.4"
                    }
            },
            "require": {
                    "test/abc": "^1.0"
            }
    }
    

    composer install

    bash-4.4$ composer install -vvv
    Reading ./composer.json
    Loading config file /.config/composer/config.json
    Loading config file ./composer.json
    Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
    Executing command (/httpdocs/web/test): git branch --no-color --no-abbrev -v
    Executing command (/httpdocs/web/test): git describe --exact-match --tags
    Executing command (/httpdocs/web/test): git log --pretty="%H" -n1 HEAD
    Executing command (/httpdocs/web/test): hg branch
    Executing command (/httpdocs/web/test): fossil branch list
    Executing command (/httpdocs/web/test): fossil tag list
    Executing command (/httpdocs/web/test): svn info --xml
    Failed to initialize global composer: Composer could not find the config file: /.config/composer/composer.json
    To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
    Running 1.10.6 (2020-05-06 10:28:10) with PHP 7.4.3 on Linux / 4.9.0-12-amd64
    Loading composer repositories with package information
    Downloading https://........com/packages.json
        Authentication required (......com):
          Username: user1
          Password:
    Using HTTP basic authentication with username "user1"
    Downloading https://........com/packages.json
    Downloading https://........com/packages.json
    Downloading https://........com/packages.json
    
    
      [Composer\Downloader\TransportException]
      Invalid credentials for 'https://........com/packages.json', aborting.
    

    Did something changed in the composer authentication mechanism which broke the API access in packeton?

    Thanks in advance.

    opened by vigri 7
  • What are the github.com ssh keys in the docker container used for?

    What are the github.com ssh keys in the docker container used for?

    Hey, First of all thanks for maintaining this awesome package. 👍

    I just have a quick question. I installed packeton on a server using docker and found that there were 3 ssh keys for github.com saved in the ~/.ssh file.

    What are these keys used for?

    opened by PatrickHollweck 4
  • Provide integration with Gitlab/Github/Bitbucket API update hooks

    Provide integration with Gitlab/Github/Bitbucket API update hooks

    Provide integration with Gitlab API update hooks.

    see https://github.com/vtsykun/packeton#gitlab-service

    Unsure if this should just be applied to ROLE_USER rather than ROLE_MAINTAINER, but ROLE_MAINTAINER makes the most sense to me, unless normal users should still be able to trigger package updates.

    opened by codebymikey 3
  • Packeton is not respecting config.json (composer)

    Packeton is not respecting config.json (composer)

    Hi there,

    I've setup a Packeton instance in my local network. When I try to add a package from a server which is on my local network too I get an error:

    image

    I'm aware of the risks, but since this is a test-setup in my local network this shouldn't be a problem.

    According to the manual secure-http should be set to false inside config.json to enable http-connections.

    https://github.com/vtsykun/packeton#ssh-key-access-and-composer-oauth-token says the .config.json should be placed inside the root-directory of the app under .composer/config.json

    This is what my config.json looks like

    {
        "config": {
            "secure-http": false
        }
    }
    

    Unfortunately the error remains.

    Can you tell me please how to debug this error further?

    opened by vigri 3
  • Zipball configuration

    Zipball configuration

    I've got this error:

    - Installing package/name (0.1.1): Downloading (failed)    Failed to download  package/name  from dist: The "https://example.com/zipball/package/name /1ccc92dc6d3aec958cd087b57c8d6bc6e0d7c6e3.zip" file could not be downloaded (HTTP/1.1 404 Not Found)
        Now trying to download from source
      - Installing  package/name  (0.1.1): Cloning 1ccc92dc6d from cache
    

    What should i change in config to change example.com to my domain?

    opened by hotrush 3
  • Bump twig/twig from 2.12.3 to 2.15.3

    Bump twig/twig from 2.12.3 to 2.15.3

    Bumps twig/twig from 2.12.3 to 2.15.3.

    Changelog

    Sourced from twig/twig's changelog.

    2.15.3 (2022-09-28)

    • Fix a security issue on filesystem loader (possibility to load a template outside a configured directory)

    2.15.2 (2022-08-12)

    • Allow inherited magic method to still run with calling class
    • Fix CallExpression::reflectCallable() throwing TypeError
    • Fix typo in naming (currency_code)

    2.15.1 (2022-05-17)

    • Fix optimizing non-public named closures

    2.15.0 (2022-05-15)

    • Add support for named closures

    2.14.13 (2022-04-06)

    • Enable bytecode invalidation when auto_reload is enabled

    2.14.12 (2022-03-25)

    • Fix custom escapers when using multiple Twig environments
    • Do not reuse internally generated variable names during parsing

    2.14.11 (2022-02-04)

    • Fix a security issue when in a sandbox: the sort filter must require a Closure for the arrow parameter
    • Fix deprecation notice on round
    • Fix call to deprecated convertToHtml method

    2.14.10 (2022-01-03)

    • Allow more null arguments when Twig expects a string (for better 8.1 support)

    2.14.9 (2022-01-03)

    • Allow null when Twig expects a string (for better 8.1 support)
    • Add support for PHP 7.1 back
    • Make some performance optimizations
    • Allow Symfony translation contract v3+

    2.14.8 (2021-11-25)

    • Bump minimum supported Symfony component versions
    • Fix a deprecated message

    2.14.7 (2021-09-17)

    ... (truncated)

    Commits
    • ab40267 Prepare the 2.15.3 release
    • fc18c2e Update CHANGELOG
    • d6ea14a Merge branch '1.x' into 2.x
    • 35f3035 security #cve- Fix a security issue on filesystem loader (possibility to load...
    • 9170edf Fix doc CS
    • fab3e0f minor #3744 Adding installation instructions for Symfony (ThomasLandauer)
    • c034c1d Adding installation instructions for Symfony
    • 226b73c minor #3735 Use the PHP doc builder instead of Sphinx in CI (fabpot)
    • fcf65bd Use the PHP doc builder instead of Sphinx in CI
    • 6fe9edf minor #3734 Make doc clearer for the replace filter (fabpot)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump composer/composer from 1.9.3 to 1.10.26

    Bump composer/composer from 1.9.3 to 1.10.26

    Bumps composer/composer from 1.9.3 to 1.10.26.

    Release notes

    Sourced from composer/composer's releases.

    1.10.26

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)

    1.10.25

    • Fixed selfupdate on Windows + PHP 8.1 regression (#10446)

    1.10.24

    1.10.23

    • Security: Fixed command injection vulnerability on Windows (GHSA-frqg-7g38-6gcf / CVE-2021-41116)

    1.10.22

    • Security: Fixed command injection vulnerability in HgDriver/HgDownloader and hardened other VCS drivers and downloaders (GHSA-h5h8-pc6h-jvvx / CVE-2021-29472)

    1.10.21

    • Fixed support for new GitHub OAuth token format
    • Fixed processes silently ignoring the CWD when it does not exist

    1.10.20

    • Fixed exclude-from-classmap causing regex issues when having too many paths
    • Fixed compatibility issue with Symfony 4/5

    1.10.19

    • Fixed regression on PHP 8.0

    1.10.18

    • Allow installation on PHP 8.0

    1.10.17

    • Fixed Bitbucket API authentication issue
    • Fixed parsing of Composer 2 lock files breaking in some rare conditions

    1.10.16

    • Added warning to validate command for cases where packages provide/replace a package that they also require
    • Fixed JSON schema validation issue with PHPStorm
    • Fixed symlink handling in archive command

    1.10.15

    • Fixed path repo version guessing issue

    1.10.14

    • Fixed version guesser to look at remote branches as well as local ones
    • Fixed path repositories version guessing to handle edge cases where version is different from the VCS-guessed version
    • Fixed COMPOSER env var causing issues when combined with the global command
    • Fixed a few issues dealing with PHP without openssl extension (not recommended at all but sometimes needed for testing)

    ... (truncated)

    Changelog

    Sourced from composer/composer's changelog.

    [1.10.26] 2022-04-13

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)

    [1.10.25] 2022-01-21

    • Fixed selfupdate on Windows + PHP 8.1 regression (#10446)

    [1.10.24] 2021-12-09

    [1.10.23] 2021-10-05

    • Security: Fixed command injection vulnerability on Windows (GHSA-frqg-7g38-6gcf / CVE-2021-41116)

    [1.10.22] 2021-04-27

    • Security: Fixed command injection vulnerability in HgDriver/HgDownloader and hardened other VCS drivers and downloaders (GHSA-h5h8-pc6h-jvvx / CVE-2021-29472)

    [1.10.21] 2021-04-01

    • Fixed support for new GitHub OAuth token format
    • Fixed processes silently ignoring the CWD when it does not exist

    [1.10.20] 2021-01-27

    • Fixed exclude-from-classmap causing regex issues when having too many paths
    • Fixed compatibility issue with Symfony 4/5

    [1.10.19] 2020-12-04

    • Fixed regression on PHP 8.0

    [1.10.18] 2020-12-03

    • Allow installation on PHP 8.0

    [1.10.17] 2020-10-30

    • Fixed Bitbucket API authentication issue
    • Fixed parsing of Composer 2 lock files breaking in some rare conditions

    [1.10.16] 2020-10-24

    • Added warning to validate command for cases where packages provide/replace a package that they also require
    • Fixed JSON schema validation issue with PHPStorm
    • Fixed symlink handling in archive command

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump twig/twig from 2.12.3 to 2.14.11

    Bump twig/twig from 2.12.3 to 2.14.11

    Bumps twig/twig from 2.12.3 to 2.14.11.

    Changelog

    Sourced from twig/twig's changelog.

    2.14.11 (2022-02-04)

    • Fix a security issue when in a sandbox: the sort filter must require a Closure for the arrow parameter

    2.14.10 (2022-01-03)

    • Allow more null arguments when Twig expects a string (for better 8.1 support)

    2.14.9 (2022-01-03)

    • Allow null when Twig expects a string (for better 8.1 support)
    • Add support for PHP 7.1 back
    • Make some performance optimizations
    • Allow Symfony translation contract v3+

    2.14.8 (2021-11-25)

    • Bump minimum supported Symfony component versions
    • Fix a deprecated message

    2.14.7 (2021-09-17)

    • Allow Symfony 6
    • Improve compatibility with PHP 8.1
    • Explicitly specify the encoding for mb_ord in JS escaper

    2.14.6 (2021-05-16)

    • Revert "Throw a proper exception when a template name is an absolute path (as it has never been supported)"

    2.14.5 (2021-05-12)

    • Fix PHP 8.1 compatibility
    • Throw a proper exception when a template name is an absolute path (as it has never been supported)

    2.14.4 (2021-03-10)

    • Add the slug filter

    2.14.3 (2021-01-05)

    • Fix extra bundle compat with older versions of Symfony

    2.14.2 (2021-01-05)

    • Fix "odd" not working for negative numbers

    2.14.1 (2020-10-27)

    • Fix "include(template_from_string())"

    ... (truncated)

    Commits
    • 66baa66 Prepare the 2.14.11 release
    • 22b9dc3 bug #3641 Disallow non closures in sort filter when the sanbox mode is enab...
    • 2eb3308 Disallow non closures in sort filter when the sanbox mode is enabled
    • e056e63 bug #3638 Fix call to deprecated "convertToHtml" method (jderusse)
    • 779fdd0 Fix call to deprecated "convertToHtml" method
    • bbc3377 minor #3629 Fix map example output (alexander-schranz)
    • 9741173 Fix map example output
    • 9984a6e minor #3628 Rename variables used in map method (alexander-schranz)
    • b74cf2a Rename variables used in map method
    • e8068a9 bug #3626 The deprecated null value for the method round has been changed to ...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • New maintainer role

    New maintainer role

    Hello, we're deployng Packeton for our company, and we would find really useful a new role: maintainer. Since all of the developers in our company should be able to browse all packages or submit, edit and update new ones. We're forking it and we're gonna try to implement it ourselves, would you be interested in a pull request?

    opened by ulentini 1
  • Api authorization

    Api authorization

    Hi, im getting this message for Gitlab Packagist service. Test failed. {"status":"error","message":"Authorization Required"}

    https://pkg.okvpn.org/api/update-package?username=admin&apiToken=mdO9xasItyv2ECA3Ugk5

    Request headers: Content-Type: application/json X-Gitlab-Event: Service Hook

    Thanks

    opened by bajki 1
  • Feature/allow read only access

    Feature/allow read only access

    This change will allow Packeton to be configured, to allow access to the packages without authentication.

    • Added an example security.yml.ro (readonly)
    • Conditional allowing access in some controllers
    • Added packagist_web.allow_read_only_access variable
    opened by roelandg 1
  • MyURL.com/packages/submit and create new user giving HTTP ERROR 500

    MyURL.com/packages/submit and create new user giving HTTP ERROR 500

    I have setup packeton on local and when I am trying to submit my package, it is giving me HTTP ERROR 500. HTTP ERROR 500 comes when creating new user as well. it is happening on Demo error_create_user

    opened by pawan 1
  • Feature Request: Submit API

    Feature Request: Submit API

    We are in the process of moving from Satis to Packeton. To add new packages from our bitbucket we made a script to scan bitbucket for composer modules and add them to satis.

    It would be nice to be able to handle this nicely with an endpoint in Packeton. Or is this already possible with an existing endpoint?

    Of course it's also possible to just add them to the database (which is probably what i'll do) But an endpoint is a lot nicer and could provide extra validation.

    opened by indykoning 1
  • Regenerate missing dist files referenced by older composer.lock files.

    Regenerate missing dist files referenced by older composer.lock files.

    Addresses #34

    I believe the original culprit is this method in the Updater class.

    https://github.com/vtsykun/packeton/blob/9918257c4b7a83f2a7965785f40e98ae39164d25/src/Packagist/WebBundle/Package/Updater.php#L604-L623

    I think composer.lock files should always be the source of truth, and if a previous composer install ran successfully, then a future composer install should as well.

    This bug/behaviour is more apparent when multiple repos/composer.lock reference different dev- versions of a package.

    Potential changes to the Updater code are as follows:

    • Add Symfony configuration for whether old dist files should be deleted (most flexible).
    • Update logic so that it doesn't delete dev- or -dev version dists (it's rare for a tagged version to switch commit hashes, but it can still happen, and should still be supported).
    • Leave as is, but redownload the file as needed using the updated ProviderController::zipballAction logic.

    Thoughts welcome.

    I think the service should definitely be able to generate missing dist hashes when needed, since composer tries to do a git clone anyway if its unable to download a dist.

    opened by codebymikey 0
Releases(v2.0.0-rc1)
Owner
Uladzimir Tsykun
Uladzimir Tsykun
Private Composer registry for private PHP packages on AWS Serverless

Tug Tug is a Composer private registry for private PHP packages installable with Composer (1 and 2). The main idea of this project is to have an inter

Fxp 33 Oct 5, 2022
Repman - PHP Repository Manager: packagist proxy and host for private packages

Repman - PHP Repository Manager Repman is a PHP repository manager. Main features: free and open source works as a proxy for packagist.org (speeds up

Repman 438 Jan 2, 2023
Your private self hosted composer repository with user management

Devliver Your private self-hosted composer repository. Requirements Docker MariaDB/MySQL the running docker container has access to private git reposi

Nikita Loges 53 Dec 30, 2022
Initiated by me, enhanced by us, created for us. This is the fork (public) version separated from my private diary repository.

diary public repository Initiated by me, enhanced by us, created for us. This is the fork (public) version separated from my private diary repository.

Weicheng Ao 3 Jul 30, 2022
It is the latest version of private RAT called Xworm. I share this one for free, so leave the star⭐ to this repository

XWorm-RAT-cracked- It is the latest version of private RAT called Xworm. I share this one for free, so leave the star ⭐ to this repository COMPILING:

null 67 Jan 1, 2023
Core for Geometry Dash Private Server

DX Core Core version: 1.3.001 Supported version of Geometry Dash: 1.0 - 1.3 Required version of PHP: 5.4+ (tested up to 7.4) Setup Upload the files on

DeXotik 5 Oct 22, 2022
A Laravel Wrapper for the Binance API. Now easily connect and consume the Binance Public & Private API in your Laravel apps without any hassle.

This package provides a Laravel Wrapper for the Binance API and allows you to easily communicate with it. Important Note This package is in early deve

Moinuddin S. Khaja 7 Dec 7, 2022
Private groups to share messages, photos, videos, links with friends and family.

A truly private space for you and your friends What is Zusam ? Zusam (/tsuˈzam/) is a free and open-source way to self-host private forums for groups

Zusam 104 Dec 20, 2022
Starless Sky: private, secure and untraceable identity system.

Descentralized network protocol providing smart identity over an secure layer. What is the Starless Sky Protocol? Starless Sky is a network protocol f

Starless Sky Protocol 3 Jun 19, 2022
DeNOTE: Encrypted, Private, and Secure Notes.

DeNOTE Welcome to DeNOTE, the private encrypted one-view note-taking platform. DeNOTE is still in beta, so our UI is not very good :(. WHAT IT DOES: D

mrfakename 1 Nov 7, 2022
Port of the Java Content Repository (JCR) to PHP.

PHP Content Repository PHPCR This repository contains interfaces for the PHPCR standard. The JSR-283 specification defines an API for a Content Reposi

PHPCR 436 Dec 30, 2022
This is the code repository for The Art of Modern PHP 8, published by Packt.

The Art of Modern PHP 8 This is the code repository for The Art of Modern PHP 8, published by Packt. Your practical and essential guide to getting up

Packt 35 Jan 2, 2023
Backend repository of libreoupas project, fully written in PHP, using the datas provided by the University.

libreoupas-engine/fst-nancy Description libreoupas est un site Internet permettant aux étudiant de la Faculté des Strasbourg illkirsh d'avoir accès au

Clément Colné 5 Jan 6, 2022
the repository uses some of the code from php-meminfo to simplify integration

the repository uses some of the code from php-meminfo to simplify integration

Dmitriy Bulgar 1 Nov 18, 2021
This repository contains the codebase PHP bridge using RoadRunner Jobs plugin.

RoadRunner Jobs Plugin This repository contains the codebase PHP bridge using RoadRunner Jobs plugin. Installation To install application server and J

Spiral Scout 15 Nov 9, 2022
A repository for showcasing my knowledge of the PHP programming language, and continuing to learn the language.

Learning PHP (programming language) I know very little about PHP. This document will list all my knowledge of the PHP programming language. Basic synt

Sean P. Myrick V19.1.7.2 2 Oct 29, 2022
Composer plugin for Repman - PHP Repository Manager

Repman Composer Plugin Composer plugin for Repman - PHP Repository Manager. Adds a mirror url for all your dependencies without need to update compose

Repman 9 Mar 14, 2022
Easy Repository pattern for PHP Phalcon framework.

Phalcon Repositories Introduction Phalcon Repositories lets you easily build repositories for your Phalcon models, for both SQL and Mongo drivers. PHP

Michele Angioni 18 Oct 7, 2022
Commands and implementations for common tasks for the PHP Content Repository (PHPCR) API.

PHPCR Utilities Commands and implementations for common tasks for the PHP Content Repository (PHPCR) API. If you are using or implementing PHPCR you p

PHPCR 65 Nov 20, 2022