Skip to content

Commit

Permalink
bump 22.07.01
Browse files Browse the repository at this point in the history
- Fixed: Plugin:cleanuppost() -> Invalid index for trashbin.
- Fixed: MoCache() -> Add $entries, $headers properties to avoid warning on get_translations_for_domain.
- Updated: Symfony component -> symfony/var-exporter.
  • Loading branch information
nawawi committed Jul 15, 2022
1 parent 23082fe commit c75aedd
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 35 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
= v22.07.01 (2022-07-15) =
- Fixed: Plugin:cleanuppost() -> Invalid index for trashbin.
- Fixed: MoCache() -> Add $entries, $headers properties to avoid warning on get_translations_for_domain.
- Updated: Symfony component -> symfony/var-exporter.

= v21.08.11 (2022-05-30) =
- Fixed: Avoid calling Filesystem::close_buffer() if a process involved accessing a disk.
- Fixed: Removed handling stale cache on shutdown.
Expand Down
Binary file modified dist/docket-cache.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions docket-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* @wordpress-plugin
* Plugin Name: Docket Cache
* Plugin URI: https://docketcache.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
* Version: 21.08.11
* VerPrev: 21.08.10
* Version: 22.07.01
* VerPrev: 21.08.11
* Description: A persistent object cache stored as a plain PHP code, accelerates caching with OPcache backend.
* GitHub Plugin URI: https://github.com/nawawi/docket-cache
* Author: Nawawi Jamili
Expand Down
2 changes: 1 addition & 1 deletion includes/object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @wordpress-plugin
* Plugin Name: Docket Cache Drop-in
* Plugin URI: https://wordpress.org/plugins/docket-cache/
* Version: 21.08.11
* Version: 22.07.01
* Description: A persistent object cache stored as a plain PHP code, accelerates caching with OPcache backend.
* Author: Nawawi Jamili
* Author URI: https://docketcache.com
Expand Down
2 changes: 1 addition & 1 deletion includes/src/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

