Giter Site home page Giter Site logo

composer / satis Goto Github PK

View Code? Open in Web Editor NEW
3.1K 97.0 510.0 2.99 MB

Simple static Composer repository generator - For a full private Composer repo use Private Packagist

License: MIT License

PHP 81.19% Batchfile 0.05% Shell 0.26% Dockerfile 0.40% JavaScript 10.43% SCSS 0.52% Twig 7.14%
composer packagist static-packagist static-repository hacktoberfest

satis's Introduction

Composer

Dependency Management for PHP

Composer helps you declare, manage, and install dependencies of PHP projects.

See https://getcomposer.org/ for more information and documentation.

Continuous Integration

Installation / Usage

Download and install Composer by following the official instructions.

For usage, see the documentation.

Packages

Find public packages on Packagist.org.

For private package hosting take a look at Private Packagist.

Community

Follow @packagist or @seldaek on Twitter for announcements, or check the #composerphp hashtag.

For support, Stack Overflow offers a good collection of Composer related questions, or you can use the GitHub discussions.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project and its community you agree to abide by those terms.

Requirements

Latest Composer

PHP 7.2.5 or above for the latest version.

Composer 2.2 LTS (Long Term Support)

PHP versions 5.3.2 - 8.1 are still supported via the LTS releases of Composer (2.2.x). If you run the installer or the self-update command the appropriate Composer version for your PHP should be automatically selected.

Binary dependencies

  • 7z (or 7zz)
  • unzip (if 7z is missing)
  • gzip
  • tar
  • unrar
  • xz
  • Git (git)
  • Mercurial (hg)
  • Fossil (fossil)
  • Perforce (p4)
  • Subversion (svn)

It's important to note that the need for these binary dependencies may vary depending on individual use cases. However, for most users, only 2 dependencies are essential for Composer: 7z (or 7zz or unzip), and git.

Authors

See also the list of contributors who participated in this project.

Security Reports

Please send any sensitive issue to [email protected]. Thanks!

License

Composer is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

satis's People

Contributors

alcohol avatar andrerom avatar carsonf avatar carusogabriel avatar cs278 avatar davidgarciacat avatar dependabot[bot] avatar flyingmana avatar freezy-sk avatar glensc avatar gromnan avatar h4cc avatar hsegnitz avatar jakzal avatar jamesrezo avatar kevindierkx avatar kornrunner avatar miklos-martin avatar naderman avatar pavog avatar ph-fritsche avatar renanbr avatar seldaek avatar shochdoerfer avatar simesy avatar sokolnikov911 avatar staabm avatar stof avatar theimbender avatar till avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

satis's Issues

Packagist as fallback for dependencies

With "require-dependencies": true I have to provide the repositories every dependency. It would be nice, if satis could search Packagist, if it can't find the repository in the local satis.json.

Generate index.html without re-scanning repositories

The satis build command does a couple of things:

  1. Scans repositories for new versions.
  2. Generates a packages.json file.
  3. Generates an index.html file.

When tweaking the Twig template for index.html, it would be useful to have a command for only doing step 3, or at least to avoid doing step 1, which can take a long time.

Github Webhook Integration

Github has this wonderful feature of webhooks, which is beautifully generic. Now instead of running a satis update every 2 minutes, wouldn't it be much more convenient to run the update only when the webhook is called? Our installation has only a handful of repos in it, mostly libraries that change either multiple times in a day or then not for days or even weeks. So instead of running a cronjob every 5 minutes to ensure the packages.json is fresh, the webhook would be the ideal candidate for the task.

I'm currently working on creating something like this. I don't know yet how exactly I'll be implementing it, but I would love to hear input, so maybe I can publish my efforts here later.

Add require-all

There should be a top level "require-all": true option to just force a full require of all packages. Packagist should probably be disabled by default for satis to prevent dumping all packagist packages again.

Update instructions

How do I update my satis installation? The README does not seem to give any help about this.

Hitting proc_open limit

I'm attempting to run satis to re-create the Zend Framework composer repository, and using the new "archive" feature to grab download zips from GitHub.

I have around 80 repositories I'm scanning.

I think somewhere around 75, I got an error message:

Fatal error: Uncaught exception 'ErrorException' with message 'proc_open(): unable to o create pipe Too many open files

Fortunately, re-running the command, satis was able to discover the files it had already downloaded, and finished quickly.

That said, this would be a nice issue to resolve, for those building composer repositories from many VCS sources.

Build dist-files manually (repository type: package)

Hello!

I need to do some pre-processing on files that I build packages from, building from VCS without this step doesn't work for me. Reading the satis documentation, I expected to use the following configuration with the package repository type:

