GithubHelp home page GithubHelp logo

knplabs / knpbundles Goto Github PK

View Code? Open in Web Editor NEW
223.0 31.0 51.0 4.31 MB

THE unofficial listing of Symfony2 bundles.

Home Page: KnpBundles.com

Ruby 0.37% PHP 66.92% Shell 0.67% Gherkin 5.29% CSS 6.49% JavaScript 5.91% HTML 14.30% Dockerfile 0.07%

knpbundles's Introduction

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

knpbundles's People

Contributors

akerouanton avatar arghav avatar cordoval avatar cystbear avatar docteurklein avatar everzet avatar geertdd avatar h4cc avatar herzult avatar l3l0 avatar l3pp4rd avatar lcouellan avatar lsmith77 avatar mbontemps avatar michalgor avatar nek- avatar ornicar avatar pborreli avatar phpfour avatar pilot avatar pzaloznyi avatar stloyd avatar stof avatar torchello avatar tyomo4ka avatar ubermuda avatar vjousse avatar weaverryan avatar wysow avatar zeopix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

knpbundles's Issues

Exception when using DateTime

Hi,

When I load the fixtures or run the tests, I get the following Exception : "DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead"

I have checked my php.ini and everything seems to be fine. All the more, when I use the TimeHelper in a sample code, I don't have such problem. I should have missed something in the configuration or could it be a bug (don't think so) ?

Thanks for reading me (and sorry for my poor english :>).

PS : I am using the MAMP app : apache2 and php 5.3.3

pull fail detection

handle the case when a pull fails (can happen if someone has push --force)

Problème avec git submodule

Bonjour,

Je viens de cloner le projet en local et en lancant la commande git submodule update --init --recursive tout ce passe bien jusqu'à :

Initialized empty Git repository in /Users/clement/Sites/symfony2bundles/src/vendor/Goutte/.git/
remote: Counting objects: 44, done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 44 (delta 17), reused 0 (delta 0)
Receiving objects: 100% (44/44), 95.78 KiB, done.
Resolving deltas: 100% (17/17), done.
fatal: reference is not a tree: 4cf52c5d32028912042272679268be08314a3101
Unable to checkout '4cf52c5d32028912042272679268be08314a3101' in submodule path 'src/vendor/Goutte'

Une idée ?
Merci !!

Clem

repo detection is deprecated

it's based on the existence of src/autoload.php while latest defaults are to put this file in the application dir.

GitHub search API sucks

Either it fails, return 500 status code, or returns empty or uncomplete results.

Consider using google as a replacement?

symfony2bundles does not find all repos

The s2b:populate command limits the results to 500. As the search will likely return the results in the same order, the same 500 results are found each times which means that others are not found.
Note that currently the limit is already reached when running the command.

Commit list is broken

All commits are displayed as being done by the repo owner and the time is replaced by diff.ago.day

Use the number of contributors in the score only for bundles

We do not use the number of contributors in the score anymore:

Indeed more and more projects use symfony-standard as a base so they start with 149 contributors...

We should investigate to see if this is only a problem for projects and not bundles.

In this case we should add again the

    // 1 contributor = 3 points
    $score += 3 * $this->getNbContributors();

Improving the use of Gravatar

Currently we use the email of the user to get the gravatar image. But this works only when the user publicize its email address on github, which is not the case for many of them.
The github api gives the gravatar id to be able to retrieve the image without knowing the email address so it should be used.

disable user sort by score by default

Because it is meaningless and frustrating. Also some could imagine this has been done to put knplabs at the top of the list, which makes the whole website less credible.

Could not find any configured connections

So I renamed the config file from config_dev_local.yml.dist to config_dev_local.yml and changed the relevant settings.

I run the command:

php s2b/console-dev doctrine:database:drop

"[InvalidArgumentException]
Could not find any configured connections "

Any idea what the problem is? Perhaps it's trivial and i'm just being stupid...

Thanks :-)

automate tweeting

We have the twitter.com/symfony2bundles account.

The system could tweet when a new Bundle is created. By the way, a new Bundle is often empty, and not very interresting.
We could also tweet when a new version (Git tag) of a Bundle is released.

Wrong link

On the project page the link on top allowing to choose the sorting target the bundle page instead of the project page.

Sf2 projects cannot be discovered through Twitter

The github search removes all repo with a name that don't match /Bundle$/ which means projects discovered previously through the Twitter search are removed.

Note that moving the Twitter search after the github one is a bad fix as it would not take the tweeted repos into account when the github search reaches the limit (which will occur when the number of github repos increases).

The service "doctrine.dbal.default_connection" does not exist.

Encore moi^^

En suivant les instructions du readme et en voulant importer des éléments en base avec la commande populate j'obtiens cela :

symfony2bundles% php s2b/console s2b:populate
Search "Bundle" on Github...30...40... DONE
Search "Symfony2" on Github...51... DONE
Search on Google.....50/250.....100/250.....150/250.....!200/250.!....250/250 DONE
Found 53 repo candidates

[InvalidArgumentException]
The service "doctrine.dbal.default_connection" does not exist.

Une idée ? :)
Merci beaucoup
Clem

add a blog

with Bundle creation good practices, Bundle reviews...

Some propose to use gh-pages. I prefer developing it.

Suppport more doc formats

Hi,
i am quite unsure wich format i actually choose, but i knew it from sphinx and saw it in other bundles, and it doesnt render correctly on s2b.

probably will trick some people if docs are shown wrong.

If you tell me which format you support maybe i rewrite the readme or make a readme s2b compat with a link to the doc ...

cheers phil

Add version compatibility to bundles / version tags

Hi,

first of all, symfony2 and the new overall architecture looks very promising, it's really well designed and fun to work with. However, it's a little tedious at the moment when using third party bundles, as a lot of them are being developed on the master branch of symfony2 (i guess) - and when people use the Symfony2 Beta1 Standard Distribution, things very often don't work.

As symfony2 itself reached beta state, i think it would be a good idea to add compatibility information to each bundle on symfony2bundles.com. Especially, i would recommend to tag the commit which is working with the current beta version of the standard distribution.

Commit links are wrong

Commit links should target github but they currently target symfony2bundles which means they all target a 404.

Integrate with packagist.

This should be marked as an "idea".

Anyways, providing integration with packagist would create an automatic way to install the bundles.

Add composer package name

If a bundle repo has a composer.json file at the root, it'd be great to json_decode it and read the name from it. From that you can at least display the package name to users, and possibly also link to http://packagist.org/packages/<package name>.

API bundle list returns internal server error

The curl request from the API documentation to list bundles returns an error:

curl http://symfony2bundles.org/bundle/score.json
{"error":{"code":500,"message":"Internal Server Error"}}

Am i missing something?

app:populate not working

Followed the readme, everything worked until the last step:

C:\usr\sites\sfprojects\symfony2bundles>php app/console-dev app:populate

[InvalidArgumentException]
There are no commands defined in the "app" namespace.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.