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
5
votes
2 answers

How to use composer with a non-packagist github project containing a packages.json

I want to put https://github.com/timrwood/moment into my composer.json for easy maintenance. It's not an official packagist project (of course, as it's not PHP), but it contains a packages.json for nodejs. Can I use this in my composer.json? I tried…
acme
  • 14,654
  • 7
  • 75
  • 109
4
votes
3 answers

Getting "Could not find a version of package .." in composer inspite of having tags in Github branch of package

I am learning on how to upload a package on packagist.org. I created a github repository for testing with composer.json file - https://github.com/perials/check and a composer package using this github repository -…
Sanket Hande
  • 43
  • 1
  • 1
  • 3
4
votes
3 answers

Composer Require 'package' throws OpenSSL error

This problem seems to be common, and i've been through a lot of SO posts related to it and nothing works, and i'm going crazy. Whats weird is that it was working perfectly few weeks ago, and i didnt install anything new since months... Setup :…
Elbarto
  • 1,213
  • 1
  • 14
  • 18
4
votes
1 answer

Travis CI building PHP project and pulling dependencies from Composer, tries to use git@ instead of https

Background We have a PHP project that was working fine with Travis CI until a certain point and since then has totally stopped working. The project is simply failing to build with Composer. Details The last successful build was: this one The most…
edmondscommerce
  • 2,001
  • 12
  • 21
4
votes
4 answers

How to change version (dev-master) in packagist.org to version like v1.0.2?

I make repository in github. Register it in packagist.org Set up in github integrations&services Packagist to track changes in repo. In local comp I set this commands in console: Add some changes, then add and commit it. Set tag like v1.0.2 :git…
Web Code
  • 51
  • 1
  • 4
4
votes
1 answer

how do I version my composer package

I have just published my first Laravel plugin with composer and Packagist. Now, How should I manage version??? When I push my Git, I should be able to make a composer update and get the changes, but I couldn't do it. I saw a lot of plugin that…
Juliatzin
  • 18,455
  • 40
  • 166
  • 325
4
votes
3 answers

Composer HTTP 400 Bad request when downloading Laravel

I am getting an issue of 400 bad request connecting over http, and it seems the package only wants to be installed via http. I tried an override in composer.json as tried by others as workaround to force https - but that doesn't seem to work. I'm…
4
votes
1 answer

Unable to Install or Update Packagist package "twbs/bootstrap" with composer

I work on a French version of WindowsNT (I stated that you are not surprised by the names in French like "Mes Documents"). I want to add the "twbs/bootstrap" package in my symfony2 project. Like I've done a hundred times before, I've add the line…
4
votes
2 answers

How to leave out all unnecessary stuff in composer for final build?

I just learned about composer and are about to use it for the first time in a bigger project. One problem I have: My project is actually about 24,5MB, 24 of those come from my vendors directory. As far as I see, in most libraries included in…
mvmoay
  • 1,535
  • 3
  • 15
  • 26
4
votes
1 answer

Ignore packagist.org on composer install | update

I'm using composer internally for managing internal software dependencies. Our repository server is on our private network and we aren't using any other package from any other repository than ours. Every time you run composer.phar [install |…
taiar
  • 552
  • 6
  • 22
3
votes
0 answers

my published composer package not installable

I published a package on packagist and it is not installable. $ composer --version Composer version 1.10.15 2020-10-13 15:59:09 $ composer show --all mynamespace/mypackage Warning from https://repo.packagist.org: Support for Composer 1 is…
Holly
  • 7,462
  • 23
  • 86
  • 140
3
votes
4 answers

Could not find package codeigniter4/framework with stability stable

I'm doing exactly like what is suggested in the official documentation. composer create-project codeigniter4/framework However, I'm getting this error instead: [InvalidArgumentException] Could not find package codeigniter4/framework with stability…
Rangka Kacang
  • 327
  • 1
  • 5
  • 12
3
votes
3 answers

How to require a package installed via Composer

I installed emanueleminotto/simple-html-dom via composer. How can I use classes from the package without getting an error? Note: I use XAMPP to run PHP scripts. Error Message: PHP Fatal error: Uncaught Error: Class 'simple_html_dom' not found in…
Chrstopher
  • 59
  • 1
  • 8
3
votes
3 answers

Composer warning when trying to get a required private library from toran

When my composer attempts to get a private library from toran, I get this warning: Warning from https://toran.dev.lan/repo/packagist: The original providers could not be fetched Running composer require app/client:^6.0…
J. Doe
  • 157
  • 1
  • 8
3
votes
1 answer

Composer require from specific repository

I have a local repository set up in my global config, which I develop composer packages in. This way I can easily test them out in multiple locations by simply running composer require my/package. When I release these packages, I'd like to be able…
Ambidex
  • 755
  • 1
  • 5
  • 27
1 2
3
18 19