{
    "name": "Private repo",
    "homepage": "http://satis.private.lan",
    "repositories": [
        { "type": "package", "name": "vendor/package", "version": "1.0.0", "dist": { "url": "http://packages.private.lan/build/private-package-1.0.0.tar", "type": "tar" } }
    ],
    "archive": { "directory": "dist", "format": "tar", "prefix-url": "http://satis.private.lan/" },
    "require-all": true
}

Any chance of getting this implemented?

Currently I'm getting the following error:

[ErrorException]
Undefined index: package

Best,
Tit

Error while mirroring PEAR repository

Hi,

I am trying to put up a PEAR mirror in order to handle legacy packages such as Net_FTP or so.

It's working great by adding PEAR repositories to the client's local config.json file, but I need to centralize the list of PEAR repositories.

I have set up a specific Satis mirror for PEAR repositories, which seems to be correctly configured.

Here is the local config.json:

{
    "config": {
        "github-protocols": ["https", "git"],
        "preferred-install": "dist",
        "cache-files-ttl": 0

    },
    "repositories": {
       ...
        "pear-mirror": {
            "type": "composer",
            "url": "http://*****/repositories/pear"
        }
   }
}

Here is the repository config:

{
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear2.php.net"
        },
        {
            "type": "pear",
            "url": "http://pear.php.net"
        },        
        ***
    ],
    "require-dependencies": true,
        "require": {
            "pear-pear/Net_FTP": "*",
            ****

    },
    "archive": {
        "directory": "dist",
        "prefix-url": "http://****/repositories/pear",
        "format": "zip",
        "skip-dev": false
    }
}

This config is validated by a search on the client side:

>>> composer show pear-pear.php.net/Net_FTP
name     : pear-pear.php.net/Net_FTP
descrip. : Net_FTP allows you to communicate with FTP servers in a more comfortable way
than the native FTP functions of PHP do. The class implements everything natively
supported by PHP and additionally features like recursive up- and downloading,
dircreation and chmodding. It also implements an observer pattern to allow
for example the view of a progress bar.
keywords : 
versions : 1.4.0a3, 1.4.0a2, 1.4.0a1, 1.3.7, 1.3.6, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.3.0RC2, 1.3.0RC1, 1.3.0beta4, 1.3.0beta3, 1.3.0beta2, 1.3.0beta1, 1.2, 1.1, 1.0, 0.9, 0.5
type     : pear-library
license  : 
source   : []  
dist     : [zip] http://***/repositories/pear/dist/pear-pear.php.net-net_ftp-1.4.0a3.zip 1.4.0a3
names    : pear-pear.php.net/net_ftp, pear-pear/net_ftp
...

But when I require the package an exception is thrown.

>>> composer require  "pear-pear.php.net/Net_FTP *"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing pear-pear.php.net/net_ftp (1.3.7)
    Downloading: 100%         


  [UnexpectedValueException]                                                                                                          
  PEAR package file is not found at /home/***/.composer/test/vendor/pear-pear.php.net/Net_FTP/pear-pear.php.net-net_ftp-1.3.7.zip  

Is this a bug or am I missing something?

Thanx

add support for type vcs, without tags/ or branches/ directories

currently i have svn repo, where branches/ is missing. would be nice to be able to specify that "do not look for branches", and similarily worth to disable looking for tags/

so for now i "hacked it a bit" specifying path to be something existing:

    {  
        "type": "vcs",
        "url": "svn+ssh://svn.example.org/utils/project",
        "branches-path": "trunk"
    },

in fact, "branches-path": null is completely ignored (value stays like i never defined it, i.e branches/) and "branches-path": false makes it search svn+ssh://svn.example.org/utils/project (string concat "" + false results original string), but it fails somewhere else with this

Broken archives

[UnexpectedValueException]                                                                            
The checksum verification of the file failed (downloaded from http://localhost/satis/dist/doctrine-inflector-v1.0-v1.0-a851fa.zip)

I had this message for several packages while reading from my local satis repository.

Because I create the corresponding repository short before that from scratch, which took around 20min, I guess it is because packagist updated its index during my build. I removed the broken files and re-run build, but I had to do this for every package I noticed, that it is broken and now I also don't know, which one is still broken.

Creating new project fails on symfony/Process

When I create a new Satis project as per the documentation:

composer.phar create-project composer/satis

It fails with the following exception:

  [RuntimeException]                                                                              
  Failed to clone http://github.com/symfony/Process via git, https and http protocols, aborting.  

  - git://github.com/symfony/Process                                                              
    fatal: reference is not a tree: fc536cce9e41251135595a8fa21635800199b51b                      

  - https://github.com/symfony/Process                                                            
    fatal: reference is not a tree: fc536cce9e41251135595a8fa21635800199b51b                      

  - http://github.com/symfony/Process                                                             
    fatal: reference is not a tree: fc536cce9e41251135595a8fa21635800199b51b    

Archive: No `dist` property for SVN repository

The new archive functionality is creating the zipballs correctly, but does not add the dist-property in the packages.json for "smarty". Maybe it's not working for SVN repos (it's the only SVN repo we use)?

Source json:

{
        "name": "Foo Bar",
        "homepage": "http://satis.foobar.ch/",
        "archive": {
                "directory": "dist"
        },
        "require": {
                "smarty/smarty": "3.1.13",
                "leafo/lessphp": "0.3.9"
        },
        "repositories": [
                {
                        "type": "composer",
                        "url": "https://packagist.org"
                }
        ]
}

Creates these files:

.
โ”œโ”€โ”€ dist
โ”‚ย ย  โ”œโ”€โ”€ leafo-lessphp-v0.3.9-v0.3.9-cdc0ce.zip
โ”‚ย ย  โ””โ”€โ”€ smarty-smarty-v3.1.13-830af7.zip
โ”œโ”€โ”€ index.html
โ””โ”€โ”€ packages.json

While the packages.json looks like:

{
    "packages": {
        "leafo/lessphp": {
            "v0.3.9": {
                "name": "leafo/lessphp",
                "version": "v0.3.9",
                "version_normalized": "0.3.9.0",
                "source": {
                    "type": "git",
                    "url": "https://github.com/leafo/lessphp.git",
                    "reference": "v0.3.9"
                },
                "dist": {
                    "type": "zip",
                    "url": "http://satis.cargomedia.ch/dist/dist/leafo-lessphp-v0.3.9-v0.3.9-cdc0ce.zip",
                    "reference": "v0.3.9",
                    "shasum": "e2f60ed0e6d2fc7d5d15e386a7f15b687a6e3e02"
                },
                "time": "2013-03-02 16:13:31",
                "type": "library",
                "extra": {
                    "branch-alias": {
                        "dev-master": "0.3-dev"
                    }
                },
                "installation-source": "source",
                "autoload": {
                    "classmap": [
                        "lessc.inc.php"
                    ]
                },
                "notification-url": "https://packagist.org/downloads/",
                "license": [
                    "MIT",
                    "GPL-3.0"
                ],
                "authors": [
                    {
                        "name": "Leaf Corcoran",
                        "email": "[email protected]",
                        "homepage": "http://leafo.net"
                    }
                ],
                "description": "lessphp is a compiler for LESS written in PHP.",
                "homepage": "http://leafo.net/lessphp/"
            }
        },
        "smarty/smarty": {
            "v3.1.13": {
                "name": "smarty/smarty",
                "version": "v3.1.13",
                "version_normalized": "3.1.13.0",
                "source": {
                    "type": "svn",
                    "url": "http://smarty-php.googlecode.com/svn",
                    "reference": "/tags/v3.1.13/@4699"
                },
                "require": {
                    "php": ">=5.2"
                },
                "time": "2013-01-26 12:03:52",
                "type": "library",
                "installation-source": "source",
                "autoload": {
                    "classmap": [
                        "distribution/libs/Smarty.class.php",
                        "distribution/libs/SmartyBC.class.php"
                    ]
                },
                "notification-url": "https://packagist.org/downloads/",
                "license": [
                    "LGPL-3.0"
                ],
                "authors": [
                    {
                        "name": "Monte Ohrt",
                        "email": "[email protected]"
                    },
                    {
                        "name": "Uwe Tews",
                        "email": "[email protected]"
                    },
                    {
                        "name": "Rodney Rehm",
                        "email": "[email protected]"
                    }
                ],
                "description": "Smarty - the compiling PHP template engine",
                "homepage": "http://www.smarty.net",
                "keywords": [
                    "templating"
                ]
            }
        }
    }
}

"Depended on by" list for packages

It would be useful to have information about the clients of every package in the repository. The scope would be limited to the current repository, but I don't think that's a problem in this case.

This information could be used for notifying maintainers when their dependencies change or examining the impact of an api change in a package.

I'm planning on creating a PR, if noone is working on anything like this.

Mirror repository

Like the current dist-dump [1] it would be nice to clone whole repositories, so that one can act completely indepedent from any external service even when installing dependencies as "source".

  • Reduce latency and traffic
  • Independency
  • As a sideeffect reading the composer.jsons and dumping the dist-files should be much faster when done from the local clone ๐Ÿ˜„
  • Includes: Later updates will be much faster, because only a git fetch --all, or svn update (or similar) is required

[1] http://getcomposer.org/doc/articles/handling-private-packages-with-satis.md#downloads

dist files could follow the composer cache organization

For the sake of clarity, and to match the composer cache, dist files could be relocated to something like output-dir/directory/vendor-name/bundle-name/

The vendor and bundle parts could also be dropped in the file name .

Error with files containing multibyte character when using satis to create a local archive

