From 6.x to 7.0
Composer
PHP Requirements
The minimal PHP version is now 8.3.
PHPUnit
Elgg now uses PHPUnit 12.5. You might need to update your tests.
Laminas Mail
The libraries laminas/laminas-mail, laminas/laminas-mime and laminas/laminas-servicemanager have been replaced
by symfony/mailer because of the end of support.
Because of this change the config setting emailer_transport (which can be found in the elgg-config/settings.php)
now requires a different format. Please read the instructions in elgg-config/settings.example.php. The config settings
emailer_sendmail_settings and emailer_smtp_settings have been removed.
The event zend:message, system:email has been renamed to message, system:email.
Note
Because of the switch to the Symfony Mailer you might have to update your PHP hardening to allow the function
proc_open as it’s used by Symfony.
Font Awesome
The icon library version has been updated to version 7. Lots of things remain the same, but you might need to validate your use of icons or any special Font Awesome related CSS. If you use a custom or pro version of Font Awesome you need to update your pack to version 7.
Elgg core changes
Default config changes
The trash is now enabled by default
The config option
min_password_lengthhas been changed to 16The config option
css_compiler_optionshas been removedThe config option
memcachehas been removedThe config option
memcache_namespace_prefixhas been removedThe config option
memcache_servershas been removedThe config option
redishas been removedThe config option
redis_optionshas been removedThe config option
redis_servershas been removed
Redis & Memcached
Built-in support for caching with Redis and Memcached features have been removed.
Cron
The PHP max execution time during the CRON execution has been set to ‘unlimited’. So for developers there is no longer a
need to call set_time_limit(0);
CSS Crush has been removed
CSS files are no longer preprocessed by CSS Crush. CSS Crush is no longer maintained and various features are now part
of regular CSS (like nesting and the usage of variables).
Variables set in your elgg-plugin.php (or those available in core) are still available in CSS files but you will
need to update your CSS to use var(--elgg-your-variable). If you have a custom theme you will need to check all
your CSS files for CSS Crush features and update your code accordingly. The vars:compiler, css event has been removed.
Note
The variables for the walled garden and maintenance page background images have been changed. The variables
used for media queries have been removed and will need to be hardcoded in your CSS files.
Color Scheme changes
To be able to correctly support color schemes, some CSS variables have been introduced and some CSS configurations have been changed to support the color schemes. If you have a custom theme, you might need to update your CSS to support color schemes.
Note
The special button classes for elgg-button-special and elgg-button-action-done have been removed.
Entity restore
The entity/chooserestoredestination form and action now use a singular parameter value for the
destination_container_guid when selecting a different entity to restore to.
Entity listings
The behaviour of elgg_list_entities() has been changed. The default value for the limit parameter which can be
provided by the query parameter limit (eg. /blog/all?limit=20) has been limited to a minimum of 1 and a maximum
of 100.
River emittable capability
If an entity supports river activity this is now controlled by setting the river_emittable capability. Make sure to add
it to the capabilities configuration in your elgg-plugin.php.
Abstract ElggObject
The ElggObject class is now abstract and it is required to have your own extensions of this class for each custom object.
Response event
The response and ajax_response event type has been changed. Besides the specials for actions and ajax responses
the former path has been replaced to the route_name to be path agnostic. The ajax_response event has been replaced
with the ajax_results event to influence only the data and not the full response. You might need to update your event handlers.
Ajax route
The definition of the ajax route has been changed. The segments has been split into type and segments.
You might need to update your url generation.
Notifications
The following notification handlers have been moved and renamed:
Elgg\Notifications\CreateCommentEventHandlermoved toElgg\Notifications\Handlers\CreateCommentElgg\Notifications\MakeAdminUserEventHandlermoved toElgg\Notifications\Handlers\MakeAdminUserElgg\Notifications\MentionsEventHandlermoved toElgg\Notifications\Handlers\MentionsElgg\Notifications\RemoveAdminUserEventHandlermoved toElgg\Notifications\Handlers\RemoveAdminUserElgg\Notifications\UnbanUserEventHandlermoved toElgg\Notifications\Handlers\UnbanUser
The following event handlers related to notifications have been moved and renamed:
Elgg\Notifications\CreateContentEventHandlermoved toElgg\Notifications\Events\CreateContentElgg\Notifications\EnqueueEventHandlermoved toElgg\Notifications\Events\EnqueueElgg\Notifications\MentionsEnqueueEventHandlermoved toElgg\Notifications\Events\MentionsEnqueue
It’s now possible to have multiple notification handlers on the same action. An example could be 'ban', 'user' where
you need one notification to the user being banned and one notification to the site administrators that the user was banned.
This could be handled in one notification handler, but that requires making a different message based on the recipient.
Having 2 distinct notification handlers will make this task easier.
Because of this change the function parameters for elgg_unregister_notification_event() have been changed. You now also
need to provide a $handler which is the notification handler you wish to unregister.
Another change to the function parameters of both elgg_register_notification_event() and elgg_unregister_notification_event()
is that array $actions has been replaced by a single string $action.
Widgets Add Panel
The route for the widget add panel has been replaced by an ajax view.
Actions
The admin/site/flush_cache has been renamed to admin/site/cache/clear to be consistent with other cache actions.
Events
Removed the legacy forward event in favor of the response event.
Plugin changes
Site Pages / External Pages
This plugin has been rewritten. The most important changes are:
Separate subtypes for each page has been merged into a single subtype
external_pageexpages/editaction has been replaced by genericEntityEditActioncontrollerElggExternalPageentity fields are available in the fields serviceExtra external pages are extendable via the
'names', 'externalpages'event
Group route definitions
In the group route definition we’ve dropped the subpage variable for the following routes:
collection:object:blog:groupcollection:object:bookmarks:groupcollection:object:page:group
This could break user favorites to those pages.
The route definition requests:group:group has been renamed to collection:user:user:group_requests for
consistency with it’s purpose and other routes within the Groups plugin.
Groups
The group/edit form and action now use a singular parameter value for the owner_guid when selecting a
different group owner.
Likes
By default only content owners can see who likes their content. This can be made public by a new plugin setting.
Members
The names of some routes have been changed to align with the route naming suggestions
collection:user:userwas changed tocollection:user:user:allsearch:user:userwas changed tocollection:user:user:search
Inline with the route name changes some language keys have been renamed.
Messages
The messages/send form and action parameter recipients has been renamed to recipient and now contains a
singular value when selecting a recipient.
Profile
The profile field Twitter has been removed.
Webservices
The responses from the REST API calls now have a Content-Disposition: attachment; filename="result.<view>" header.
Also the HTTP status codes of the error responses better align with the HTTP standard and are no longer a 200 OK, but
have different status codes like 404 Not Found, 403 Forbidden, 500 Internal Server Error, etc.
Changes in functions
Changed function return types
elgg_register_external_file()now returns voidelgg_register_pam_handler()now returns voidelgg_register_route()now returns voidelgg_unregister_external_file()now returns voidelgg_unregister_menu_item()now returns void
Changed class function return types
\Elgg\Traits\Di\ServiceFacade::name()now returns astring
Removed Classes
\Elgg\Email\Addresshas been removed, use\Symfony\Component\Mime\Address\Elgg\Email\HtmlPart.phphas been removed\Elgg\Email\PlainTextPart.phphas been removed