GetMetadata() change in behaviour from 5

We’ve been upgrading applications from Lucee 5 and have ran into a critical issue caused by a change in behaviour.

// /path/to/a.cfc
component {
    function func_a() {
        // ...
    }
}

// /another/path/to/a.cfc
component extends="a" {
    function func_b() {
       // ...
    }
}

In Lucee 5, running getMetaData() on /another/path/to/a.cfc would return an array of function definitions that contains both func_a and func_b. In Lucee 7.0, it is returning only func_b and you have to traverse the extends key to get every single function definition.

This breaks a lot of core framework meta logic.

1 Like

Ticket: Jira
PR: LDEV-6469 by DominicWatson · Pull Request #2808 · lucee/Lucee · GitHub

@Dominic_Watson thanks for the ticket and the PR!

LDEV-6469 (your PR LDEV-6469 by DominicWatson · Pull Request #2808 · lucee/Lucee · GitHub) is in the current release candidates: GetMetadata( childCfc ).functions includes the inherited methods again when the child and parent CFC have the same file name, like your two a.cfc.

I ran the regression test from the PR: it fails on 7.0.5.41 and passes on both RCs. Could you try your framework code against the RC and let us know how it goes?