Including packages such as zetacomponents/webdav that contain multibyte characters as part of the distribution causes satis to fail building.

  [BadMethodCallException]
  Entry tests/data/put_test/put_test_utf8_filename_ฯ‚าฃฮฑโŠโˆญโ‹‰โ‚ฌโ‚ฑโ€ฑโŒ.txt cannot be created: phar error: invalid path "tests/data/put_test/put_test_utf8_filename_ฯ‚าฃฮฑโŠโˆญโ‹‰โ‚ฌโ‚ฑโ€ฑโŒ.txt
  " contains illegal character

Exception trace:
 () at .../satis/vendor/composer/composer/src/Composer/Package/Archiver/PharArchiver.php:45
 PharData->buildFromIterator() at .../satis/vendor/composer/composer/src/Composer/Package/Archiver/PharArchiver.php:45
 Composer\Package\Archiver\PharArchiver->archive() at .../satis/vendor/composer/composer/src/Composer/Package/Archiver/ArchiveManager.php:145
 Composer\Package\Archiver\ArchiveManager->archive() at .../satis/src/Composer/Satis/Command/BuildCommand.php:288
 Composer\Satis\Command\BuildCommand->dumpDownloads() at .../satis/src/Composer/Satis/Command/BuildCommand.php:138
 Composer\Satis\Command\BuildCommand->execute() at .../satis/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:240
 Symfony\Component\Console\Command\Command->run() at .../satis/vendor/symfony/console/Symfony/Component/Console/Application.php:939
 Symfony\Component\Console\Application->doRunCommand() at .../satis/vendor/symfony/console/Symfony/Component/Console/Application.php:203
 Symfony\Component\Console\Application->doRun() at .../satis/src/Composer/Satis/Console/Application.php:46
 Composer\Satis\Console\Application->doRun() at .../satis/vendor/symfony/console/Symfony/Component/Console/Application.php:116
 Symfony\Component\Console\Application->run() at /home/tiki/satis/bin/satis:9

Building dist archives doesn't go through packages recursively

Whenever I require package in my source json and I build dists it doesn't build dists for its dependencies.
To achieve that you need to keep track of all dependencies and require them manually in satis configuration. You also need to change versions whenever dependency version changes.
I think it should rather go recursively inside and build dists for all of the requirements as well. Maybe adding option for archive would be good - create-dependencies-dists.

Thanks

Cannot parse version constraint @stable

Today I noticed that my cronjob failed โ€“ I kept getting the following:

dev% php satis.phar build --verbose ./config.json ./www
Scanning packages



  [UnexpectedValueException]              
  Could not parse version constraint @st  
  able                                    



Exception trace:
 () at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Package/Version/VersionParser.php:196
 Composer\Package\Version\VersionParser->parseConstraint() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Package/Version/VersionParser.php:141
 Composer\Package\Version\VersionParser->parseConstraints() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Package/Loader/ArrayLoader.php:198
 Composer\Package\Loader\ArrayLoader->loadLinksFromConfig() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Package/Loader/ArrayLoader.php:166
 Composer\Package\Loader\ArrayLoader->load() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php:124
 Composer\Repository\ComposerRepository->loadRepository() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php:138
 Composer\Repository\ComposerRepository->loadRepository() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php:105
 Composer\Repository\ComposerRepository->initialize() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php:141
 Composer\Repository\ArrayRepository->getPackages() at phar:///home/till/unfuddle/easybib-apps/satis.phar/src/Composer/Satis/Command/BuildCommand.php:103
 Composer\Satis\Command\BuildCommand->selectPackages() at phar:///home/till/unfuddle/easybib-apps/satis.phar/src/Composer/Satis/Command/BuildCommand.php:79
 Composer\Satis\Command\BuildCommand->execute() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:237
 Symfony\Component\Console\Command\Command->run() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar:///home/till/unfuddle/easybib-apps/satis.phar/src/Composer/Satis/Console/Application.php:49
 Composer\Satis\Console\Application->doRun() at phar:///home/till/unfuddle/easybib-apps/satis.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:106
 Symfony\Component\Console\Application->run() at phar:///home/till/unfuddle/easybib-apps/satis.phar/bin/satis:8
 require() at /home/till/unfuddle/easybib-apps/satis.phar:15


build file build-dir

I can't share my config.json since it contains company credentials, however, I managed to fix it by setting packagist: false again. I previously used packagist: true with some explicit requires for packages we open sourced and also put on packagist.org.

When I set it to false and add the github repositories directly, it works โ€“ no issues.

So I am wondering if any of our repos on packagist.org are broken. This is a list:

Btw, I noticed that the exceptions are not really helpful, maybe I should open another issue/PR for that? Even with --verbose the message or stacktrace never disclose enough info to debug which package the problem is.

RFC Repository Type: phar-collection

I'm not really sure if this is a composer or satis issue. As satis should generate the information for the repository I opened it here.

