Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework of namespaces, directory structure and class loader #3256

Merged
merged 64 commits into from
Nov 20, 2018

Conversation

emanuele45
Copy link
Contributor

@emanuele45 emanuele45 commented Nov 9, 2018

I used the composer classloader (PSR4), on top of that moved all the classes to an ElkArte directory (to which an ElkArte namespace corresponds) inside sources. From there reworked all the namespaces and class names and file names in order to match the convention.

Fixes #3253

…and tests, left for later when the code will start running again
…oser ClassLoader because otherwise it will conflict with the composer loaded during the setup of the tests
@emanuele45
Copy link
Contributor Author

Not yet working, but just to give any idea of what I had in mind (related also to #3257 (not yet) and #3258).

@Spuds
Copy link
Contributor

Spuds commented Nov 13, 2018

Looking good ! Would the plan be to update our db calls so we can in the core not use any of the temporary migration functions and just leave those for addons?

@emanuele45
Copy link
Contributor Author

Well... I doubt I can update all the calls in this very PR, though I added a backward compatibility "layer" with tracked errors, so that old-style calls can be identified.

@Spuds
Copy link
Contributor

Spuds commented Nov 13, 2018

Cool .. yes I meant change them as we go along, not all in this PR, that would be crazy man !

…f "old-style" database querying because it was causing session errors, plus a couple of files I forgot to commit previously
…ke of extending a class that is not a singleton and has the constructor public... fugly - oh well, I'll fix it one day... I guess
… available provided by the injection? Good question!
…ery::db_list_tables to avoid having to rewrite some parts of the code + fix the Dump class that was still poiting to the old methods
@emanuele45
Copy link
Contributor Author

I'm almost lost... can't understand what the heck it fails on installing the tests with an

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 36864 bytes) in /var/www/sources/ElkArte/Database/Mysqli/Connection.php on line 43

😖

@emanuele45
Copy link
Contributor Author

YAY!
Finally tests are green again!

One thing I'm not sure about is the upgrade, but to be honest, at the moment I don't want to know. 😆

@Spuds
Copy link
Contributor

Spuds commented Nov 20, 2018

MERGE !!!!!!

@Spuds Spuds merged commit 8702fff into elkarte:development Nov 20, 2018
@emanuele45
Copy link
Contributor Author

👯‍♀️ 👯‍♂️ 💃 👯‍♂️ 👯‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants