Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wfMemcKey() is deprecated and removed #63

Open
WouterRademaker opened this issue Aug 4, 2021 · 2 comments
Open

wfMemcKey() is deprecated and removed #63

WouterRademaker opened this issue Aug 4, 2021 · 2 comments
Labels

Comments

@WouterRademaker
Copy link
Contributor

WouterRademaker commented Aug 4, 2021

Setup and configuration

  • MediaWiki | 1.36.1
  • PHP | 7.4.3 (fpm-fcgi)
  • MariaDB | 10.3.29-MariaDB-0ubuntu0.20.04.1
  • Semantic MediaWiki | 3.2.3
  • Semantic Glossary | 4.0.0
  • Lingo | 3.1.1

Issue

[3eedf2b9e79ae73ca136e949] [no req]   Error: Call to undefined function SG\Cache\wfMemcKey()

Backtrace:

from extensions/SemanticGlossary/src/Cache/GlossaryCache.php(56)
#0 extensions/SemanticGlossary/src/Cache/CacheInvalidator.php(173): SG\Cache\GlossaryCache->getKeyForSubject()
#1 extensions/SemanticGlossary/src/Cache/CacheInvalidator.php(90): SG\Cache\CacheInvalidator->purgeCache()
#2 extensions/SemanticGlossary/src/Cache/CacheInvalidator.php(139): SG\Cache\CacheInvalidator->invalidateCacheOnStoreUpdate()
#3 extensions/SemanticGlossary/src/Cache/CacheInvalidator.php(87): SG\Cache\CacheInvalidator->matchAllSubobjects()
#4 extensions/SemanticGlossary/src/HookRegistry.php(78): SG\Cache\CacheInvalidator->invalidateCacheOnStoreUpdate()
#5 includes/HookContainer/HookContainer.php(338): SG\HookRegistry->SG\{closure}()
#6 includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#7 includes/Hooks.php(137): MediaWiki\HookContainer\HookContainer->run()
#8 extensions/SemanticMediaWiki/src/Store.php(230): Hooks::run()
#9 extensions/SemanticMediaWiki/src/DataUpdater.php(415): SMW\Store->updateData()
#10 extensions/SemanticMediaWiki/src/DataUpdater.php(294): SMW\DataUpdater->updateData()
#11 extensions/SemanticMediaWiki/src/DataUpdater.php(198): SMW\DataUpdater->runUpdate()
#12 extensions/SemanticMediaWiki/src/ParserData.php(454): SMW\DataUpdater->doUpdate()
#13 extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(303): SMW\ParserData->updateStore()
#14 extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(216): SMW\MediaWiki\Jobs\UpdateJob->updateStore()
#15 extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
#16 extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
#17 extensions/SemanticMediaWiki/src/SQLStore/Rebuilder/Rebuilder.php(239): SMW\MediaWiki\Jobs\UpdateJob->run()
#18 extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(466): SMW\SQLStore\Rebuilder\Rebuilder->rebuild()
#19 extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(383): SMW\Maintenance\DataRebuilder->doUpdateById()
#20 extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(222): SMW\Maintenance\DataRebuilder->rebuildAll()
#21 extensions/SemanticMediaWiki/maintenance/rebuildData.php(198): SMW\Maintenance\DataRebuilder->rebuild()
#22 maintenance/doMaintenance.php(112): SMW\Maintenance\rebuildData->execute()
#23 extensions/SemanticMediaWiki/maintenance/rebuildData.php(294): require_once(string)
#24 {main}
@WouterRademaker
Copy link
Contributor Author

@WouterRademaker
Copy link
Contributor Author

changing:

return wfMemcKey( 'ext', 'semanticglossary', $subject->getSerialization() );

to this:

$cache = self::getCache();
return  $cache->makeKey( 'ext', 'semanticglossary', $subject->getSerialization() );

in SemanticGlossary/src/Cache/GlossaryCache.php seems to work.
Same in the next function.

WouterRademaker added a commit to WouterRademaker/SemanticGlossary that referenced this issue Jan 20, 2022
change
             return wfMemcKey(.........);
to
                $cache = self::getCache();
                return  $cache->makeKey( ......... );
in SemanticGlossary/src/Cache/GlossaryCache.php
WouterRademaker added a commit to WouterRademaker/SemanticGlossary that referenced this issue Jan 21, 2022
Avoid introducing a local variable
JeroenDeDauw added a commit that referenced this issue Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants