• This repository has been archived on 23/Sep/2022
  • Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    PHP
  • Created over 13 years ago
  • Updated over 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Marketplace is where KNP ninjas share ideas, projects and stuff. THIS PROJECT IS MAINTAINED BY ubermuda

Idea Marketplace

Intro

The Marketplace is where KNP ninjas share ideas, projects and stuff. It's built on top of Silex.

configuration

Setting up the marketplace is a simple 3-step process:

# install vendors
bin/vendors install
# create and customize your config.php
cp app/config.php.dist app/config.php
# make sure the cache folder is writable
chmod 777 cache

And you're set!

Note: since the SQL schema migrations take place during the before hook, a simple hit on the application will initiate it.

About the Marketplace

Vendors

The Marketplace uses a patched version of Symfony2's bin/vendors. Not much to say here, except it makes life easier.

Authentification

The Marketplace uses Google OpenID for identification, and a custom, dead simple, homebrew authentication system consisting in a simple pimple service, which return value determines whether you can access the app (true) or not (false). On the KnpLabs instance of the Marketplace, this service's definition looks like that:

$app['auth']  = $app->share(function() use ($app) {
    return function($username) use ($app) {
        return (bool) preg_match('/@knplabs\.com$/', $username);
    };
});

Like I said, dead-simple.

Markdown

The Marketplace uses the SilexDiscountServiceProvider to provide markdown support. This service provider requires that you set the markdown.discount.bin parameter in your configuration file.

Twig extension

There is a Marketplace Twig extension in src/Marketplace/Twig to provide a few specific filters and gravatar support.

Project categories

Project categories are stored as a pimple parameter, project.categories, in src/config.php. See src/config.php.dist for an example.

Data repositories

Even though we don't use an ORM in the Marketplace, this is no reason to put your SQL en vrac inside your controllers. That is why we implemented a very simple way to store data retrieveing logic, in the form of repository classes, that you will find in src/Repository. Since we try to avoid magic as much as possible, those repositories need to be declared to the RepositoryServiceProvider, inside the bootstrap (src/bootstrap.php).

Migrations

The Marketplace features a simple homebrew schema migration system. Since there is no CLI system in Silex, everything takes place during the before filter. A migration consist of a single file, holding a migration class. By design, the migration file must be named something like <version>_<migration_name>Migration.php and located in src/Resources/migrations, and the class <migration_name>Migration. For example, if your migration adds a bar field to the foo table, and is the 5th migration of your schema, you should name your file 05_FooBarMigration.php, and the class would be named FooBarMigration.

In addition to these naming conventions, your migration class must extends Marketplace\AbstractMigration, which provides a few helping method such as getVersion and default implementations for migration methods.

The migration methods consist of 4 methods:

  • schemaUp
  • schemaDown
  • appUp
  • appDown

The names are pretty self-explanatory. Each schema* method is fed a Doctrine\DBAL\Schema\Schema instance of which you're expected to work to add, remove or modify fields and/or tables. The app* method are given a Silex\Application instance, actually your very application. You can see an example of useful appUp migration in the CommentMarkdownCacheMigration.

There's one last method you should know about: getMigrationInfo. This method should return a self-explanatory description of the migration (it is optional though, and you can skip its implementation).

More Repositories

1

snappy

PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage
PHP
4,383
star
2

Gaufrette

PHP library that provides a filesystem abstraction layer โˆ’ will be a feast for your files!
PHP
2,466
star
3

php-github-api

A simple PHP GitHub API client, Object Oriented, tested and documented.
PHP
2,133
star
4

KnpPaginatorBundle

SEO friendly Symfony paginator to sort and paginate
PHP
1,741
star
5

KnpMenuBundle

Object Oriented menus for your Symfony project.
PHP
1,397
star
6

KnpMenu

Menu Library for PHP
PHP
1,380
star
7

KnpSnappyBundle

Easily create PDF and images in Symfony by converting html using webkit
PHP
1,234
star
8

DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
PHP
913
star
9

knp-components

Various component pack, includes paginator
PHP
734
star
10

KnpGaufretteBundle

Easily use Gaufrette in your Symfony projects.
PHP
715
star
11

KnpTimeBundle

Provides helpers for time manipulation
PHP
600
star
12

KnpMarkdownBundle

Symfony wrapper for PHP markdown
PHP
417
star
13

KnpRadBundle

Rapid Application Development for Symfony2 [UNMAINTAINED]
JavaScript
291
star
14

KnpBundles

THE unofficial listing of Symfony2 bundles.
PHP
223
star
15

packagist-api

PHP API for Packagist
PHP
182
star
16

FriendlyContexts

Some Behat contexts
PHP
159
star
17

symfony2-autocomplete

A very simple script to autocomplete Symfony2 commands in a bash shell.
Shell
158
star
18

KnpIpsum

A Symfony2 application / base edition with lots of examples to learn about the best bundles
PHP
142
star
19

