Add OJS/OMP/OPS 3.5 compatibility#1
Open
edersotto wants to merge 1 commit into
Open
Conversation
The `PKP\session\SessionManager` class was removed in 3.5, where session handling moved to a Laravel-based guard. Replace the removed `SessionManager::isDisabled()` call with `PKP\core\PKPSessionGuard::isSessionDisable()`. Everything else the plugin relies on (Locale::getFormattedDisplayNames, LocaleMetadata::LANGUAGE_LOCALE_ONLY, PKPRequest::isPost, BlockPlugin, templates/block.tpl) is unchanged in 3.5. Bump release to 3.5.0.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Lepidus team — thanks for this handy plugin! 🙌
While installing it on an OJS 3.5.0.5 journal we hit a fatal error, because the plugin relies on
PKP\session\SessionManager, which was removed in 3.5 when session handling moved to a Laravel-based guard.This is the smallest possible change to make the plugin run on 3.5:
use PKP\session\SessionManager;→use PKP\core\PKPSessionGuard;SessionManager::isDisabled()→PKPSessionGuard::isSessionDisable()version.xmlrelease to3.5.0.0Everything else the plugin uses is unchanged in 3.5 — I checked each dependency against
pkp/pkp-lib@stable-3_5_0:Locale::getFormattedDisplayNames()LocaleMetadata::LANGUAGE_LOCALE_ONLY3)PKPRequest::isPost()BlockPlugin::getContents()templates/block.tpl({translate},{url},{foreach})Testing: deployed on a live OJS 3.5.0.5 journal — the plugin installs, enables and renders the language block correctly;
php -lpasses.A small note on your branch/versioning convention: since
maincurrently targets 3.4, you may prefer to snapshot the current state into astable-3_4branch before advancingmainto 3.5 — happy to adjust the PR (or drop theversion.xmlbump) to fit whatever workflow you'd like. 🙂Thanks again!