Input:
<?php
class test {
public function test_method() {
$customer = (object) [ 'name' => 'Bob' ];
$job = (object) [ 'customer' => $customer ];
return "The customer for that job, {$job->customer->name}.";
}
}
Output
<?php
class test
{
public function test_method()
{
$customer = (object) ['name' => 'Bob'];
$job = (object) ['customer' => $customer];
return "The customer for that job, $job->customer->name.";
}
}
Expected output:
<?php
class test
{
public function test_method()
{
$customer = (object) ['name' => 'Bob'];
$job = (object) ['customer' => $customer];
return "The customer for that job, {$job->customer->name}.";
}
}
Just checked this against the latest code base (I didn't realize I was behind) and it is still an issue.
Related: #6
Semi related but on the pretty we add the high-pri label for anything that would either cause a syntax error or worse, a different behavior. I would recommend doing something similar, this way it's easy to look at the issues (open and closed) and find out all the things that are/were breaking.
Good idea - i created and added the high-pri label!
@cmancone can you check this again against the most recent version of master? I believe it should have been fixed with #251
@mgrip I should be able to later today or tomorrow
@mgrip I can confirm that with the latest updates this is now working