ConsoleServiceProvider

A Console service provider for Silex
PHP
107
star
20

DictionaryBundle

Are you often tired to repeat static choices like gender or civility in your apps ?
PHP
81
star
21

KnpJsonSchemaBundle

A bundle to generate json schema based on various metadata
PHP
72
star
22

KnpUserBundle

[DEPRECATED] The development has moved to a new repository: https://github.com/FriendsOfSymfony/FOSUserBundle
PHP
68
star
23

KnpDisqusBundle

A Symfony bundle to fetch and render disqus comments via their API. Your SEO other-half will love it.
PHP
62
star
24

KnpOAuthBundle

You should probably use HWIOAuthBundle (https://github.com/hwi/HWIOAuthBundle) instead, though. -- THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs
PHP
48
star
25

symfony-with-composer

THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs - Symfony2 Standard Distribution, installable through Composer
PHP
46
star
26

KnpConsoleAutocompleteBundle

This Symfony2 bundle provides a simple way of autocompleting your commands in your shell. -- THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs -- Contact us if you want to be the official maintainer of this Bundle.
PHP
38
star
27

KnpZendCacheBundle

Integrates Zend Cache framework into Symfony2. -- THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs -- Contact us if you want to be the official maintainer of this Bundle.
PHP
38
star
28

rad-edition

The Knp Rad edition of Symfony2 [UNMAINTAINED]
PHP
36
star
29

ControllerBehaviors

Trait based symfony2 controllers -- THIS PROJECT IS NOT MAINTAINED ANYMORE
PHP
35
star
30

KnpLastTweetsBundle

Symfony2 bundle to easily add a widget with the latest tweets of a Twitter user to a page.
PHP
33
star
31

rad-fixtures-load

A command to load them all
PHP
25
star
32

materialized-path

[DEPRECATED] A simple, database-agnostic tree implementation using materialized paths. /!\ moved to KnpLabs/DoctrineBehaviors
PHP
24
star
33

TwigExplorerBundle

Find your way through the twig extensions
PHP
23
star
34

geekweek12

[UNMAINTAINED]
PHP
21
star
35

mink-demo

THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs - !!! DEPRECATED. Use https://github.com/Behat/MinkExtension-example instead !!!
PHP
20
star
36

RepositoryServiceProvider

Silex Extensions, by KnpLabs -- THIS PROJECT IS MAINTAINED BY ubermuda
PHP
19
star
37

PiwikClient

[UNMAINTAINED] Simple Piwik API client, written in PHP 5.3
PHP
17
star
38

KnpPiwikBundle

Piwik API client bundle for Symfony2 -- THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs -- Contact us if you want to be the official maintainer of this Bundle.
PHP
17
star
39

MigrationServiceProvider

Simple Doctrine2 migration manager for Silex -- THIS PROJECT IS MAINTAINED BY ubermuda
PHP
16
star
40

MartIrc

[UNMAINTAINED] You're Back To the IRC! MartIrc is a NodeJS wrapper to connect to IRC using a browser supporting Websockets
JavaScript
16
star
41

KnpInvoice

[UNMAINTAINED] Lib to generate invoices
PHP
15
star
42

MegaMAN

Quick access to your vendors documentation
HTML
15
star
43

php-lastfm-client

[UNMAINTAINED] A Last.fm PHP client
PHP
15
star
44

behat-webapi-demo

[UNMAINTAINED] Behat + WebApiContext Demo
PHP
14
star
45

MediaExposer

THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs - A media exposition library written in PHP 5.3
PHP
14
star
46

symfony-light

The "Symfony Light Edition" distribution -- a git oriented lightweight skeleton -- THIS PROJECT IS NOT MAINTAINED ANYMORE
PHP
13
star
47

rad-resource-resolver

Knp Rad Resource Resolver
PHP
12
star
48

server-side-renderer

Docker image to server side render html pages using a browser (supports SPAs)
JavaScript
12
star
49

KnpInvoiceBundle

[UNMAINTAINED] An invoice generator
PHP
11
star
50

KnpMailjetBundle

Symfony2 bundle for handling Mailjet API
PHP
10
star
51

mailjet-api-php

PHP API for Mailjet
PHP
10
star
52

Ciboulette

[UNMAINTAINED] local unobtrusive CI
Shell
9
star
53

KnpMarkupValidatorBundle

[UNMAINTAINED] Provide markup validation for your Symfony2 based projects -- THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs
PHP
8
star
54

rad-auto-registration

Auto register some common services
PHP
8
star
55

Sn4k3

Hi frand, beleve in bein a snek
PHP
8
star
56

rad-url-generation

Simply auto-complete needed route parameters with existing ones.
PHP
7
star
57

KnpMediaExposerBundle

Integration of the MediaExposer library for your Symfony project. -- THIS PROJECT IS NO LONGER MAINTAINED by KNP Labs -- Contact us if you want to be the official maintainer of this Bundle.
PHP
7
star
58

StaticMapApi

[UNMAINTAINED] This library eases the creation of static maps by generating the URLs for Google's api.
PHP
7
star
59

knp-react-app

A functional oriented react app bootstrap. Do not loose time to configure and bootrstrap a project, use it and make !
JavaScript
6
star
60

muse

Inspires some JSON data basing itself on a JSON schema
PHP
6
star
61

PhpSpecWellDoneExtension

[UNMAINTAINED] Extension for PHPSPEC. Find out which classes are no specification.
PHP
6
star
62

fixtures

THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs - A fixtures framework for your PHP 5.3+ applications
PHP
6
star
63

rad-domain-event

PHP
5
star
64

php-json-schema

PHP
5
star
65

knpDeployPlugin

[UNMAINTAINED] Deployment plugin for symfony 1.4 to deploy to multiple servers and exec commands (migration, clear cache, add crontab) after the deployment on all or specific servers.
PHP
5
star
66

rad-user

Simply handle password encryption and salt generation.
PHP
5
star
67

rad-doctrine-event

Access to your doctrine events from the Symfony DIC.
PHP
5
star
68

should-skip-ci

A CLI tool to skip a CI build that is not concerned by the latest changes.
Rust
4
star
69

knpTime

THIS PROJECT IS DEPRECATED AND WILL NOT BE MAINTAINED ANYMORE. Allows the usage of a fake time to facilitate testing
PHP
4
star
70

symfony-training

The symfony training project
PHP
4
star
71

knp-swagger-generator

An open api 3.0 document generator for your javascript project
TypeScript
4
star
72

KnpRevealBundle

[UNMAINTAINED] Simple bundle that uses Reveal.js and Symfony to make maintainable presentations
JavaScript
4
star
73

rad-security

Provide RAD security components
PHP
3
star
74

knpSsoPlugin

[UNMAINTAINED] SSO security filter for symfony1.4
PHP
3
star
75

KnpRadBundle-documentation

Project codename "SoR" -- THIS PROJECT IS NO LONGER MAINTAINED by KnpLabs
PHP
3
star
76

jenkins-commentator

Internal app used to comment on github with jenkins build data - from https://gist.github.com/1911084
CoffeeScript
3
star
77

valid-http-cache

HTTP Cache (in)validation library based on HttpFoundation [UNMAINTAINED]
PHP
3
star
78

php-json-schema-bundle

Symfony bundle for the knplabs/php-json-schema library
PHP
2
star
79

rad-components-site

Official site of the RAD components collection
HTML
2
star
80

KnpMenuServiceProvider

Silex service provider for the KnpMenu library
PHP
2
star
81

dorce-hell

ML algorithm for detecting good "Title of your sex-tape" candidates
Python
2
star
82

rad-view-renderer

PHP
2
star
83

knpDoctrineVersionPlugin

[UNMAINTAINED] With this symfony plugin you can directly change or get the current Doctrine migration version.
PHP
2
star
84

KnpRadTable

[UNMAINTAINED] This project will not longer be maintained anymore.
PHP
2
star
85

dmRatablePlugin

[UNMAINTAINED] Allow visitors to rate records
JavaScript
2
star
86

knpMarkdownPlugin

[UNMAINTAINED] Provides a symfony markdown editor widget based on markItUp, with preview.
JavaScript
2
star
87

eslint-config-fp

ESLint configuration for functional programming
JavaScript
2
star
88

knpTestPlugin

[UNMAINTAINED] Base class for symfony functional tests. Uses DB transactions.
PHP
2
star
89

rad-prototype

PHP
2
star
90

knpLocaleAwareNumberPlugin

[UNMAINTAINED] knpValidatorLocaleAwareNumber is a symfony 1.4 plugin providing a validator and a widget to use in a locale aware environment. Useful if you want to use commas instead of dots. -- Time goes by. This project is deprecated. Feel free to contact us if you want to give rebirth to the project and being official maintainer.
PHP
2
star
91

gitbot

[HACKATHON]
JavaScript
1
star
92

synora

Syรฑora is a synthesizer using native brower api
JavaScript
1
star
93

symfony-twig-react-example

A proof of concept using a Twig powered Symfony app and a React SPA
PHP
1
star
94

sh00t3r

Rust
1
star
95

edgar-hero

A simple animated Edgar
JavaScript
1
star
96

bad-jokes

A React Native toy project (Hackathon #7).
JavaScript
1
star
97

symfony-template

Dockerfile
1
star
98

docker-images

Set of Docker images used for dev purpose at KNPLabs.
Shell
1
star
99

rad-edition-site

Provides a more opiniated edition of Symfony2 than the standard one to accelerate some processes during your development. [UNMAINTAINED]
HTML
1
star
100

knpDmRackspacePlugin

[UNMAINTAINED] Diem plugin to publish your assets automatically to Rackspace File
PHP
1
star