Skip to content

Commit

Permalink
Imports may not be named like local classes. fixes #4200
Browse files Browse the repository at this point in the history
For compatibility reasons we let our old `cache` class inherit from
`dokuwiki\Cache\Cache` but `cache` equals `Cache`. At least on some PHP
versions? I did not see any problem on my local machine running PHP 8.2
but the problem was visible on a machine running 8.1.27
  • Loading branch information
splitbrain committed Feb 10, 2024
1 parent 2c978ae commit 7a9c51a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/cache.php
@@ -1,6 +1,6 @@
<?php
// phpcs:ignoreFile
use dokuwiki\Cache\Cache;
use dokuwiki\Cache\Cache as NewCache;
use dokuwiki\Cache\CacheParser;
use dokuwiki\Cache\CacheInstructions;
use dokuwiki\Cache\CacheRenderer;
Expand All @@ -9,11 +9,11 @@
/**
* @deprecated since 2019-02-02 use \dokuwiki\Cache\Cache instead!
*/
class cache extends Cache
class cache extends NewCache
{
public function __construct($key, $ext)
{
DebugHelper::dbgDeprecatedFunction(Cache::class);
DebugHelper::dbgDeprecatedFunction(NewCache::class);
parent::__construct($key, $ext);
}
}
Expand Down

0 comments on commit 7a9c51a

Please sign in to comment.