Skip to content

v0.7.0

Compare
Choose a tag to compare
@f3l1x f3l1x released this 16 Jun 15:24
· 69 commits to master since this release
9948401

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');
  }
}