I'd like to provide pre-build versions of a software. The idea is that I release version 1.0.0, but it is a special build of a commit in a repository. All the .git information and possible other files that are not required for the release should be stripped (I do not seem to be the only one how wishes for that: composer/composer#2113)

PEAR packages are kind of like that, but with all the package.xml overhead it's not an ideal solution. Also I would have to manage a composer.json and a package.xml (composer/composer#2116 would be a possible solution, but does not solve the problem).

PHAR are made for PHP Archives. The best possible solution I could think of right now would be to mange packages by hand. Inspired by Pirum, I would recommend a command like:

satis add <directory> <software>.phar

This would internally register the version and provide it to composer.

Do you think this should be done in satis, composer, or do you think it is a different kind of solution at all?

trunk-path from configuration not used?

Hi,

I use the following configuration for a repository in a satis.json file

"repositories": [
        {
            "type": "vcs",
            "url": "https://svn.example.com/main/path",
            "trunk-path" : "trunk/team/packages/packagename",
            "branches-path": "branches/team/packages/packagename",
            "tags-path": "tags/team/packages/packagename"
        }
    ],

The output of running bin/satis build satis.json web -vvv

Scanning packages
Executing command (CWD): svn ls --verbose --non-interactive  'https://svn.example.com/main/path/'
Executing command (CWD): svn ls --verbose --non-interactive  'https://svn.example.com/main/path/branches/team/packages/packagename'
Executing command (CWD): svn ls --verbose --non-interactive  'https://svn.example.com/main/path/tags/team/packages/packagename'

There is no scan of the specified trunk path, so it never finds the package in the trunk.

Though according to this page in the docs it should be possible to add a trunk-path to a repositories config?

The (relevant) versions of installed packages are:
composer/composer: dev-master ef072ff
composer/satis: 1.0.0-dev 5404c89

Please tag a version

Hi,

I've started to use Satis as a local repository for managing dependencies. However it does not have any tags so it is not possible to use Composer to install a known reliable version of Satis, instead only the latest dev master can be installed.

Please could you start tagging Satis?

cheers
Dan

support vcs on repos without composer.json

info: i use the yaml to json converter, so the following config parts are yml styled.

for example, if i want to include twitter bootstrap from the official repo, the following code works quite well:

repositories:
    # twitter/bootstrap
    - { type: package, package: { name: twitter/bootstrap, version: 2.0.0, source: { url: 'https://github.com/twitter/bootstrap.git', type: git, reference: v2.0.0 } } }
    - { type: package, package: { name: twitter/bootstrap, version: 2.0.1, source: { url: 'https://github.com/twitter/bootstrap.git', type: git, reference: v2.0.1 } } }
    - { type: package, package: { name: twitter/bootstrap, version: 2.0.2, source: { url: 'https://github.com/twitter/bootstrap.git', type: git, reference: v2.0.2 } } }
    - { type: package, package: { name: twitter/bootstrap, version: 2.0.3, source: { url: 'https://github.com/twitter/bootstrap.git', type: git, reference: v2.0.3 } } }
    - { type: package, package: { name: twitter/bootstrap, version: 2.0.4, source: { url: 'https://github.com/twitter/bootstrap.git', type: git, reference: v2.0.4 } } }
    - { type: package, package: { name: twitter/bootstrap, version: 2.1.0, source: { url: 'https://github.com/twitter/bootstrap.git', type: git, reference: origin/2.1.0-wip } } }

php bin/satis --verbose build config/config.json ../web/ produces a nice packages file

Scanning packages
Selected twitter/bootstrap (2.0.0)
Selected twitter/bootstrap (2.0.1)
Selected twitter/bootstrap (2.0.2)
Selected twitter/bootstrap (2.0.3)
Selected twitter/bootstrap (2.0.4)
Selected twitter/bootstrap (2.1.0)

but having

repositories:
    # twitter/bootstrap
    - { type: vcs, url: 'https://github.com/twitter/bootstrap.git' } #no composer

leads to

Reading composer.json of https://github.com/twitter/bootstrap.git (v1.2.0)
Skipped tag v1.2.0, no composer file
Reading composer.json of https://github.com/twitter/bootstrap.git (v1.1.1)
Skipped tag v1.1.1, no composer file
Reading composer.json of https://github.com/twitter/bootstrap.git (v1.1.0)
Skipped tag v1.1.0, no composer file
Reading composer.json of https://github.com/twitter/bootstrap.git (v1.0.0)
Skipped tag v1.0.0, no composer file
Reading composer.json of https://github.com/twitter/bootstrap.git (v1.4.0)
... snip ...
Reading composer.json of https://github.com/twitter/bootstrap.git (v2.0.2)
Skipped tag v2.0.2, no composer file
Reading composer.json of https://github.com/twitter/bootstrap.git (2.1.0-wip)
Skipped branch 2.1.0-wip, no composer file
Reading composer.json of https://github.com/twitter/bootstrap.git (gh-pages)
Skipped branch gh-pages, no composer file
Reading composer.json of https://github.com/twitter/bootstrap.git (master)
Skipped branch master, no composer file

