CodeIgniter
CodeIgniter copied to clipboard
Separate profiler view to a template file
A PR for this issue: https://github.com/bcit-ci/CodeIgniter/issues/4477
This PR simply removes the HTML from libraries/Profiler.php
, and instead reads from a separate HTML template file application/views/profiler/profiler_template.php
.
Developers will be free to modify the template to suit their needs.
Haven't looked into it yet, just referencing #3847 as relevant.
@narfbg Thanks for the reference; didn't know there was a similar PR before. Since my current commit requires a newly implemented view, it will apply to your past comment:
If 3.0.0 requires nothing for this to work, and then you change it in 3.0.1 to require a view, how is it not a BC break?
To keep BC I cannot introduce any new files, so frankly I will propose just sticking the content of application/views/profiler/profiler_template.php
into my newly refactored Profiler.php
as a separate method or something.
Not pretty, I admit, but much better than the current state of Profiler.php
.
Please let me know if I am heading the wrong direction.
This is targeting 3.1.0, where we'll have a few minor BC breaks like this, so ... no, you don't need to do that.
@narfbg Great, thanks! I personally prefer a separate view for the profiler (even by breaking BC) so that's good news. Please let me know if there are any poor code or design decisions which require fixing or explaining. Thanks!
+1 :+1: I support this.
Sorry all that I've left this one to rot. The Profiler has always been just an uninteresting chore for me.
@gxgpet I don't know if there are still people interested, but feel free to make any decision on this one.