This will make it easier to run phpunit for a specific component by making
all testsuite names consistent, guessable, and in-line with the naming of
the parameter (testsuite vs. test suite).
There are two phpunit.xml build locations, one for overall
and another for individual components. To reduce id changes
when running different components, we use the same initial ID
in all component files when building.
This reverses the references used for global $USER and $SESSION,
the reason is that PHP does not allow references to references.
$USER is a reference to $GLOBALS['USER'] which means we cannot
put any references to it. Solution is to store the current user and session
objects in $GLOBALS['USER'] and $GLOBALS['SESSIOn'] are reference
them in $_SESSION.
This patch makes the session code behave the same way in CLI,
phpunit and normal web requests - this allows use to finally
unit test most aspects of the session code in Moodle.
When different ID's are set for each sequence a number
of unit test failures appear. They have been corrected
to allow unit tests to pass with the new generator in place.
AMOS BEGIN
MOV ['gspath','assignfeedback_editpdf'],['pathtogs','admin']
MOV ['gspath_help','assignfeedback_editpdf'],['pathtogs_help','admin']
AMOS END
The old style PEAR installation is incompatible with PHPUnit 4,
nobody was supposed to use PEAR any more - composer
is the only supported library installation method now.
Last commit switched from raw arrays to associative
arrays. That leads to json_encode() to generate an
object instead of an array, ultimately leading to
problems with the rest of code expecting an array.
By using array_values() we are moving back to the
non-associative array.
Also, fix some file permissions.
Instead we will create new MUC caches inside each filter plugin.
Please note that all cache filters should work with local caches
without the need of strict cache invalidation.
Includes:
* update checker refactored to \core\update\ namespace
* plugininfo classes refactored to \core\plugininfo\ namespace
* plugin_manager renamed to core_plugin_manager
* redirect back to original page after plugin uninstall
* fixed assign subplugin uninstall
* move assign subplugins under the assignment in admin tree
* fixed plugininfo for all question related plugin types
* auth uninstall support
* added missing block dependencies
* added theme uninstall
* subplugin types are following the plugin on plugin overview page
* several performance improvements in plugin manager
* new warnigns when plugininfo are outdated or missing
* multiple fixes and other improvements
Too many functions, too different parameters, unnecessary DB queries.
All repositories developed for Moodle 2.3-2.5 will continue to work.
Also get rid of DB field files_reference.lifetime, it is not used by
anybody except repository itself.
List of changes:
* New OOP API using PHP namespace \core\session\.
* All handlers now update the sessions table consistently.
* Experimental DB session support in Oracle.
* Full support for session file handler (filesystem locking required).
* New option for alternative session directory.
* Official memcached session handler support.
* Workaround for memcached version with non-functional gc.
* Improved security - forced session id regeneration.
* Improved compatibility with recent PHP releases.
* Fixed borked CSS during install in debug mode.
* Switched to file based sessions in new installs.
* DB session setting disappears if DB does not support sessions.
* DB session setting disappears if session handler specified in config.php.
* Fast purging of sessions used in request only.
* No legacy distinction - file, database and memcached support the same functionality.
* Session handler name included in performance info.
* Fixed user_loggedin and user_loggedout event triggering.
* Other minor bugfixing and improvements.
* Fixed database session segfault if MUC disposed before $DB.
Limitations:
* Session access time is now updated right after session start.
* Support for $CFG->sessionlockloggedinonly was removed.
* First request does not update userid in sessions table.
* The timeouts may break badly if server hosting forces PHP.ini session settings.
* The session GC is a lot slower, we do not rely on external session timeouts.
* There cannot be any hooks triggered at the session write time.
* File and memcached handlers do not support session lock acquire timeouts.
* Some low level PHP session functions can not be used directly in Moodle code.