Won't fix EntityClassProperties CLI command uses FQNs

DragonByte Tech

Well-known member
Licensed customer
Affected version
2.3.8
This is a regression that was introduced in 2.3.8 Preview but I didn't catch it in time >.>

When running php cmd.php xf-dev:entity-class-properties AddOnId, the written docblock now uses FQNs for Entity and Collection references, rather than the shortnames that were used prior.
 
At least for now, I'm recommending that we don't make changes here.

To canonicalise the full journey to this point, the code is currently where it was at a few versions ago where it used FQNs. There was I think a single release cycle where it attempted to use short names via imports but it was broken and it would likely take a significant amount of effort to get it right.

"But all the XF entities have shortnames". Yes, this is true, but they are generated with this command as FQNs and then PHP CS Fixer simplifies them with imports according to our official code style rules.

So, for now, that's what we'd recommend everyone else do. The official config can be found here:

 
That’s unfortunate, as it complicates git commits when running exports.

Given that any broken imports are usually only gonna be broken once (requiring manual class imports), whereas these FQNs will happen on every class property export.
 
Back
Top Bottom