Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Entity Mapping trait #34

Merged
merged 1 commit into from Aug 30, 2018
Merged

Added Entity Mapping trait #34

merged 1 commit into from Aug 30, 2018

Conversation

JanGalek
Copy link
Contributor

@JanGalek JanGalek commented Aug 21, 2018

resolve #33

alternative for IEntityProvider.

@JanGalek
Copy link
Contributor Author

Today I will send rebase ;)

@f3l1x
Copy link
Member

f3l1x commented Aug 27, 2018

How is it working? I think it can't.

@JanGalek
Copy link
Contributor Author

JanGalek commented Aug 27, 2018

@f3l1x After rebase (+- 19-20h) trait will work in this way:

  • find annotationDriver
  • add Paths

you will use:

class ForumExtension extends CompilerExtension
{
    use EntityMapping;

    public function loadConfiguration(): void
    {
	...
        $this->setEntityMappings([
            'Forum' => __DIR__ . '/../Entity',
        ]);
    }
}

I have it in my project and work it ;)

use Nette\DI\ContainerBuilder;
use Nette\DI\MissingServiceException;

trait EntityMapping
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefix with T please.


/**
* @param string[] $mapping
* @throws MissingServiceException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop throws

Added example EntityMapping
@JanGalek
Copy link
Contributor Author

@f3l1x thanks, resolved CR ;)

@f3l1x f3l1x merged commit 6678991 into contributte:master Aug 30, 2018
@JanGalek
Copy link
Contributor Author

@f3l1x thanks, I will look to qa (new PR)

@JanMikes
Copy link
Contributor

Hi, @f3l1x any ETA when this finds its way into stable version?

@f3l1x
Copy link
Member

f3l1x commented Sep 24, 2018

I hope soon. Stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Entity provider
3 participants