From bcc5fb06a975d71aeaa575bc7bb8a03defc90cf9 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Thu, 11 Aug 2016 17:17:02 +0200 Subject: [PATCH] Fix broken `TemplateShortcode::render_view()` method. --- CHANGELOG.md | 5 ++ composer.lock | 124 +++++++++++-------------------------- src/TemplatedShortcode.php | 9 ++- 3 files changed, 47 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aeec3ba..177f9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.2.19] - 2016-08-11 +### Fix +- Fix broken `TemplateShortcode::render_view()` method. + ## [0.2.18] - 2016-06-20 ### Changed - Removed dependency on `beberlei/assert` package. @@ -120,6 +124,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Initial release to GitHub. +[0.2.19]: https://github.com/brightnucleus/shortcodes/compare/v0.2.18...v0.2.19 [0.2.18]: https://github.com/brightnucleus/shortcodes/compare/v0.2.17...v0.2.18 [0.2.17]: https://github.com/brightnucleus/shortcodes/compare/v0.2.16...v0.2.17 [0.2.16]: https://github.com/brightnucleus/shortcodes/compare/v0.2.15...v0.2.16 diff --git a/composer.lock b/composer.lock index 8656cde..871b325 100644 --- a/composer.lock +++ b/composer.lock @@ -7,71 +7,18 @@ "hash": "d3342946f5487fe68c1729e13d37f11c", "content-hash": "b65e6ffd3b88a76c2103272e8cfb9774", "packages": [ - { - "name": "beberlei/assert", - "version": "v2.5.1", - "source": { - "type": "git", - "url": "https://github.com/beberlei/assert.git", - "reference": "8a9ad22f1220e47a6d174843e8abef08f5eac441" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/8a9ad22f1220e47a6d174843e8abef08f5eac441", - "reference": "8a9ad22f1220e47a6d174843e8abef08f5eac441", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "@stable" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Assert": "lib/" - }, - "files": [ - "lib/Assert/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - } - ], - "description": "Thin assertion library for input validation in business models.", - "keywords": [ - "assert", - "assertion", - "validation" - ], - "time": "2016-06-20 12:01:28" - }, { "name": "brightnucleus/config", - "version": "v0.4.2", + "version": "v0.4.7", "source": { "type": "git", "url": "https://github.com/brightnucleus/config.git", - "reference": "94c8c01a64d8b6aadf8ed86347f7fc5bc2546426" + "reference": "c15e27d302e4025e454252858462a1ba2a6ed5f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brightnucleus/config/zipball/94c8c01a64d8b6aadf8ed86347f7fc5bc2546426", - "reference": "94c8c01a64d8b6aadf8ed86347f7fc5bc2546426", + "url": "https://api.github.com/repos/brightnucleus/config/zipball/c15e27d302e4025e454252858462a1ba2a6ed5f6", + "reference": "c15e27d302e4025e454252858462a1ba2a6ed5f6", "shasum": "" }, "require": { @@ -79,6 +26,7 @@ "symfony/options-resolver": ">=2.8" }, "require-dev": { + "mikey179/vfsstream": "^1.6", "php-composter/php-composter-phpcs-psr2": "^0.2.0", "phpunit/phpunit": "~4" }, @@ -99,7 +47,7 @@ } ], "description": "Minimal, reusable Config component.", - "time": "2016-06-09 11:45:13" + "time": "2016-07-22 13:10:05" }, { "name": "brightnucleus/contracts", @@ -139,20 +87,19 @@ }, { "name": "brightnucleus/dependencies", - "version": "v0.2.6", + "version": "v0.2.7", "source": { "type": "git", "url": "https://github.com/brightnucleus/dependencies.git", - "reference": "63e2b8efcac8dafa2831845f640ef71f9372c77d" + "reference": "d9e6c6c4e2eec5261ebe15e44f6b3e1988554c00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brightnucleus/dependencies/zipball/63e2b8efcac8dafa2831845f640ef71f9372c77d", - "reference": "63e2b8efcac8dafa2831845f640ef71f9372c77d", + "url": "https://api.github.com/repos/brightnucleus/dependencies/zipball/d9e6c6c4e2eec5261ebe15e44f6b3e1988554c00", + "reference": "d9e6c6c4e2eec5261ebe15e44f6b3e1988554c00", "shasum": "" }, "require": { - "beberlei/assert": ">=2.5", "brightnucleus/config": ">=0.2", "brightnucleus/contracts": ">=0.1", "brightnucleus/exceptions": ">=0.2", @@ -180,7 +127,7 @@ } ], "description": "Config-driven WordPress dependencies.", - "time": "2016-04-05 07:48:43" + "time": "2016-06-30 11:11:56" }, { "name": "brightnucleus/exceptions", @@ -304,7 +251,7 @@ }, { "name": "symfony/options-resolver", - "version": "v3.1.1", + "version": "v3.1.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", @@ -865,16 +812,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.26", + "version": "4.8.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74" + "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc1d8cd5b5de11625979125c5639347896ac2c74", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90", + "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90", "shasum": "" }, "require": { @@ -933,7 +880,7 @@ "testing", "xunit" ], - "time": "2016-05-17 03:09:28" + "time": "2016-07-21 06:48:14" }, { "name": "phpunit/phpunit-mock-objects", @@ -1365,16 +1312,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d" + "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4edb770cb853def6e60c93abb088ad5ac2010c83", + "reference": "4edb770cb853def6e60c93abb088ad5ac2010c83", "shasum": "" }, "require": { @@ -1439,20 +1386,20 @@ "phpcs", "standards" ], - "time": "2016-05-30 22:24:32" + "time": "2016-07-13 23:29:13" }, { "name": "symfony/yaml", - "version": "v3.1.1", + "version": "v3.1.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623" + "reference": "1819adf2066880c7967df7180f4f662b6f0567ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "url": "https://api.github.com/repos/symfony/yaml/zipball/1819adf2066880c7967df7180f4f662b6f0567ac", + "reference": "1819adf2066880c7967df7180f4f662b6f0567ac", "shasum": "" }, "require": { @@ -1488,32 +1435,33 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-06-14 11:18:07" + "time": "2016-07-17 14:02:08" }, { "name": "webmozart/assert", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3|^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -1537,7 +1485,7 @@ "check", "validate" ], - "time": "2015-08-24 13:29:44" + "time": "2016-08-09 15:02:57" }, { "name": "wp-coding-standards/wpcs", diff --git a/src/TemplatedShortcode.php b/src/TemplatedShortcode.php index 957ffc7..654baa3 100644 --- a/src/TemplatedShortcode.php +++ b/src/TemplatedShortcode.php @@ -169,11 +169,14 @@ protected function get_default_view_directory() { * * @since 0.2.6 * - * @param string $view The view to render. - * @param mixed $context The context to pass through to the view. + * @param string $view The view to render. + * @param mixed $context The context to pass through to the view. + * @param array $atts The shortcode attribute values to pass + * through to the view. + * @param string|null $content Optional. The inner content of the shortcode. * @return string HTML rendering of the view. */ - protected function render_view( $view, $context ) { + protected function render_view( $view, $context, $atts, $content = null ) { if ( empty( $view ) ) { return ''; }