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

Add lookup strategy to writer #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add lookup strategy to writer #11

wants to merge 2 commits into from

Conversation

ddeboer
Copy link
Member

@ddeboer ddeboer commented Dec 8, 2017

See #9 (comment).

Fix #3: if you want to use QueryBuilder, you can just implement your own LookupStrategy.

@ddeboer ddeboer requested a review from Baachi December 8, 2017 13:28
@Baachi
Copy link
Contributor

Baachi commented Dec 8, 2017

Wow you'r fast 😲

Good Job!

@Baachi
Copy link
Contributor

Baachi commented Dec 8, 2017

Should we add a depreciation note somewhere? So we can remove this static constructur in the next major version?

@ddeboer
Copy link
Member Author

ddeboer commented Dec 8, 2017

Added a (silenced) deprecation warning.

* @param string $lookupMethod Method used for looking up the item
* @param LookupStrategy $lookupStrategy
*
* @throws UnsupportedDatabaseTypeException
*/
public function __construct(
ObjectManager $objectManager,
$objectName,
Copy link
Member Author

Choose a reason for hiding this comment

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

$objectName needs to passed both here and when constructing a LookupStrategy. Not very elegant, but I don’t see any other options now.

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

Successfully merging this pull request may close these issues.

2 participants