v0.7.0
Bumped! 💅
Diff: v0.6.1...v0.7.0
Changes:
- Rework mapping [BC break] [#75]
Configuration for annotation and xml changed.
Before
nettrine.orm.annotations:
namespaces: [App\Model\Database]
paths: [%appDir%/Model/Database]
After
nettrine.orm.annotations:
mapping:
App\Model\Database: %appDir%/Model/Database
Dropped TEntityMapping, introduced more powerfull EntityHelper.
Before
class CategoryExtension extends CompilerExtension
{
use TEntityMapping;
public function beforeCompile(): void
{
$this->setEntityMappings([
'Forum' => __DIR__ . '/../Entity',
]);
}
}
After
class CategoryExtension extends CompilerExtension
{
public function beforeCompile(): void
{
MappingHelper::of($this)
->addAnnotation( __DIR__ . '/../app/Model/Database', 'App\Model\Database')
->addAnnotation( __DIR__ . '/../../modules/Forum/Database', 'Forum\Modules\Database');
}
}