This week in addition to a bunch of bug fixes, we've also been doing a spot of housekeeping in our code. The following is quite technically heavy so if you're a non-developer, shield your eyes and read the less boring bits.
Much wider usage for class strings
As a reminder, XenForo 2.3 brings with it support for using native PHP class strings. For example, originally we used "class short names" to point to certain classes. While these were easy to write, it makes refactoring classes difficult, and you need these PHP doc comments to hint to code editors what object is ultimately returned in the code:
Because PHP natively understands these special strings, the issues with type hinting are no more, and doing things like renames of classes or moving classes becomes a much more trivial exercise.
Throughout the core XF code now, starting with RC3, we have replaced the majority of these legacy class short names with native class strings.
This week in addition to a bunch of bug fixes, we've also been doing a spot of housekeeping in our code. The following is quite technically heavy so if you're a non-developer, shield your eyes and read the less boring bits.
Much wider usage for class strings
As a reminder, XenForo 2.3 brings with it support for using native PHP class strings. For example, originally we used "class short names" to point to certain classes. While these were easy to write, it makes refactoring classes difficult, and you need these PHP doc comments to hint to code editors what object is ultimately returned in the code:
Because PHP natively understands these special strings, the issues with type hinting are no more, and doing things like renames of classes or moving classes becomes a much more trivial exercise.
Throughout the core XF code now, starting with RC3, we have replaced the majority of these legacy class short names with native class strings.
This week in addition to a bunch of bug fixes, we've also been doing a spot of housekeeping in our code. The following is quite technically heavy so if you're a non-developer, shield your eyes and read the less boring bits.
Much wider usage for class strings
As a reminder, XenForo 2.3 brings with it support for using native PHP class strings. For example, originally we used "class short names" to point to certain classes. While these were easy to write, it makes refactoring classes difficult, and you need these PHP doc comments to hint to code editors what object is ultimately returned in the code:
PHP:
<span>/** @var \XF\Entity\User $user **/</span><br><span>$user</span> <span>=</span> \<span>XF</span><span>:</span><span>:</span><span>em</span><span>(</span><span>)</span><span>-</span><span>></span><span>create</span><span>(</span><span>'XF:User'</span><span>)</span><span>;</span>
Our preference going forwards is using class strings:
PHP:
<span>$user</span> <span>=</span> \<span>XF</span><span>:</span><span>:</span><span>em</span><span>(</span><span>)</span><span>-</span><span>></span><span>create</span><span>(</span>\<span>XF<span>\</span>Entity<span>\</span>User</span><span>:</span><span>:</span><span>class</span><span>)</span><span>;</span>
Because PHP natively understands these special strings, the issues with type hinting are no more, and doing things like renames of classes or moving classes becomes a much more trivial exercise.
Throughout the core XF code now, starting with RC3, we have replaced the majority of these legacy class short names with native class strings.
This week in addition to a bunch of bug fixes, we've also been doing a spot of housekeeping in our code. The following is quite technically heavy so if you're a non-developer, shield your eyes and read the less boring bits.
Much wider usage for class strings
As a reminder, XenForo 2.3 brings with it support for using native PHP class strings. For example, originally we used "class short names" to point to certain classes. While these were easy to write, it makes refactoring classes difficult, and you need these PHP doc comments to hint to code editors what object is ultimately returned in the code:
PHP:
<span>/** @var \XF\Entity\User $user **/</span><br><span>$user</span> <span>=</span> \<span>XF</span><span>:</span><span>:</span><span>em</span><span>(</span><span>)</span><span>-</span><span>></span><span>create</span><span>(</span><span>'XF:User'</span><span>)</span><span>;</span>
Our preference going forwards is using class strings:
PHP:
<span>$user</span> <span>=</span> \<span>XF</span><span>:</span><span>:</span><span>em</span><span>(</span><span>)</span><span>-</span><span>></span><span>create</span><span>(</span>\<span>XF<span>\</span>Entity<span>\</span>User</span><span>:</span><span>:</span><span>class</span><span>)</span><span>;</span>
Because PHP natively understands these special strings, the issues with type hinting are no more, and doing things like renames of classes or moving classes becomes a much more trivial exercise.
Throughout the core XF code now, starting with RC3, we have replaced the majority of these legacy class short names with native class strings.
Firstly, to clarify some concerns that have arisen:
1. If you did a normal upgrade (either uploading files or via your admin control panel) you do not need to manually edit any files to receive the security fixes.
2. If you upgraded to the initial 2.2.16 release, you are fully protected against the security issues that were being addressed.
Secondly, a second patch is being released to address some minor bug fixes that may not have been correctly applied when upgrading to XenForo 2.2.16. This is only applicable if you performed a normal upgrade to 2.2.16, and this patch is not security related or affected by the security fixes.
You can download that now from your customer area or perform a one-click upgrade through your admin control panel. You can go to Tools > Check for upgrades in order to see the second patch release.
If you are running XenForo Cloud, the fixes have been applied automatically.
XenForo 2.2.16 Released
XenForo 2.2.16 is now available for all licensed customers to download. We strongly recommend that all customers running previous versions of XenForo 2.2 upgrade to this release to benefit from increased stability.
One-click upgrade to XenForo 2.2.16
Directly from your admin control panel
If you are a XenForo Cloud customer, your upgrade will be scheduled automatically.
Some of the changes in XF 2.2.16 include:
- Fix some issues with xf-dev:class-use-function to better support classes with class attributes and comments, or existing use function declarations.
- Fix persistent action indicator when using back/forward navigation
- Add _deleteFromSource method to support performing tasks right before entity deletion
- Skip logging IPs when updating avatars during registration
- Fix docblock return hint for \XF\Util\Ip::checkIpsAgainstBinaryRangeList
- Add missing security locked phrase
- Expose additional parameters to the reported_thread_title phrase
- Ensure sticky threads are passed to the fetchExtraContentForThreadsFullView method
- Adjust the phrasing of mail encryption options
- Update purchase requests on user merge
- Set aria-label for tooltips with no children
- Skip processing email bounces and unsubscribes when email has been disabled in config.php
- Gracefully handle errors when editing bookmarks
- Clean up temp files after job completion
- Add proper ordering to the shared IPs tab
- Add an index hint to the newest members widget
- Avoid generating invalid SQL with XF\Db\Schema\Column::values()
- Prevent disabled accounts from using the admin control panel
- Include a plain confirmation URL in the email sent to users awaiting email confirmation
As always, new releases of XenForo are free to download for all customers with active licenses. You may now upgrade from your admin control panel or grab the new version from the customer area.
Current requirements
Please note that XenForo 2.2 has higher system requirements than earlier versions.
The following are minimum requirements:
- PHP 7.2 or newer (PHP 8.2 recommended)
- MySQL 5.5 and newer (Also compatible with MariaDB/Percona etc.)
- All of the official add-ons require XenForo 2.2.
- Enhanced Search requires at least Elasticsearch 2.0.
Installation and upgrade instructions
Full details of how to install and upgrade XenForo can be found in the XenForo 2 Manual. We strongly recommend upgrading directly from within your control panel.
This is beta software. It is not officially supported.
We do not recommend running it in production.
Please remember that this is beta software. It contains known bugs and incomplete functionality. We do not recommend running beta software in a production environment, and support is limited at this time to questions here on the community forums.
Add-ons and custom styles may be broken after upgrading to 2.3. You must test your add-ons thoroughly or look for updates. Be especially careful with add-ons that cover similar features to ones that are added to 2.3; these may conflict with the core XenForo data. If data conflicts are found, they will need to be resolved in a new add-on release or by removing the add-on before upgrading to 2.3.
If you choose to run beta software, it is your responsibility to ensure that you make a backup of your data. We recommend you do this before attempting an upgrade. If in doubt, always do a test upgrade on a copy of your production data.
Some of the changes in XF 2.2.15 include:
- Avoid setting duplicate List-Unsubscribe headers.
- Include first post QA schema items unconditionally.
- Make outdated PHP version notice in admin control panel clearer.
- Retain the original unsubscribeEmailAddress option for backwards compatibility.
- New unsubscribeEmailHandling option to replace the new unsubscribeEmail option and conclusively fix issues arising from yesterday's XF 2.2.14 release.
- Fix URL unfurls no longer unfurling.
Some of the changes in XF 2.2.14 include:
- Fix type hinting for extendClass
- Do not attempt to generate tag URLs without a valid tag
- Properly disable outbound IPv6 requests when PHP is not compiled with IPv6 support
- Improve audio mime-type detection
- Use sodium_bin2base64 over base64_encode when generating random strings.
- Update Twitter BB code media site to support x.com URLs and update some branding to X, rather than Twitter.
- Increase the size of the old_value and new_value columns in the xf_change_log table
- Properly throw an exception when failing to decode JSON for oEmbed
- Ensure tag pages have a canonical URL set
- Support custom URL portions for link forums
- Mark old_value and new_value fields as required in the change log entity
- Adjust regex for dialog loading to ensure consistency with BB code tag naming.
- Fix a number of emoji phrases
- Update braintree_api_keys_explain.txt phrase
- Update webmanifest orientation to use natural as this should derive from the system's settings.
- Highlight current style and language selections on chooser pages
- Always set thread RSS publication dates to the creation date of the thread
- Fix profile post/comment author alert reason API documentation
- Properly phrase the BB Code help page example[/URL]
[*][URL='https://xenforo.com/community/threads/214356']Improve error handling when loading notifier services[/URL]
[*][URL='https://xenforo.com/community/threads/214357']Extend notifier service class before calling createForJob static method[/URL]
[*][URL='https://xenforo.com/community/threads/214842']Reduce lock contention when writing thread read records[/URL]
[*][URL='https://xenforo.com/community/threads/215144']Provide a getter for class extensions, and check for class extensions before attempting to remove them[/URL]
[*][URL='https://xenforo.com/community/threads/215199']Skip relative (dot) files when cleaning up temporary files[/URL]
[*][URL='https://xenforo.com/community/threads/215484']Ensure prefix search constraints are lists of values[/URL]
[*][URL='https://xenforo.com/community/threads/215616']Use a no-permission response when a user cannot be banned, and gracefully handle error responses without a proper error message[/URL]
[*][URL='https://xenforo.com/community/threads/215775']Clarify that new SFS submissions will transmit an unhashed email address[/URL]
[*][URL='https://xenforo.com/community/threads/215860']Properly capture array_unique results[/URL]
[*][URL='https://xenforo.com/community/threads/216126']Add an index to the user ID column of the error log table[/URL]
[*][URL='https://xenforo.com/community/threads/216479']Fix value of custom user titles in API responses[/URL]
[*][URL='https://xenforo.com/community/threads/216665']Surely .u-spaceBefore is intended to apply the margin to the left[/URL]
[*][URL='https://xenforo.com/community/threads/217070']Guard against null metadata in MySQL full-text searchs[/URL]
[*][URL='https://xenforo.com/community/threads/216133']Do not display menus for selected tabs with no links[/URL]
[*][URL='https://xenforo.com/community/threads/217245']Use a more efficient query when updating reaction caches for content[/URL]
[*][URL='https://xenforo.com/community/threads/217511']Support filtering threads with forum type filters when using the API[/URL]
[*][URL='https://xenforo.com/community/threads/217067']When rebuilding user group relations, skip falsey values[/URL]
[*][URL='https://xenforo.com/community/threads/212069']Include support for embedding YouTube Live URLs[/URL]
[*][URL='https://xenforo.com/community/threads/210516']Improve PHP 8.2 compatibility in vendor libraries[/URL]
[*][URL='https://xenforo.com/community/threads/216804']Pass posterParams in the post reaction push template[/URL]
[*][URL='https://xenforo.com/community/threads/212450']Attempt to support fb.watch URLs[/URL]
[*][URL='https://xenforo.com/community/threads/218694']Only set descriptor suffix for Stripe card payments[/URL]
[/LIST]