KnpBundles

非官方的 Symfony2 捆绑包列表。「THE unofficial listing of Symfony2 bundles.」

  • 所有者: KnpLabs/KnpBundles
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

KnpBundles

Open-source code of the knpbundles.com
website, written in Symfony2.

Any ideas are welcome!

Build Status

Please note that this service was previously called Symfony2Bundles but we had
to change the name due to trademark issues.

Install

Get the code

git clone git://github.com/KnpLabs/KnpBundles.git

Configure

To configure your database in your development environment, copy
/app/config/parameters.yml.dist to /app/config/parameters.yml and
edit it according to your database settings.

If you want to use github connect locally, you'll need to
create an app on github
with the callback:

http://yourlocalurl/login/check-github

And update the parameters.yml with the Client ID and Secret.

If you also want to use sensio labs connect locally, you'll need to
create a client on sensio labs connect
with the callback:

http://yourlocalurl/login/check-sensio

And update the parameters.yml with the Client ID and Secret.

Install with docker

docker build
docker up -d

Create database and tables

docker-compose exec php php app/console doctrine:schema:create
docker-compose exec php php app/console --env=test doctrine:schema:create

Load data fixtures

docker-compose exec php php app/console doctrine:fixtures:load
docker-compose exec php php app/console --env=test doctrine:fixtures:load

Load assets and assetic

docker-compose exec php php app/console assets:install --symlink web/
docker-compose exec php php app/console assetic:dump --env=dev
docker-compose exec php php app/console assetic:dump --env=prod

Run the tests (requires PHPUnit >= 3.5)

docker-compose exec php phpunit -c app

Run the Behat tests (requires PHPUnit >= 3.5)

docker-compose exec php ./bin/behat @KnpBundlesBundle

To generate migrations from your current schema

docker-compose exec php php app/console doctrine:migrations:diff
docker-compose exec php php app/console doctrine:migrations:migrate
docker-compose exec php php app/console cache:warmup

Usage

Launch the consumer

We rely on RabbitMQ to update bundles:

  • The main server produces messages saying "Hey, we should update this bundle"
  • The consumers read these messages and update them

To launch a consumer, do:

docker-compose exec php php app/console rabbitmq:consumer update_bundle

Note that you will need a functional rabbitmq server − Follow the instructions in this page to install it.

Populate document collections from GitHub

docker-compose exec php php app/console kb:populate

This can take a long time. GitHub API is limited to 60 calls per minute,
so the commands needs to wait.

Update all bundles in database

docker-compose exec php php app/console kb:update:bundles

This can take a long time but should be run to trigger update on all bundles when this is needed.

Search engine

We use Solr and its PHP client Solarium to search bundles.

To install Solr, follow this steps:

  1. Download the version 3.6.2 (new versions are not compatibles) and extract it
  2. Uses the command kb:solr:start --solr-path="/path/to/solar-3.6.2/example"
  3. And run kb:solr:index --verbose

Use the default Jetty server included with SOLR. The default directory used for the installation is opt/solr/example.
Copy the recommended configuration and schema found here
to your solr/conf directory.

You can run SOLR using:

docker-compose exec php php app/console kb:solr:start

See bin/prepare-test-solr.sh script
Bundles will be automatically indexed on next update, or you can force indexing by console command.

If you have Solr up and running, simply do:

docker-compose exec php php app/console kb:solr:index --verbose

This will index all bundles.

Generate sitemap

docker-compose exec php php app/console kb:sitemap:generate --spaceless=1

Will create sitemap.xml and sitemap.xml.gz in web directory.
Sitemap includes bundles and user profiles

主要指標

概覽
名稱與所有者KnpLabs/KnpBundles
主編程語言PHP
編程語言Ruby (語言數: 8)
平台
許可證
所有者活动
創建於2010-06-26 19:30:36
推送於2019-01-31 15:53:46
最后一次提交2019-01-31 16:53:40
發布數2
最新版本名稱1.2 (發布於 2010-07-13 23:58:07)
第一版名稱1.1 (發布於 2010-07-13 22:45:25)
用户参与
星數223
關注者數30
派生數51
提交數1.4k
已啟用問題?
問題數260
打開的問題數34
拉請求數169
打開的拉請求數2
關閉的拉請求數56
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?