Upgrading to Drupal 11.3.x & PHP 8.5.x - #229
Conversation
Signed-off-by: Etienne Jacquot <etiennej@upenn.edu>
|
@atnjqt I apologize for the delay in getting back to you on this. Your contribution is very much appreciated. It addresses something I've had on my mind to do for quite some time. However, on trying it out on my machine I'm getting an error while trying to access the website: Haven't you seen this error? |
|
Ok, upon further investigation I understand that this problem comes from the database not having been updated to match the new Drupal version used. I'm guessing you wouldn't see that if you start from scratch. This will need a bit more work to make sure that when deploy the site still works. |
|
Thanks for the kind notes, @lehors -- there is of course no need to apologize! This was an exciting reference at the UN Open Source week conference, and I was happy to maybe contribute. I didn't have a copy of the site DB of course, but I'm forgetting if I ran a local |
|
I did some additional testing and it works if I start with an empty database. The problem is the transition with an existing database. The way to test it is to start with the latest version on the main branch, install the website locally and load up the models as described in INSTALL.md, then apply your changes to see what happens. I tried upgrading the database schema and clearing the cache using drush but I was still getting some errors unfortunately... |
|
Thanks for the follow up note! I should have some time in the next couple of days to review this, I'll ping back here! Sending my best |
Upgrade Drupal 10 → 11 and PHP 8.3 → 8.5
Overview (Motivation Statement)
This pull request is motivated by my attendance at the UN Open Source Week 2026 hosted by the United Nations Office for Digital and Emerging Technologies (ODET), where among the panelists included Cailean Osborne (author on https://arxiv.org/abs/2403.13784) who spoke briefly about the Model Openness Framework.
While this PR focuses on security & maintenance bringing the MOT Drupal site to latest versions, it isn't entirely clear that implementation of MOF benefits from being tied to a Drupal codebase (if that is the case, it may be beneficial instead to stage MOT as a contrib module at
drupal.org/project/mofto allow for integration into other Drupal sites).Referencing back on the 2024 blog post Addressing Challenges in Open AI with LF AI & Data: Introducing the Model Openness Framework and Tool, the team did emphasize that "implementing... [and] operationalizing the MOF" was a key goal of the project -- it's a great question though, for what really is the best way to deliver this functionality (either as an app that orgs can run privately to compare internal models, or as a public central repository stewarded by the Linux Foundation at mot.isitopen.ai/)
Summary
This PR upgrades the MOT platform from Drupal 10.6 / PHP 8.3 to Drupal 11.3 / PHP 8.5, resolving all deprecations and incompatibilities identified by the Upgrade Status module.
Changes
Drupal Core Upgrade
drupal/core-recommended,drupal/core-composer-scaffold, anddrupal/core-project-messageto 11.3.13drupal/core-devto ^11.3 andphpunit/phpunitto ^11.5drupal/devel_entity_updates(uninstalled and incompatible with D11)drupal/cheeseburger_menuD11 compatibility (deprecated test base class + missing return type)Custom Code Fixes
LicenseImporter.php: Fixed latent bug —snprintf()(non-existent function) →sprintf()ModelAccessHandler.php: Fixed missing$accountparameter inAccessResult::allowedIfHasPermission()ModelForm.php: CorrectedTimeInterfacenamespace (Drupal\Component\Datetime\TimeInterface)ModelEditForm.php: Addedintreturn type and explicit return value tosave()mof.module: UseRevisionableStorageInterface::deleteRevision()(removed fromEntityStorageInterfacein D11)Component.php: Explicit property assignment in constructor (replaces dynamic assignment)ModelController.php,LicenseSearchForm.php,ModelImportForm.php,ModelSearchForm.php: Refactored to constructor injection patternTheme / Templates
pager.html.twig: Removed deprecated Twigspacelessfilter (deprecated in Twig 3.12)Configuration
core_version_requirementto^10 || ^11inmof.info.yml,mot_profile.info.yml, andmot.info.ymlCI
.github/workflows/test.ymlto use PHP 8.5Testing
composer why-not php 8.5.0returns no blocking dependenciesNotes
drush updb) is required after deployment (newaliascolumn onroutertable)recipes/README.txtfile is scaffolded automatically by Drupal 11 core