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
140
votes
9 answers

Use PHP composer to clone git repo

I'm trying to use composer to automatically clone a git repository from github that isn't in packagist but it's not working and I can't figure out what am I doing wrong. I think I have to include it among "repositories" like so: "repositories": [ …
martin
  • 93,354
  • 25
  • 191
  • 226
57
votes
1 answer

How to add non-public repositories from command line with composer?

I want to add a new package which is not at packagist, it's a local or non-public repository. I know how to this in the composer.json. For example: "repositories": [ { "type": "vcs", "url": "https://bitbucket.org/xxxx/xxxxx.git" …
brasileric
  • 1,017
  • 1
  • 8
  • 18
39
votes
2 answers

How do you get composer to install a non-composer package?

I am trying to get composer to download the following library from this project, however, it does not have a composer.json file in it so I'm not sure if this is possible. { "require" : { "fguillot/picoFeed" : "*" }, …
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
38
votes
4 answers

Composer/Packagist could not find package for minimum stability

I'm trying to install the following composer package: composer require cr/hashcli it is a package that I did. But when I try to install it I get the following error: [InvalidArgumentException] Could not find package cr/hashcli at any version for…
Cláudio Ribeiro
  • 1,509
  • 3
  • 37
  • 65
33
votes
11 answers

Composer Content-Length Mismatch

Sometimes when I run composer update to upgrade the laravel project, a content-length mismatch exception might occur. Finally, I get this is because of the terrible firewall in China: the DNS was poisoned. So, if you are like me, could there be a…
Alex Chiang
  • 1,800
  • 2
  • 14
  • 21
25
votes
1 answer

When creating a composer package, what "Package Type" should I choose

I'm creating my first PHP Composer package (following these instructions). I've run $ composer init and am filling in the details, it is now asking me for Package Type (e.g. library, project, metapackage, composer-plugin) []: I assume this is…
kris
  • 11,868
  • 9
  • 88
  • 110
23
votes
2 answers

How to fix error abandoned fzaninotto/faker packagist in composer 2.0.11 version and i used php 8.0.0?

How to fix fzaninotto/faker packagist "This package is abandoned and no longer maintained. No replacement package was suggested." in composer 2.0.11 version and i used php 8.0.0?
Zach Phoenix
  • 251
  • 1
  • 2
  • 3
18
votes
2 answers

Adding a package with Composer (through SVN)

I created a SVN repository for my personal PHP library, and added a composer.json file at the root level: { "name": "myPersonalLibrary/lib", "type": "library", "description": "Light MVC framework for PHP 5.4", …
Nabab
  • 2,608
  • 1
  • 19
  • 32
17
votes
2 answers

Can I synchronize or mirror dependencies from packagist.org with my own Composer Satis installation?

We have our own Satis repository, we can store there our own dependencies. This works fine. But if a developer uses a package that is not within in our own repository, then Composer will fetch it from GitHub through packagist.org (as a fallback).…
Niborb
  • 774
  • 5
  • 15
15
votes
1 answer

How do I change the packagist sticker for stable release?

This is my open source code I wrote. https://github.com/simkimsia/UtilityBehaviors/blob/master/README.mdown I have a No Stable Release from packagist.org How do I go about having a Stable Release sticker from packagist?
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
14
votes
1 answer

How to configure a composer package to be globally installed?

I'm trying to make a little CLI tool and package it up with composer. Below is an extremely simplified version of the program, but it's enough to demonstrate the problem I'm encountering. The project has one dependency, and one "binary"…
Mulan
  • 129,518
  • 31
  • 228
  • 259
14
votes
2 answers

The package is not available in a stable-enough version according to your minimum-stability setting

I don't really understand how Composer works with the minimum-stability setting. I have two packages. Let's say, PackageA and PackageB. The composer.json file of PackageA looks like this: { "name": "vendor/packagea", "minimum-stability":…
Vivendi
  • 20,047
  • 25
  • 121
  • 196
14
votes
3 answers

Where to register autoload when the vendor is not managed with composer in Symfony 2.1?

I'm using symfony 2.1 and I want to add a library to vendors. The library do not exists in packagist. I can't manage it with composer. When I install bundles or others vendors through composer, it manage autoload for me. But where to register…
smoreno
  • 3,129
  • 3
  • 32
  • 49
12
votes
1 answer

How to rename a PHP package in Packagist

I changed a PHP package name in composer file from "name": "author/author-php" to "name": "author/author" then did composer install & composer update, merged my changes with master then created a release. But after updating the library on…
Nuha
  • 314
  • 1
  • 3
  • 15
10
votes
2 answers

How to force a package to be installed?

I'm trying to install the following package through composer: https://packagist.org/packages/cartalyst/sentry#dev-feature/laravel-5 When I do: composer require cartalyst/sentry dev-feature/laravel-5 I always receive this…
user2094178
  • 9,204
  • 10
  • 41
  • 70
1
2 3
18 19