neobazaar/neobazaar

Neobazaar main module. This contains Doctrine 2 entities and repositories

dev-master / 1.0.x-dev 2014-05-12 05:10 UTC

This package is not auto-updated.

Last update: 2019-08-08 16:14:07 UTC


README

Build Status Coverage Status Dependency Status Latest Stable Version Total Downloads Latest Unstable Version

Neobazaar is a free classifieds web application. It is composed by the following modules:

Duties of this module

  • provide database mapping using Doctrine 2
  • provide Web Services with 'static' data (cities, categories etc.)
  • provide a main application service capable to return EntityManager and Entity Repositories.

Install with Composer

{
 "repositories": [
       {
           "type": "vcs",
           "url": "https://github.com/kaiohken1982/Neobazaar.git"
       }
   ],
   "require": {
       ......,
       "neobazaar/neobazaar": "dev-master",
   }
}

Schema generation and other Doctrine 2 Tool

You must register this module and Doctrine modules in order to user the following console commands in config/application.config.php. Furthermore you must move into your project root directory.

  • ./vendor/bin/doctrine-module orm:schema-tool:create

About HashID

This module can use an hashed id to get entity. Hashed id are provided by defalt by hashid module (service 'neobazaar.service.hashid'). All entity repositories extends the same entity repository abstract that provide the method findByEncryptedId($id, $field = 'id'). The hashing algorithm must be configured using a config file (neobazaar.{env}.php) that must be included in your autoload directory, check the config/neobazaar.local.php.dist file example. Once chosen, hashSalt adn hashLength must not be changed if these ids are used by search engine for indexing your website pages!

Run unit test

Please note you must be in the module root.

curl -s http://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit 

If you have xdebug enabled and you want to see code coverage run the command below, it'll create html files in Neobazaar\tests\data\coverage

./vendor/bin/phpunit --coverage-html data/coverage

TODO

Remove dependency with razor/razor and port here Razor\Doctrine\ORM* class. Refactor all that part using a separate Sphinx module.