final class Crawler
{
private static $version = '21.08.11';
private static $version = '22.07.01';
public static $send_cookie = false;

private static function default_args($param = [])
Expand Down
1 change: 0 additions & 1 deletion includes/src/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ public function garbage_collector($force = false)
$fcnt = 0;
$pcnt = 0;
$slowdown = 0;
$slowdown2 = 0;

foreach ($this->pt->scanfiles($this->pt->cache_path) as $object) {
if ($this->max_execution_time > 0 && (microtime(true) - $this->wp_start_timestamp) > $this->max_execution_time) {
Expand Down
5 changes: 5 additions & 0 deletions includes/src/MoCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ final class MoCache
private $upstream = null;
private $mofile = null;

// Avoid warning on get_translations_for_domain.
// Reference: wp-includes/pomo/translations.php.
public $entries = [];
public $headers = [];

public function __construct($mofile, $domain, $override)
{
$this->mofile = apply_filters('load_textdomain_mofile', $mofile, $domain);
Expand Down
2 changes: 1 addition & 1 deletion includes/src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ public function cleanuppost()
wp_delete_post($id, true);
$doflush = true;
}
$collect['trash'] += \count($query);
$collect['trashbin'] += \count($query);
}

if ($is_multisite) {
Expand Down
5 changes: 5 additions & 0 deletions includes/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
exit(1);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit71169967e8f502f7da209e4236957996::getLoader();
14 changes: 7 additions & 7 deletions includes/vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;

Expand All @@ -39,7 +39,7 @@ class InstalledVersions

/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();

Expand Down Expand Up @@ -243,7 +243,7 @@ public static function getInstallPath($packageName)

/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
Expand All @@ -257,7 +257,7 @@ public static function getRootPackage()
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
Expand All @@ -280,7 +280,7 @@ public static function getRawData()
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
Expand All @@ -303,7 +303,7 @@ public static function getAllRawData()
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
Expand All @@ -313,7 +313,7 @@ public static function reload($data)

/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
Expand Down
2 changes: 1 addition & 1 deletion includes/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function getLoader()
spl_autoload_unregister(array('ComposerAutoloaderInit71169967e8f502f7da209e4236957996', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
\Composer\Autoload\ComposerStaticInit71169967e8f502f7da209e4236957996::getInitializer($loader)();
call_user_func(\Composer\Autoload\ComposerStaticInit71169967e8f502f7da209e4236957996::getInitializer($loader));

$loader->register(true);

Expand Down
18 changes: 9 additions & 9 deletions includes/vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
<?php return array(
'root' => array(
'name' => 'nawawi/docket-cache',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '23082fe9d10007bed258a977b1d5f0173d5729c3',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../../',
'aliases' => array(),
'reference' => 'aae4a66153c4248f80e3cfc8e93b330032109d39',
'name' => 'nawawi/docket-cache',
'dev' => true,
),
'versions' => array(
'nawawi/docket-cache' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '23082fe9d10007bed258a977b1d5f0173d5729c3',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../../',
'aliases' => array(),
'reference' => 'aae4a66153c4248f80e3cfc8e93b330032109d39',
'dev_requirement' => false,
),
'symfony/polyfill-php80' => array(
'pretty_version' => 'v1.25.0',
'version' => '1.25.0.0',
'pretty_version' => 'v1.26.0',
'version' => '1.26.0.0',
'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(),
'reference' => '4407588e0d3f1f52efb65fbe92babe41f37fe50c',
'dev_requirement' => false,
),
'symfony/var-exporter' => array(
'pretty_version' => 'v5.4.8',
'version' => '5.4.8.0',
'pretty_version' => 'v5.4.10',
'version' => '5.4.10.0',
'reference' => '8fc03ee75eeece3d9be1ef47d26d79bea1afb340',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/var-exporter',
'aliases' => array(),
'reference' => '7e132a3fcd4b57add721b4207236877b6017ec93',
'dev_requirement' => false,
),
),
Expand Down
4 changes: 2 additions & 2 deletions includes/vendor/symfony/var-exporter/Instantiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ final class Instantiator
* Bar::class => ['privateBarProperty' => $propertyValue],
* ]);
*
* Instances of ArrayObject, ArrayIterator and SplObjectHash can be created
* Instances of ArrayObject, ArrayIterator and SplObjectStorage can be created
* by using the special "\0" property name to define their internal value:
*
* // creates an SplObjectHash where $info1 is attached to $obj1, etc.
* // creates an SplObjectStorage where $info1 is attached to $obj1, etc.
* Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]);
*
* // creates an ArrayObject populated with $inputArray
Expand Down
7 changes: 1 addition & 6 deletions includes/vendor/symfony/var-exporter/Internal/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount
$arrayValue = (array) $value;
} elseif ($value instanceof \Serializable
|| $value instanceof \__PHP_Incomplete_Class
|| $value instanceof \DatePeriod
|| (\PHP_VERSION_ID >= 80200 && (
$value instanceof \DateTimeInterface
|| $value instanceof \DateTimeZone
|| $value instanceof \DateInterval
))
|| \PHP_VERSION_ID < 80200 && $value instanceof \DatePeriod
) {
++$objectsCount;
$objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0];
Expand Down
6 changes: 3 additions & 3 deletions languages/docket-cache.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# This file is distributed under the MIT.
msgid ""
msgstr ""
"Project-Id-Version: Docket Cache 21.08.11\n"
"Project-Id-Version: Docket Cache 22.07.01\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/docket-cache\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2022-05-30T13:40:11+00:00\n"
"POT-Creation-Date: 2022-07-15T11:40:35+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.5.0\n"
"X-Generator: WP-CLI 2.6.0\n"
"X-Domain: docket-cache\n"

#. Plugin Name of the plugin
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: object cache, OPcache, fastcgi, cache, database, Optimisation, performance
Requires at least: 5.4
Tested up to: 6.0
Requires PHP: 7.2.5
Stable tag: 21.08.11
Stable tag: 22.07.01
License: MIT
License URI: https://github.com/nawawi/docket-cache/blob/master/LICENSE.txt

Expand Down Expand Up @@ -171,6 +171,11 @@ Yes, you can. It can boost more your WordPress performance since there is no net
Please do manually remove wp-content/object-cache.php and wp-content/cache/docket-cache if an error occurs during updates. Thanks.

== Changelog ==
= 22.07.01 (2022-07-15) =
- Fixed: Plugin:cleanuppost() -> Invalid index for trashbin.
- Fixed: MoCache() -> Add $entries, $headers properties to avoid warning on get_translations_for_domain.
- Updated: Symfony component -> symfony/var-exporter.

= 21.08.11 =
- Fixed: Avoid calling Filesystem::close_buffer() if a process involved accessing a disk.
- Fixed: Removed handling stale cache on shutdown.
Expand Down

0 comments on commit c75aedd

Please sign in to comment.