question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression in prerelease 7 with echo

See original GitHub issue

This code

<?php
echo __( 'Echoed translation', 'testdomain' );

handles the function __ as a ClassReference

Full AST
Program {
  kind: 'program',
  loc:
   Location {
     source: null,
     start: Position { line: 1, column: 0, offset: 0 },
     end: Position { line: 3, column: 0, offset: 53 } },
  children:
   [ Echo {
       kind: 'echo',
       loc:
        Location {
          source: null,
          start: Position { line: 2, column: 0, offset: 6 },
          end: Position { line: 2, column: 46, offset: 52 } },
       shortForm: false,
       expressions:
        [ Call {
            kind: 'call',
            loc:
             Location {
               source: null,
               start: Position { line: 2, column: 7, offset: 13 },
               end: Position { line: 2, column: 45, offset: 51 } },
            what:
             ClassReference {
               kind: 'classreference',
               loc:
                Location {
                  source: null,
                  start: Position { line: 2, column: 5, offset: 11 },
                  end: Position { line: 2, column: 7, offset: 13 } },
               resolution: 'uqn',
               name: '__' },
            arguments:
             [ String {
                 kind: 'string',
                 loc:
                  Location {
                    source: null,
                    start: Position { line: 2, column: 9, offset: 15 },
                    end: Position { line: 2, column: 29, offset: 35 } },
                 value: 'Echoed translation',
                 raw: "'Echoed translation'",
                 unicode: false,
                 isDoubleQuote: false },
               String {
                 kind: 'string',
                 loc:
                  Location {
                    source: null,
                    start: Position { line: 2, column: 31, offset: 37 },
                    end: Position { line: 2, column: 43, offset: 49 } },
                 value: 'testdomain',
                 raw: "'testdomain'",
                 unicode: false,
                 isDoubleQuote: false } ] } ] } ],
  errors: [],
  comments: [] }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ichiriaccommented, Jan 7, 2019

released in 3.0.0-prerelease.8

1reaction
alexander-akaitcommented, Nov 15, 2018

@rasmusbe also i think we rename ClassReference node to IdentifierReference (https://github.com/glayzzle/php-parser/issues/228) to avoid misleading with Class word

Read more comments on GitHub >

github_iconTop Results From Across the Web

[prerelease] Performance regression? · Issue #9478 · pytest ...
For pytest 7: while read line; do pkg=$(echo "$line" | cut -f1) chroot=$(echo "$line" | cut -f2) # this will always be the...
Read more >
77620 – Generic compile time regression of 7.0
I noticed that compiling my C++ project with 7.0 at -O3 took twice as much time as before with earlier major versions. First...
Read more >
267221 – [patch] Regression in recently merged file-5.43
This works just fine in file-5.42 (f.e., in FreeBSD 12.3-RELEASE): (echo /lib/libc.so.7; sleep 3600) | file -bnf - The commands prints result immediately, ......
Read more >
Regression for time series/controller data?
In having a simple think about this I pictured having some kind of regressor (say fluid.mlpregressor~ ) and giving it an input which...
Read more >
Regression from 5.7 - suspend not working on XPS - Dell
I bisected down to the exact kernel commit that caused the regression - it was in a 5.7 pre-release. I found that all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found