Questions tagged [packagist]

Packagist Package Repository Website for Composer, see the about page on packagist.org for more.

Packagist

Package Repository Website for Composer, see the about page on packagist.org for more.

Requirements

  • MySQL for the main data store
  • Redis for some functionality (favorites, download statistics)
  • Solr for search
  • git/svn/hg depending on which repositories you want to support

Installation

  1. Clone the repository
  2. Copy app/config/parameters.yml.dist to app/config/parameters.yml and edit the relevant values for your setup.
  3. Install dependencies: php composer.phar install
  4. Run app/console doctrine:schema:create to setup the DB.
  5. Run app/console assets:install web to deploy the assets on the web dir.
  6. Make a VirtualHost with DocumentRoot pointing to web/

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

Setting up search

The search index uses Solr, so you will have to install that on your server. If you are running it on a non-standard host or port, you will have to adjust the configuration. See the NelmioSolariumBundle for more details.

You will also have to configure Solr. Use the schema.xml provided in the doc/ directory for that.

To index packages, just run app/console packagist:index. It is recommended to set up a cron job for this command, and have it run every few minutes.

Day-to-Day Operation

There are a few commands you should run periodically (ideally set up a cron job running every minute or so):

app/console packagist:update --no-debug --env=prod
app/console packagist:dump --no-debug --env=prod
app/console packagist:index --no-debug --env=prod

The latter is optional and only required if you are running a solr server.

Github:

280 questions
2
votes
1 answer

Unable to create composer package - InvalidArgumentException

I have been trying to create a simple composer package. But I'm stuck with the following issue. Dont know how to resolve this. [InvalidArgumentException] Could not find package sarav/sample-package…
Saravanan Sampathkumar
  • 3,201
  • 1
  • 20
  • 46
2
votes
0 answers

How to update Packagist using Bitbucket Webhook

Previously you could have your Packagist packages updated automatically when you push to your Bitbucket repository by simply adding the POST URL for your Packagist account to a Bitbucket POST service. However, Bitbucket have recently disabled POST…
Simon Hampel
  • 2,686
  • 1
  • 18
  • 18
2
votes
1 answer

Composer: Prefer VCS Repository over Packagist

I'd like to use the adldap/adldap library in my PHP based project. While the maintainer of this package has not added this package to packagist, they have included a composer.json file. So, normally, I'd just add the following my MY composer.json,…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
2
votes
1 answer

Satis circular dependencies

I have a project with multiple packages Each package is in a private git repository. Some of the packages have dependencies of each other. You can check here how my satis http://codepen.io/anon/pen/wBOEQW page looks like. Now if I clone the…
Tomahock
  • 471
  • 3
  • 11
2
votes
1 answer

Symfony2 - github - publishing packagist

A main problem is that triggers error on composer require package. I'm trying to publish Symfony package using packagist. I have already commited with composer.json: { "name" : "vendor/package", "description" : "Some description", "type"…
Marin Sagovac
  • 3,932
  • 5
  • 23
  • 53
2
votes
1 answer

How do I configure my composer package to point to a specific subdirectory of the repository?

I have a Github repository, which I recently submitted to Packagist. The top-level directory of my repository is as follows: build/ bootsole/ examples/ licenses/ screenshots/ The bootsole subdirectory is the actual directory containing the…
alexw
  • 8,468
  • 6
  • 54
  • 86
2
votes
1 answer

Best practice for Composer branch aliases and tags

I have a package on Packagist. One I tagged the 0.2.0 version, I made a branch alias for dev-master set to 0.3.x-dev. So this means that all the developmet I'm doing is towards the next 0.3.x release. It also means that people can require a…
rj_bijl
  • 243
  • 1
  • 2
  • 8
2
votes
1 answer

Composer: Require a specific version of a non-required package

When using the package manager Composer, is it possible to specify the required version for a non-required package? For example: Say I have a blog module, and a widget module. Both modules work fine by themseleves, and do not 'require' the other…
2
votes
1 answer

How to create composer package from non-master branch

I've forked a non-composer repo on GitHub and created a composer-enabled feature branch. I'd like to publish that branch on packagist. Packagist fails with No composer.json was found in the master branch which is true. Can I tell Packagist to look…
andig
  • 13,378
  • 13
  • 61
  • 98
2
votes
1 answer

Composer downloads entire .git repo directory

I recently published my library in GitHub and Packagist. When I load it to a project, using the Composer, entire repo is being downloaded, along with the hidden .git directory. How to prevent Composer from downloading this unnecesary directory?
Mike Doe
  • 16,349
  • 11
  • 65
  • 88
2
votes
1 answer

Satis update via cronjob

I'm try to update my private repository via a cron job but nothing seems to be happening. I'm using Satis to create the repository for my private packages. I can do this manually by logging into my account via SSH and running: php bin/satis build…
Luke Snowden
  • 4,056
  • 2
  • 37
  • 70
2
votes
2 answers

PHP Composer: choosing the right package for Laravel (or other framework)

This may look like a trivial question, but it isn't. Being new to composer, I find myself wondering about how to pick a decent package for a common feature on its main repo packagist. Say I am using Laravel 4 for a recent project and would like to…
bitinn
  • 9,188
  • 10
  • 38
  • 64
2
votes
0 answers

Composer / SVN Repository sync

I've problem in configuring either satis or composer. What I've managed to do so far: 1: I've created a SVN repository called "common". There are several tags (1.0, 1.1) - each tag has its own composer.json file, eg: { "name": "acme/common", …
acid
  • 2,099
  • 4
  • 28
  • 41
2
votes
1 answer

Install or use php composer in windows (fails)

so basically i was using composer on my windows installation without any problems. Suddenly i get this error on every project (installing composer.phar manually): [RuntimeException] …
Dude
  • 59
  • 1
  • 5
2
votes
1 answer

Composer and packagist - how avoid malicious code injection

Is there any mechanise, which can ensure that packages uploaded into packagist.org are free from malicious code. Is anyone looking at source code in installed/uploaded packages. For example: What if someone upload package which does main function…
mrok
  • 2,680
  • 3
  • 27
  • 46