Skip to content

Commit 69cfbdc

Browse files
committed
Merge pull request #614 from uwej711/fix_typehint
fix #613 for queries with join from is a source
2 parents 5205725 + d8862c4 commit 69cfbdc

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
1.3.0
5+
-----
6+
7+
* **2015-03-19**: **BC break** changed the type hint of the second parameter of
8+
TranslationStrategyInterface::alterQueryForTranslation from
9+
SelectorInterface to SourceInterface to fix queries with joins
10+
411
1.2.0
512
-----
613

lib/Doctrine/ODM/PHPCR/Translation/TranslationStrategy/AttributeTranslationStrategy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
use Doctrine\ODM\PHPCR\Translation\Translation;
2727
use PHPCR\Query\QOM\ConstraintInterface;
2828
use PHPCR\Query\QOM\QueryObjectModelFactoryInterface;
29-
use PHPCR\Query\QOM\SelectorInterface;
29+
use PHPCR\Query\QOM\SourceInterface;
3030

3131
/**
3232
* Translation strategy that stores the translations in attributes of the same node.
@@ -203,7 +203,7 @@ public function getTranslatedPropertyPath($alias, $propertyName, $locale)
203203
*/
204204
public function alterQueryForTranslation(
205205
QueryObjectModelFactoryInterface $qomf,
206-
SelectorInterface &$selector,
206+
SourceInterface &$selector,
207207
ConstraintInterface &$constraint = null,
208208
$alias,
209209
$locale

lib/Doctrine/ODM/PHPCR/Translation/TranslationStrategy/ChildTranslationStrategy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
use PHPCR\Query\QOM\ConstraintInterface;
2626
use PHPCR\Query\QOM\QueryObjectModelConstantsInterface;
2727
use PHPCR\Query\QOM\QueryObjectModelFactoryInterface;
28-
use PHPCR\Query\QOM\SelectorInterface;
28+
use PHPCR\Query\QOM\SourceInterface;
2929
use PHPCR\SessionInterface;
3030

3131
/**
@@ -154,7 +154,7 @@ public function getTranslatedPropertyPath($alias, $propertyName, $locale)
154154
*/
155155
public function alterQueryForTranslation(
156156
QueryObjectModelFactoryInterface $qomf,
157-
SelectorInterface &$selector,
157+
SourceInterface &$selector,
158158
ConstraintInterface &$constraint = null,
159159
$alias,
160160
$locale

lib/Doctrine/ODM/PHPCR/Translation/TranslationStrategy/TranslationStrategyInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use PHPCR\NodeInterface;
2424
use PHPCR\Query\QOM\ConstraintInterface;
2525
use PHPCR\Query\QOM\QueryObjectModelFactoryInterface;
26-
use PHPCR\Query\QOM\SelectorInterface;
26+
use PHPCR\Query\QOM\SourceInterface;
2727

2828
/**
2929
* Operations that a translation strategy must support.
@@ -113,7 +113,7 @@ public function getTranslatedPropertyPath($alias, $propertyName, $locale);
113113
* generate a different query.
114114
*
115115
* @param QueryObjectModelFactoryInterface $qomf The PHPCR query factory.
116-
* @param SelectorInterface $selector The current selector.
116+
* @param SourceInterface $selector The current selector.
117117
* @param ConstraintInterface|null $constraint The current constraint, may be empty.
118118
* @param string $alias The selector alias of the main node.
119119
* @param string $locale The language to use.
@@ -122,7 +122,7 @@ public function getTranslatedPropertyPath($alias, $propertyName, $locale);
122122
*/
123123
public function alterQueryForTranslation(
124124
QueryObjectModelFactoryInterface $qomf,
125-
SelectorInterface &$selector,
125+
SourceInterface &$selector,
126126
ConstraintInterface &$constraint = null,
127127
$alias,
128128
$locale

0 commit comments

Comments
 (0)