so this is unhelpful. satis connects to the repo, reads the tag and uses it for an error message. why not generate

repositories:
    # twitter/bootstrap
    - { type: package, package: { name: twitter/bootstrap, version: %%calculated_version_number%%, source: { url: 'https://github.com/twitter/bootstrap.git', type: git, reference: %%tag_or_branch_composer_read%% } } }
    ...

this would really help and also really push composer. the only difficult here is to caclulate the %%calculated_version_number%% from the %%tag_or_branch_composer_read%%

where to add this code? satis is using composer, does satis generate this error meassage or is it composer? where to add what? if you can lead me the right direction i can try building a PR

Satis not following repositories inside the composer.json

I have configured satis with two Symfony2 Bundles. It retrieves both of these bundles.

However, it does not seem to following the repositories inside 1 of these bundles. Eg:

{
    "name": "acme/twitter-bootstrap-bundle",
    "type": "symfony-bundle",
    "repositories": [
        {
            "type": "package",
            "package": {
                "version": "2.2.1",
                "name": "twitter/bootstrap",
                "source": {
                    "url": "https://github.com/twitter/bootstrap.git",
                    "type": "git",
                    "reference": "master"
                },
                "dist": {
                    "url": "https://github.com/twitter/bootstrap/zipball/v2.2.1",
                    "type": "zip"
                }
            }
        }
    ],
    "require": {
        "php": ">=5.3.0",
        "symfony/framework-bundle": "2.*,<2.3",
        "twitter/bootstrap": "2.2.1"
    },
    "autoload": {
        "psr-0": { "Acme\\Bundle\\TwitterBootstrapBundle": "" }
    },
    "target-dir": "Acme/Bundle/TwitterBootstrapBundle"
}

When I attempt to install the bundle I recieve the following error:

Problem 1
    - Installation request for acme/twitter-bootstrap-bundle dev-master -> satisfiable by acme/twitter-bootstrap-bundle dev-master.
    - acme/twitter-bootstrap-bundle dev-master requires twitter/bootstrap 2.2.1 -> no matching package found.

Also, the generated packages.json does not contain this repository:

{
    "packages": {
        "acme/twitter-bootstrap-bundle": {
            "dev-master": {
                "name": "acme/twitter-bootstrap-bundle",
                "version": "dev-master",
                "version_normalized": "9999999-dev",
                "target-dir": "acme/Bundle/TwitterBootstrapBundle",
                "source": {
                    "type": "git",
                    "url": "...acmetwitterbootstrapbundle.git",
                    "reference": "e615737549d9bd5efe190b300bab08ab337354ba"
                },
                "require": {
                    "php": ">=5.3.0",
                    "symfony/framework-bundle": "2.*,<2.3",
                    "twitter/bootstrap": "2.2.1"
                },
                "time": "2012-11-15 02:20:25",
                "type": "symfony-bundle",
                "autoload": {
                    "psr-0": {
                        "Acme\\Bundle\\TwitterBootstrapBundle": ""
                    }
                }
            }
        }
    }
}

How to use the default for the file argument in build command?

The help for the build command claims the default for the file argument is ./satis.json, but when I try the following command, I get an error:

php bin/satis --verbose build web
File not found: web

Apparently, you can't specify the second argument without giving the first one, so why would there be a default value for the file argument?

Version constraint

When building, it looks at Composer's composer.json, and finds:

"suggest": {
    "ext-zip": "Enabling the zip extension allows you to unzip archives, and allows gzip compression of all internet traffic"
},

It attempts to find the version for ext-zip, and fails:
Could not parse version constraint Enabling the zip extension allows you to unzip archives

git clone git://github.com/composer/satis.git
cd satis
wget http://getcomposer.org/composer.phar
php composer.phar install
php bin/satis build composer.json web

This is probably from the suggest switch from version to description of what having the package installed accomplishes.

Robustness on update

Sort of related to selective updates:

I am including a couple dependencies from packages.zendframework.com. When I update, I ran into another issue since no one seems to check what they publish:

[RuntimeException]
Could not load package zendframework/skeleton-application in http://packages.zendframework.com:
[UnexpectedValueException] Invalid version string "zf/release-2.0.3"

This breaks the entire update process in satis even though I don't rely on the skeleton-application.

RuntimeException "Package could not be downloaded, svn: Impossible to get login or passord"

Hi all,

I've got a strange exception thrown from a simple php ./composer.phar install command on a composer.json that I use successfully on many other servers.

The composer.json looks like this:

