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

Enforce AbstractBinary for all binary operators #4482

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

fabpot
Copy link
Contributor

@fabpot fabpot commented Nov 29, 2024

No description provided.

@fabpot fabpot mentioned this pull request Nov 29, 2024
src/ExpressionParser.php Show resolved Hide resolved
namespace Twig\Node\Expression;

/**
* Interface implemented by n-ary operators for n > 1.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This interface can be defined on 1-ary operators, but that would not make sense.


$stream->expect(Token::PUNCTUATION_TYPE, ':', 'A type name must be followed by a colon (:)');
if ($stream->nextIf(Token::OPERATOR_TYPE, '?:')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is an ambiguity when using ?: in foo? : boolean.

@VincentLanglet
Copy link
Contributor

I'll update all the PHPdoc in 3.x after this PR (and then do the same in 4.x)

@fabpot fabpot force-pushed the ternary-operator branch 4 times, most recently from b792ee5 to a618a4f Compare November 29, 2024 15:47
@fabpot fabpot merged commit d1d8e3c into twigphp:3.x Nov 29, 2024
48 of 50 checks passed
@fabpot fabpot deleted the ternary-operator branch November 29, 2024 18:22
@VincentLanglet
Copy link
Contributor

I made the PR to update all the related phpdoc @fabpot #4485

xabbuh added a commit to symfony/symfony that referenced this pull request Dec 2, 2024
This PR was merged into the 6.4 branch.

Discussion
----------

[TwigBridge] fix Twig 3.17 compatibility

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

see twigphp/Twig#4482

Commits
-------

ac4ca46 fix Twig 3.17 compatibility
fabpot added a commit that referenced this pull request Dec 2, 2024
This PR was merged into the 3.x branch.

Discussion
----------

fix version numbers for deprecations

#4482 was merged after the release of 3.16.0

Commits
-------

f90105d fix version numbers for deprecations
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.

3 participants