kitodo / kitodo-presentation

Kitodo.Presentation is a feature-rich framework for building a METS- or IIIF-based digital library. It is part of the Kitodo Digital Library Suite.
https://kitodo.github.io/kitodo-presentation/
GNU General Public License v3.0
39 stars 45 forks source link

[MAINTENANCE] Add support for Typo3 v12 (fixes #900) #1337

Closed thomaslow closed 1 month ago

thomaslow commented 2 months ago

Changes

The following changes have been implemented:

Todo

The following tasks still need to be done before merging:

Tests

The following tests have been done for a fresh installation of both Typo3 v11 and Typo3 v12:

General

Kitodo Plugins

Unable to test

Unfortunately, I do not have access or experience with a production system of kitodo-presentation. Because of that, I'm not sure whether some of the issues are the result of a misconfiguration of my Typo3 installation. All problems listed above also occur with the current master and my Typo3 installation. I would appreciate any help in testing my changes or tips to correctly set up Typo3 pages and Kitodo-Presentation plugins for testing.

Demo

Demonstration of kitodo-presentation updated for Typo3 v12 with demo theme (please ignore CSS problems)

https://github.com/user-attachments/assets/03de016a-9ef4-444c-a52e-28ab6d7add3c

sebastian-meyer commented 1 month ago

Hm, some parent classes method's signature for some of the classes in Classes/Validation have changed from TYPO3 v11 to v12. So the tests for v12 fail, because our classes don't explicitly declare the same parameter and return types as the TYPO3's parent classes. But if I add the type declarations, the tests for v11 fail, because now their signatures don't match with the parent classes in v11. Any idea how we could avoid that? Maybe don't use declare(strict_types=1); in those classes?

sebastian-meyer commented 1 month ago

Also pinging @markusweigelt, because he is the author of the validator feature.

thomaslow commented 1 month ago

@sebastian-meyer Thanks for trying to merge. I'll have to look at this in more detail. It may be related to Breaking Change 96998.

markusweigelt commented 1 month ago

Thank you for your implementations. I will test the 'Embedded 3D Viewer' later this week with your update.

Regarding the validation: Should we support both versions? It seems that security releases for TYPO3 11.5 are ending this month.

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-96998-ExtbaseValidatorInterfaceChanged.html#migration has some hint how to handle both versions.

sebastian-meyer commented 1 month ago

Yes, if it is possible we should support both versions. There are some users who will use the ELTS version of TYPO3 v11 before migrating to v12.

I reverted my changes in master. All validation classes are now again working for v10 and v11, but not for v12.

thomaslow commented 1 month ago

@sebastian-meyer Unit and integration tests work again with both Typo3 v11 and v12. Please let me know in case I can help some more.

sebastian-meyer commented 1 month ago

Thank you very much! I'll review this tomorrow!

thomaslow commented 1 month ago

@sebastian-meyer I'm glad my changes work for you. Please let me know in case any issues pop up that I missed. Of course, I'll occasionally check the issue list myself in the following weeks.