Skip to content

Commit df55d8b

Browse files
committed
PHPLIB-1597 Accept a $-prefixed string anywhere an expression is accepted
1 parent 3a8a0a7 commit df55d8b

File tree

187 files changed

+1848
-1800
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+1848
-1800
lines changed

generator/config/expressions.php

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
$expressions = [];
4646
$resolvesToInterfaces = [];
4747
foreach ($bsonTypes as $name => $acceptedTypes) {
48+
// an expression can be a string with a $-prefixed field name
49+
if (! in_array('string', $acceptedTypes)) {
50+
$acceptedTypes[] = 'string';
51+
}
52+
4853
$expressions[$name] = ['acceptedTypes' => $acceptedTypes];
4954

5055
$resolvesTo = 'resolvesTo' . ucfirst($name);

src/Builder/Accumulator/AccumulatorAccumulator.php

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder/Accumulator/AvgAccumulator.php

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder/Accumulator/BottomAccumulator.php

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder/Accumulator/BottomNAccumulator.php

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder/Accumulator/CovariancePopAccumulator.php

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder/Accumulator/CovarianceSampAccumulator.php

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder/Accumulator/DerivativeAccumulator.php

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder/Accumulator/ExpMovingAvgAccumulator.php

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)