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
0
votes
1 answer

.env (phpdotenv) vs file.ini

I'm looking at very popular php package named .env here, on packagist and github from vlucas. My question - why is it better than storing variables in *.ini files? I mean parse_ini_file() built in php and no extra package required. Why not using…
Yevgeniy Afanasyev
  • 37,872
  • 26
  • 173
  • 191
0
votes
1 answer

Packagist isn't available

I can't download a library with composer from packagist. This is the error: [Composer\Repository\RepositorySecurityException] The contents of…
Mohamed Ben HEnda
  • 2,686
  • 1
  • 30
  • 44
0
votes
0 answers

Install Package From Packagist Failed

I never use composer to install any package before. so this is my first time and I got this error message : # composer require "neilgarb/bitx" [InvalidArgumentException] …
Saint Robson
  • 5,475
  • 18
  • 71
  • 118
0
votes
1 answer

Laravel package ServiceProvider not found

I have created a PHP package for laravel named zoho. namespace rahulreghunath\zoho; use Illuminate\Support\ServiceProvider as IlluminateServiceProvider; class ServiceProvider extends IlluminateServiceProvider { /** *…
Rahul Reghunath
  • 1,210
  • 13
  • 23
0
votes
1 answer

Newly submitted Package in Packagist showing errors while running composer require

I have created a simple PHP-validation plugin. I submit it in Packagist.Everything in Packagist seems fine but when I run my composer require command composer require rahulreghunath11/php-rvalidation Could not find package…
Rahul Reghunath
  • 1,210
  • 13
  • 23
0
votes
1 answer

My package does not show on search results, even if I can use it with composer command

Yesterday, I pushed my code to github. I also wanted to publish it for composer, but I found a problem. First, I linked my packagist account with github account. Later, I created a package based on github repo. From now on, if I use code in…
Lurker
  • 267
  • 2
  • 4
  • 10
0
votes
1 answer

ramsey/uuid - validate a name-based hashed has the name that we assign it to the uuid

Any reliable uuid package from Packagist that I can download and use it for Slim framework? Ideally,I would an uuid that I can hash a type, e.g. php, into the string. then i can check if that uuid has 'php'. EDIT: How can I validate a name-based…
Run
  • 54,938
  • 169
  • 450
  • 748
0
votes
1 answer

PHP the right way to use constants with composer

I have a PHP library on packagist.org, which uses some constants, changing from project to project. I'm trying to use constants like that: Constants stores in conf.php in composer libriary After composer init username/mylib command, I making a…
Andrei
  • 145
  • 2
  • 10
0
votes
1 answer

Not able to install composer package

I'm trying to install my first composer package which I have built for learning. For that, I have successfully setup Github repository and packagist…
Parth Vora
  • 4,073
  • 7
  • 36
  • 59
0
votes
1 answer

How to optimize composer for a private dependency?

I have created my own private composer dependency lib on Github. When I execute composer require "myvendor/mylib:mytag" It will first look into packagist for the dependency and have some latency. Is there a way to skip this step and tell him to…
koalaok
  • 5,075
  • 11
  • 47
  • 91
0
votes
2 answers

extra .git directory exists in package

i create a package in packagist.org related to a github repository. After install this package in a new project, this package includes a .git directory which contains the information of the related github repository. But this .git directory does not…
Allen_Tsang
  • 555
  • 1
  • 6
  • 14
0
votes
1 answer

Is it possible to use your own laravel package before registering it on Packagist?

I created a Laravel package (it is located in a private BitBucket repository) and I would like to test it in a new Laravel project if it works the way I want before registering it on Packagist. Is there any way to do that?
Marius B
  • 769
  • 3
  • 16
  • 35
0
votes
0 answers

Composer removes own package’s .git directory after tagging

I have several packages under vendor which are version-controlled with Git. The packages are registered at Packagist and are referenced in other packages or the main composer.json with version expressions like ~1.0. When I run composer update…
lxg
  • 12,375
  • 12
  • 51
  • 73
0
votes
0 answers

Adding a composer package to Laravel 5

"require": { "infusionsoft/php-sdk": "^1.2", "laravel/lumen-framework": "5.1.*", "vlucas/phpdotenv": "~1.0", "barryvdh/laravel-debugbar": "^2.2", "goaop/framework": "^2.0", "php-http/httplug": "^1.1", …
0
votes
2 answers

Composer private package issue

I have created a private composer package in packagist.com but when I use composer require command to fetch it. My package coming under vendor folder which is on root. But I want it to be in app/code folder. Is there any parameter for…
Sintu Roy
  • 155
  • 9