Coding tips

To get the current user object:

Factory::getApplication()->getIdentity();

To fix old Joomla classes beginning with J and add appropriate use statements, use script convertJ (in /usr/local/sbin). Usage:

convertJ --file=path/to/file.php [--dry-run] or convertJ --dir=path/to/directory [--dry-run]