Developer Area/Developer Meetings/52: Difference between revisions
From Mahara Wiki
< Developer Area | Developer Meetings
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
### We previously discussed this topic 1 year ago, [http://meetbot.mahara.org/mahara-dev/2015/mahara-dev.2015-04-23-08.03.html Dev Meeting 43, in April 2015]. The decision then was to gather more data about which PHP versions are in use by expanding the site data registration. | ### We previously discussed this topic 1 year ago, [http://meetbot.mahara.org/mahara-dev/2015/mahara-dev.2015-04-23-08.03.html Dev Meeting 43, in April 2015]. The decision then was to gather more data about which PHP versions are in use by expanding the site data registration. | ||
### The latest stats (from [http://meetbot.mahara.org/mahara-dev/2016/mahara-dev.2016-02-02-07.34.html Dev Meeting 50 in Feb 2016]) still had 20% on PHP 5.3. I'll try to gather more stats before the next meeting. | ### The latest stats (from [http://meetbot.mahara.org/mahara-dev/2016/mahara-dev.2016-02-02-07.34.html Dev Meeting 50 in Feb 2016]) still had 20% on PHP 5.3. I'll try to gather more stats before the next meeting. | ||
## Switch to PSR-2 coding standard? http://www.php-fig.org/psr/psr-2/ | |||
### Should be easier to find auto-formatting tools; less barrier for devs new to the project | |||
## Namespaces & autoloading | |||
### Currently Mahara has a lot of standalone methods, and after a recent performance patch that removed an unnecessary loading of *every* artefact class on *every* page load, we now have a "dependency hell" situation where some random actions will fail because they expect a function to be present (usually artefact_get_descendants()) but no scripts have yet loaded it. | |||
### We could avoid that problem if we did this: | |||
#### Move all standalone methods into static class methods (perhaps one class per library file) | |||
#### Put Proper PHP namespaces on all of our library files (namespace supported was added in PHP 5.3) | |||
#### Add an autoloader method that loads up the correct Library file based on the class name and namespace: http://php.net/manual/en/language.oop5.autoload.php | |||
### This will have the added benefit of "modernizing" our code and getting it more compatible with the modern PHP code ecosystem. | |||
# Next meeting and chair | # Next meeting and chair | ||
# Any other business | # Any other business |
Revision as of 16:17, 1 April 2016
Agenda for the 52nd Mahara developer meeting on Thursday, 28 April 2016, 7:00 UTC
The developer meetings are held on IRC in the #mahara-dev channel. An IRC bot will be used to take minutes of these meetings and agendas made available on these pages before-hand.
If you don't have an IRC client, you can join us using your web browser.
Chair: Kristina
Agenda:
- Topics from previous meeting
- mingard will work on finding and documenting duplicated sections, and maybe do a bit of a proposal on how we should restructure the scripts generally
- Your topic goes here
- Drop support for PHP 5.3? --aaronw (talk) 18:42, 29 March 2016 (NZDT)
- Latest version of PEAR, a Mahara dependency, now requires PHP 5.4 or later. Perhaps it's time Mahara should raise its supported PHP version to 5.4 as well.
- We previously discussed this topic 1 year ago, Dev Meeting 43, in April 2015. The decision then was to gather more data about which PHP versions are in use by expanding the site data registration.
- The latest stats (from Dev Meeting 50 in Feb 2016) still had 20% on PHP 5.3. I'll try to gather more stats before the next meeting.
- Switch to PSR-2 coding standard? http://www.php-fig.org/psr/psr-2/
- Should be easier to find auto-formatting tools; less barrier for devs new to the project
- Namespaces & autoloading
- Currently Mahara has a lot of standalone methods, and after a recent performance patch that removed an unnecessary loading of *every* artefact class on *every* page load, we now have a "dependency hell" situation where some random actions will fail because they expect a function to be present (usually artefact_get_descendants()) but no scripts have yet loaded it.
- We could avoid that problem if we did this:
- Move all standalone methods into static class methods (perhaps one class per library file)
- Put Proper PHP namespaces on all of our library files (namespace supported was added in PHP 5.3)
- Add an autoloader method that loads up the correct Library file based on the class name and namespace: http://php.net/manual/en/language.oop5.autoload.php
- This will have the added benefit of "modernizing" our code and getting it more compatible with the modern PHP code ecosystem.
- Drop support for PHP 5.3? --aaronw (talk) 18:42, 29 March 2016 (NZDT)
- Next meeting and chair
- Any other business