{
    "name": "xxx/yyy",
    "description": "Install some stuff",
    "license": "MIT",
    "minimum-stability": "dev",
    "repositories": [
        { "type": "composer", "url": "http://satis.my_corp.com" }
    ],
    "require": {
        "xxx/zzz": "dev-trunk"
    }
}

Where xxx/zzz is a SVN repository that I've successfull checked out on the very same server!

The SVN credentials are registered on the server.

I've tried to clean all files under ~/.subversion/auth/svn.simple/* and checkout again the SVN repository: I was successfully prompted for login/password that I chose to store in local cache. But that doesn't solve the problem...

Whatever I do, each time I perform a php ./composer.phar install or update on my project, I have the same RuntimeException!

Please help me understand :)

Gitosis / Gitolite integration

My company has been using gitosis for a while now. Gitosis has been deprecated and superseded by gitolite, but there hasn't been a need for us to convert over. I build bundles and save them separately into gitosis. Satis correctly recognizes them (using gitosis-user@our-vcs-server:my_project.git as the source url) and I can use the bundles in my project using Satis and the repository.

However, on the Satis repository page, the release links point to, e.g. http://satis-server/web/gitosis-user@our-git-server:my_bundle.git, which obviously doesn't work. Looks like the page just generates an <a> tag and blindly points to the source url.

Maybe I'm missing something here. Would I need to do some kind of gitweb integration?

This isn't a deal-breaker for me as I everything I need to function works fine, just something I was interested in exploring.

Branch alias

Is satis meant to retrieve the branch aliases?

I have the following:

"extra": {
    "branch-alias": {
        "dev-master": "1.0-dev"
    }
}

However, when I put "1.0.*" or "1.0-dev" etc in my application it does not recognise the version.

No valid composer.json was found - works fine in composer though

Hi,

I'm trying out Satis locally, and have created a couple of repositories on BitBucket to test it with. I've made these public to ensure the issue isn't to do with authentication.

I can install the packages fine using composer. My composer.json:

{
    "require": {
        "josh/satis-test1": "*",
        "josh/satis-test2": "*"
    },
    "repositories": [
        { "type": "git", "url": "[email protected]:joshbuckley/satis-test1.git" },
        { "type": "git", "url": "[email protected]:joshbuckley/satis-test2.git" }
    ]
}

However, when trying to use Satis, I get the error

[Composer\Repository\InvalidRepositoryException]
No valid composer.json was found in any branch or tag of [email protected]:joshbuckley/satis-test1.git, could not load a package from it.

My satis.json:

{
    "name": "josh/all",
    "repositories": [
        { "type": "git", "url": "[email protected]:joshbuckley/satis-test1.git" },
        { "type": "git", "url": "[email protected]:joshbuckley/satis-test2.git" }
    ],
    "require-all": true
}

Output when using debug mode:

C:\htdocs\satis> php bin/satis build satis.json web -vvv
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): hg branch
Scanning packages
Executing command (C:/Users/Josh/AppData/Local/Composer/vcs/git-bitbucket.org-joshbuckley-satis-test1.git/): git remote
Executing command (C:/Users/Josh/AppData/Local/Composer/vcs/git-bitbucket.org-joshbuckley-satis-test1.git/): git remote
update --prune origin
Executing command (C:/Users/Josh/AppData/Local/Composer/vcs/git-bitbucket.org-joshbuckley-satis-test1.git/): git show-re
f --tags
Executing command (C:/Users/Josh/AppData/Local/Composer/vcs/git-bitbucket.org-joshbuckley-satis-test1.git/): git branch
--no-color --no-abbrev -v
Executing command (C:/Users/Josh/AppData/Local/Composer/vcs/git-bitbucket.org-joshbuckley-satis-test1.git/): git branch
--no-color
Executing command (C:/Users/Josh/AppData/Local/Composer/vcs/git-bitbucket.org-joshbuckley-satis-test1.git/): git show "m
aster":composer.json



  [Composer\Repository\InvalidRepositoryException]
  No valid composer.json was found in any branch or tag of [email protected]:joshbuckley/satis-test1.git, could not l
  oad a package from it.



Exception trace:
 () at C:\htdocs\satis\vendor\composer\composer\src\Composer\Repository\VcsRepository.php:256
 Composer\Repository\VcsRepository->initialize() at C:\htdocs\satis\vendor\composer\composer\src\Composer\Repository\Arr
ayRepository.php:170
 Composer\Repository\ArrayRepository->getPackages() at C:\htdocs\satis\vendor\composer\composer\src\Composer\DependencyR
esolver\Pool.php:158
 Composer\DependencyResolver\Pool->addRepository() at C:\htdocs\satis\src\Composer\Satis\Command\BuildCommand.php:168
 Composer\Satis\Command\BuildCommand->selectPackages() at C:\htdocs\satis\src\Composer\Satis\Command\BuildCommand.php:13
1
 Composer\Satis\Command\BuildCommand->execute() at C:\htdocs\satis\vendor\symfony\console\Symfony\Component\Console\Comm
and\Command.php:245
 Symfony\Component\Console\Command\Command->run() at C:\htdocs\satis\vendor\symfony\console\Symfony\Component\Console\Ap
plication.php:880
 Symfony\Component\Console\Application->doRunCommand() at C:\htdocs\satis\vendor\symfony\console\Symfony\Component\Conso
le\Application.php:194
 Symfony\Component\Console\Application->doRun() at C:\htdocs\satis\src\Composer\Satis\Console\Application.php:46
 Composer\Satis\Console\Application->doRun() at C:\htdocs\satis\vendor\symfony\console\Symfony\Component\Console\Applica
tion.php:124
 Symfony\Component\Console\Application->run() at C:\htdocs\satis\bin\satis:9


build [--no-html-output] [file] [output-dir]


C:\htdocs\satis>

Any ideas what might be happening here?

Error when trying to compile build.

$ bin/compile build
PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 
'creating archive "satis.phar" disabled by the php.ini setting 
phar.readonly' in /path/to/master/src/Composer/Satis/Compiler.php:37

I also made sure that phar.readonly is enabled.

$ php -i | grep phar
Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

Ability to dump dependencies

Add require-dependencies as boolean key to satis.json file.

Currently users have two options:

  • require-all as true and dump all packages;
  • require with wanted packages.

We may face a problem when trying use require. When running an install/update we may get a missed package. We must declare explicitly every dependency... for every package and its dependencies... and its dependencies... and then you have no life. require-dependencies could make PO's life easier

Keeping deleted tags

Hello,

I use Satis at home and I try to convince people to use it at work.

We will use Satis to serve our private packages, and also mirror some modules (ZF2) from Packagist.

My boss ask me what happen to a package deleted from packagist.
Can Satis keep the dist archive ?

From what i've tested, a package comletely deleted from packagist can be kept by Satis. It complain in interactive mode, but with a -n option, it seems to keep the package.

But if i delete just a tag from packagist, this tag is deleted from Satis.

Did I miss an option ?

invalid phar file generated

the phar building is currently broken.. the src/bootstrap.php is missing in the phar file.

it looks correct in the Compiler

$ php satis.phar
PHP Warning:  require(phar:///PATH/TO/satis.phar/bin/../src/bootstrap.php): failed to open stream: phar error: "src/bootstrap.php" is not a file in phar "/PATH/TO/satis/bin/satis.phar" 

Only local repos

Hi guys,
I download all libs which I need in my projects locally via satis. Now I have http://localhost/statis/web and add satis to my projects. But when I disconnect internet and call composer update on my project this message appears:

The "http://packagist.org/packages.json" file could not be downloaded: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
http://packagist.org could not be loaded, package information was loaded from the local cache and may be out of date

Question: Is possible configure composer.json in my project set only for use local satis repos without any connection to internet? Thanks

Selective update

Currently we are using Satis to mantain our private package repositories. We have configured the Github hooks to update automatically when pushing. As we have many packages, this process take longer than expected (as is updates everything and not the just updated package).

Is there any way to tell Satis to update a specifig package (or packages)?. This way we could save a lot of time (and why not, Github API calls).

Thanks in advance.

Call to undefined method createArchiveManager

I'm using a private repository and satis to build our own packages.json file but recently I added the "archive" element inside of the config file but i'm getting the following error.

PHP Fatal error: Call to undefined method Composer\Factory::createArchiveManager() in /var/www/html/build/satis/src/Composer/Satis/Command/BuildCommand.php on line 274

I'm using version 87ef970

And the following build command
php satis/bin/satis build .subsplit/build/config.json ../bundles/

My satis config:

{
        "name": "Repository",
        "homepage": "http://internal-host/bundles/",
        "repositories":
        [
                {
                        "type": "vcs",
                        "url": "gitosis@internal-host:company/framework.git"
                },
                {
                        "type": "vcs",
                        "url": "https://github.com/JCID/JcidLoggingBundle.git"
                },
                {
                        "type": "vcs",
                        "url": "https://github.com/JCID/JcidCronjobBundle.git"
                },
                {
                        "type": "package",
                        "package": {
                                "name": "wurfl/client",
                                "version": "1.0.2",
                                "dist": {
                                        "url": "http://www.scientiamobile.com/api_downloads/php/WurflCloudClient-PHP-1.0.2-Simple.zip",
                                        "type": "zip"
                                },
                                "autoload": {
                                        "psr-0" : {
                                                "WurflCloud_" : ""
                                        }
                                },
                                "target-dir": "WurflCloud"
                        }
                }
        ],
        "require-all": true,
        "archive": {
                "directory": "dist",
                "format": "tar",
                "prefix-url": "http://internal-host/bundles/",
                "skip-dev": true
        }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.