From d5558e935b3e96fc8c09368f077e3be040b56898 Mon Sep 17 00:00:00 2001 From: DrewAPicture Date: Thu, 7 Jun 2018 09:49:59 -0600 Subject: [PATCH 1/2] Update composer.lock. --- composer.lock | 90 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 28 deletions(-) diff --git a/composer.lock b/composer.lock index 8cb5c5e..9b80220 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "7f8182189ed845514079dae0bb6fbc34", + "hash": "9df3212f8845d8c2e01a6b58618c6944", "content-hash": "50b4965030469f5686192ba48645cb3e", "packages": [ { "name": "composer/installers", - "version": "v1.1.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "a3595c5272a6f247228abb20076ed27321e4aae9" + "reference": "049797d727261bf27f2690430d935067710049c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/a3595c5272a6f247228abb20076ed27321e4aae9", - "reference": "a3595c5272a6f247228abb20076ed27321e4aae9", + "url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2", + "reference": "049797d727261bf27f2690430d935067710049c2", "shasum": "" }, "require": { @@ -30,7 +30,7 @@ }, "require-dev": { "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" + "phpunit/phpunit": "^4.8.36" }, "type": "composer-plugin", "extra": { @@ -60,11 +60,17 @@ "keywords": [ "Craft", "Dolibarr", + "Eliasis", "Hurad", "ImageCMS", + "Kanboard", + "Lan Management System", "MODX Evo", "Mautic", + "Maya", "OXID", + "Plentymarkets", + "Porto", "RadPHP", "SMF", "Thelia", @@ -72,57 +78,76 @@ "agl", "aimeos", "annotatecms", + "attogram", "bitrix", "cakephp", "chef", + "cockpit", "codeigniter", "concrete5", "croogo", "dokuwiki", "drupal", + "eZ Platform", "elgg", "expressionengine", "fuelphp", "grav", "installer", + "itop", "joomla", "kohana", "laravel", + "lavalite", "lithium", "magento", + "majima", "mako", "mediawiki", "modulework", + "modx", "moodle", + "osclass", "phpbb", "piwik", "ppi", "puppet", + "pxcms", + "reindex", "roundcube", "shopware", "silverstripe", + "sydes", "symfony", "typo3", "wordpress", + "yawik", "zend", "zikula" ], - "time": "2016-07-05 06:18:20" + "time": "2017-12-29 09:13:20" }, { "name": "erusev/parsedown", - "version": "1.6.0", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" + "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", "shasum": "" }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, "type": "library", "autoload": { "psr-0": { @@ -146,7 +171,7 @@ "markdown", "parser" ], - "time": "2015-10-04 16:44:32" + "time": "2018-03-08 01:11:30" }, { "name": "nikic/php-parser", @@ -249,16 +274,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", "shasum": "" }, "require": { @@ -294,26 +319,34 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2016-01-25 08:17:30" }, { "name": "psr/log", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -327,12 +360,13 @@ } ], "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], - "time": "2012-12-21 11:40:51" + "time": "2016-10-10 12:19:37" }, { "name": "scribu/lib-posts-to-posts", @@ -340,12 +374,12 @@ "source": { "type": "git", "url": "https://github.com/scribu/wp-lib-posts-to-posts.git", - "reference": "baefe121458b5d4d333b29e0c0b8cb8fad0fa4a2" + "reference": "a695438e455587fa228e993d05b4431cde99af1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scribu/wp-lib-posts-to-posts/zipball/baefe121458b5d4d333b29e0c0b8cb8fad0fa4a2", - "reference": "baefe121458b5d4d333b29e0c0b8cb8fad0fa4a2", + "url": "https://api.github.com/repos/scribu/wp-lib-posts-to-posts/zipball/a695438e455587fa228e993d05b4431cde99af1b", + "reference": "a695438e455587fa228e993d05b4431cde99af1b", "shasum": "" }, "require": { @@ -363,7 +397,7 @@ ], "description": "A library for many-to-many relationships in WordPress", "homepage": "https://github.com/scribu/wp-lib-posts-to-posts", - "time": "2015-08-19 09:04:19" + "time": "2016-02-15 12:08:59" }, { "name": "scribu/scb-framework", From 2499459a712fccf9a3751ce5758eaa09b5156b52 Mon Sep 17 00:00:00 2001 From: DrewAPicture Date: Thu, 7 Jun 2018 09:54:59 -0600 Subject: [PATCH 2/2] Default any $skip_sleep parameters to true. --- lib/class-command.php | 2 +- lib/class-importer.php | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/class-command.php b/lib/class-command.php index 4fdad91..995a986 100644 --- a/lib/class-command.php +++ b/lib/class-command.php @@ -126,7 +126,7 @@ protected function _get_phpdoc_data( $path, $format = 'json' ) { * @param bool $skip_sleep If true, the sleep() calls are skipped. * @param bool $import_ignored If true, functions marked `@ignore` will be imported. */ - protected function _do_import( array $data, $skip_sleep = false, $import_ignored = false ) { + protected function _do_import( array $data, $skip_sleep = true, $import_ignored = false ) { if ( ! wp_get_current_user()->exists() ) { WP_CLI::error( 'Please specify a valid user: --user=' ); diff --git a/lib/class-importer.php b/lib/class-importer.php index b37f8cd..97946dc 100644 --- a/lib/class-importer.php +++ b/lib/class-importer.php @@ -118,10 +118,10 @@ public function __construct( array $args = array() ) { * Import the PHPDoc $data into WordPress posts and taxonomies * * @param array $data - * @param bool $skip_sleep Optional; defaults to false. If true, the sleep() calls are skipped. + * @param bool $skip_sleep Optional. Whether to skip the sleep() calls. Default true. * @param bool $import_ignored_functions Optional; defaults to false. If true, functions marked `@ignore` will be imported. */ - public function import( array $data, $skip_sleep = false, $import_ignored_functions = false ) { + public function import( array $data, $skip_sleep = true, $import_ignored_functions = false ) { global $wpdb; $time_start = microtime(true); @@ -253,10 +253,10 @@ protected function insert_term( $term, $taxonomy, $args = array() ) { * For a specific file, go through and import the file, functions, and classes. * * @param array $file - * @param bool $skip_sleep Optional; defaults to false. If true, the sleep() calls are skipped. + * @param bool $skip_sleep Optional. Whether to skip the sleep() calls. Default true. * @param bool $import_ignored Optional; defaults to false. If true, functions and classes marked `@ignore` will be imported. */ - public function import_file( array $file, $skip_sleep = false, $import_ignored = false ) { + public function import_file( array $file, $skip_sleep = true, $import_ignored = false ) { /** * Filter whether to proceed with importing a prospective file. @@ -266,8 +266,9 @@ public function import_file( array $file, $skip_sleep = false, $import_ignored = * @param bool $display Whether to proceed with importing the file. Default true. * @param array $file File data */ - if ( ! apply_filters( 'wp_parser_pre_import_file', true, $file ) ) + if ( ! apply_filters( 'wp_parser_pre_import_file', true, $file ) ) { return; + } // Maybe add this file to the file taxonomy $slug = sanitize_title( str_replace( '/', '_', $file['path'] ) );