Once I was done with the project I was working on I started a fresh copy and went to it with changes that have been in the back of my mind for a while.
I was working on a master branch copy as I didn't look through the develop branch code all that well.
Tonight I decided to push the changes to a branch in my phpBB3 fork.
https://github.com/topdown/phpbb3/tree/ ... ctor/phpBB
Something to note: I added a diff, but make sure you have a decent machine when viewing it. Its BIG. A little over 11mg and 350,500 lines long.
Opens in Vim on my workstation fine.
Some key points of things I did.
Removed common globals and replaced them with static instances.
Why?
Because it gets rid of the thousands of global variable calls for every function.
So no more global $phpbb_root_path, $phpEx, $config, $cache, $db, $user, $auth, $template.
https://github.com/topdown/phpbb3/blob/ ... /phpbb.php
Ignore the files head docbloc it was the for testing my settings for phpcs
Restructured some of the core.
A lot of the includes files were classes named functions_*
Well they were not functions, but classes. All renamed and moved to system/core
includes got moved to system/core
the includes acp & mcp & ucp are in system/modules/
Because it makes sense, to me anyway.
All of the other system directories got moved to the system/ as well.
I completed a bunch of doc blocks while working on this.
Mostly because all of the missing parts of the PHPDocs lit up my IDE like a Christmas tree when viewing some of these files.
I realize it would have made more sense for me to do this with the develop branch but like I said I haven't looked at that branches code all that well.
Not sure what the point is behind these expressions
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
It makes no sense. By default PHPBB_ROOT_PATH does not exist so this always returns the else './'
And there are a bunch of these expressions.
Also statically called methods that are not static. eg captcha and profile_field methods.
Was this for backwards PHP compatibility?
What I did notice is that the new files in the develop branch are properly commented. Thanks
Anyway, have a look if you wish.