All notable changes to this project will be documented in this file, in reverse chronological order by release.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
- #203 fixes PHP 7.4 compatibility.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
-
#192 changes curly braces in array and string offset access to square brackets in order to prevent issues under the upcoming PHP 7.4 release.
-
#195 fixes PHP 7.4 compatibility.
- Nothing.
- #180 alters the behavior of the
HeadMeta
helper to honor the value of theautoEscape
flag when rendering values. Previously, it would ignore the setting and always escape the values.
- Nothing.
- Nothing.
- Nothing.
- #179 adds
^3.0
to the zendframework/zend-json constraints, allowing v3 releases to be used with zend-view.
- Nothing.
- Nothing.
- Nothing.
- Nothing.
-
#168 adds two new methods to
Zend\View\Helper\Placeholder
(and thus any helper extending it):deleteContainer(string $name)
can be used to delete a placeholder container.clearContainers()
can be used to clear all placeholder containers.
These new features are particularly useful when in long-running server environments, such as Swoole, where you may need to clear the contents on each request.
-
#155 modifies the
Zend\View\Helper\Service\IdentifyFactory
such that it will now also look for the serviceZend\Authentication\AuthenticationServiceInterface
if the serviceZend\Authentication\AuthenticationService
is not found. This allows using a service named after the interface instead of the implementation if desired. -
#158 modifies how a
ViewModel
(and all extensions) is cloned; the$variables
property, if it is an object, is now cloned as well to ensure changes in the new instance do not affect the current one. -
#153 updates the
ConsoleModel::setErrorLevel()
method to implement a fluent interface.
- Nothing.
- #147 removes the property
$regKey
from a number of helpers; these were a remnant of ZF1, and have not been used internally since the initial 2.0.0 release.
- #164 fixes the various
Head*
view helpers such that they will now properly escape attributes as HTML attributes (instead of as HTML content).
- #173 adds support for PHP 7.3.
- Nothing.
- Nothing.
- Nothing.
-
#170 ensures that variables referenced in
compact()
operations are properly initialized, fixing an error that occures in PHP 7.3. -
#169 adds zendframework/zend-json as a required dependency, as it is referenced in multiple locations within the package.
-
#156 adds missing
@method
annotations to theHeadMeta
helper.
-
#135 adds support for PHP 7.2.
-
#138 adds support for the HTML5 "as" attribute to the
HeadLink
helper. This can be used to help prioritize resource loading. -
#139 adds two new methods to the
Zend\View\Helper\Gravatar
class:setAttributes()
andgetAttributes()
.
- #133 modifies the
behavior the
placeholder()
helper to no longer render a prefix or postfix if no items are available in the container.
- #139 deprecates the
Zend\View\Helper\Gravatar
methodssetAttribs()
andgetAttribs()
in favor of the new methodssetAttributes()
andgetAttributes()
, respectively.
- #135 removes support for HHVM.
- Nothing.
- #136 updates the
Navigation
helper class to document the various proxy methods it allows via method overloading via@method
annotations.
- Nothing.
- Nothing.
-
#123 updates the
HelperPluginManager
such that it no longer injects a translator in a helper if one is already present. -
#125 provides an update to the
PhpRenderer:render()
method such that it will now catch not onlyException
instances, but also PHP 7Throwable
instances, and properly cleanup the output buffers when it does. -
#121 provides a fix to ensure that content generated on a previous execution of
PhpRenderer::render()
is never re-used.
-
#89 updates the
HeadScript
andInlineScript
view helpers to whitelist theid
attribute as an optional attribute. -
#96 updates the
HeadScript
,HeadLink
, andInlineScript
view helpers to whitelist thecrossorigin
andintegrity
attributes as optional attributes. -
#64 adds a new
Asset
view helper. This helper uses the following configuration to map a named asset to the actual file to serve:'view_helper_config' => [ 'asset' => [ 'resource_map' => [ 'css/style.css' => 'css/style-3a97ff4ee3.css', 'js/vendor.js' => 'js/vendor-a507086eba.js', ], ], ],
This can also be automated via tools such as gulp-rev and grunt-rev by using the
rev-manifest.json
each creates directly within your configuration:'view_helper_config' => [ 'asset' => [ 'resource_map' => json_decode(file_get_contents('path/to/rev-manifest.json'), true), ], ],
The benefit of this approach is that it allows your view scripts to reference a static asset name, while integrating with your JS and CSS build tools.
- Nothing.
- #114 removes support for PHP 5.5.
- #110 provides a fix
for the navigation helpers to ensure that usage of either the
default
ornavigation
containers (documentation specifieddefault
, but usage only allowednavigation
previously). Whendefault
is specified, theZend\Navigation\Navigation
service will be used for the container; ifnavigation
is used, that service will be pulled instead (which is usually an alias for theZend\Navigation\Navigation
service anyways).
- Nothing.
- Nothing.
- Nothing.
- #92 fixes the docblocks
and exception messages in the breadcrumbs and menu navigation helpers to
remove references to 'module' keys for the
$partial
argument, as that key is no longer used. - #98 fixes how the
HeadMeta
helper renders the<meta charset>
tag, ensuring it is the first rendered. As long as theHeadMeta
helper is called early in your markup, this should ensure it is within the first 1024 characters, ensuring your document validates. - #104 fixes the
@method
annotation for thePlaceholder
view helper to use the correct case, fixing issues with method completion in IDEs. - #112 fixes an issue in
the
PhpRendererStrategy
whereby absence of a response instance in theViewEvent
would lead to a fatal error.
- Nothing.
- Nothing.
- Nothing.
-
#67 adds a script,
templatemap_generator.php
, which is available invendor/bin/templatemap_generator.php
once installed. This script replaces the original present in the zendframework/zendframework package, and simplifies it for the most common use case. Usage is:$ cd module/ModuleName/config $ ../../../vendor/bin/templatemap_generator.php ../view > template_map.config.php
You can also provide a list of files via globbing or usage of
find
after the initial directory argument; if provided that list of files will be used to generate the map. (The directory argument is then used to strip the path information when generating the template name.)
- Nothing.
- Nothing.
- Nothing.
- #1 adds a new
loop()
method to thepartialLoop()
helper, allowing the ability to chain setters with rendering:$this->partialLoop()->setObjectKey('foo')->loop('partial', $data)
- #60 adds the ability to
register and consume arbitrary callables as view helpers within the
HelperPluginManager
.
- Nothing.
- Nothing.
- Nothing.
- #22 adds support for the
async
attribute within theheadScript
helper. - #59 adds and publishes the documentation to https://zendframework.github.io/zend-view/
- Nothing.
- Nothing.
- #21 updates the
headScript
helper to allow empty attribute types to render as keys only when using an HTML5 doctype.
- Nothing.
- Nothing.
- Nothing.
- #58 updates the
url()
helper so that it can work with either the zend-mvc v2 router subcomponent or zend-router.
- #57 adds
Zend\View\Helper\TranslatorAwareTrait
, which provides implementation forZend\I18n\Translator\TranslatorAwareInterface
, and allowed removal of duplicated implementations in several helpers.
- Nothing.
- Nothing.
- #57 removes the explicit
dependency on
Zend\I18n\Translator\TranslatorAwareInterface
by allowing helpers to duck type the interface to receive a translator during instantiation; this allows such helpers to work even when zend-i18n is not installed. The following helpers were updated to duck type the interface instead of implement it explicitly:FlashMessenger
HeadTitle
- all
Navigation
helpers
- Nothing.
- Nothing.
- Nothing.
- #55 fixes a circular dependency issue in the navigation helpers with regards to event manager resolution.
- Nothing.
- Nothing.
- Nothing.
- #52 fixes several issues
detected after re-enabling tests skipped when executed against
zend-servicemanager/zend-eventmanager v3:
HelperPluginManager
now implements anEventManagerAware
initializer.Zend\View\Helper\Navigation\AbstractHelper
now contains logic to ensure that when anEventManager
instance is lazy-loaded, it composes aSharedEventManager
.- The
FlashMessenger
factory now correctly pulls theconfig
service, not theConfig
service (former is both backwards- and forwards compatible).
- Nothing.
- Nothing.
- Nothing.
- #50 fixes
the initializer defined and registered in
Navigation\PluginManager::__construct()
to ensure it properly pulls and injects the application container into navigation helpers, under both zend-servicemanager v2 and v3. Additionally, when lazy-instantiating theNavigation\PluginManager
, theNavigation
helper now passes the composed service manager instance to its constructor.
- Nothing.
- Nothing.
- Nothing.
- #47 fixes
Navigation\PluginManager
to ensure it is backwards compatible with zend-servicemanager v2, including:- fixing the constructor to be BC with v2 and forwards-compatible with v3.
- adding additional, normalized alias/factory pairs.
- #47 fixes
the behavior of
HelperPluginManager::injectTranslator()
to return early if no container is provided (fixing an issue with navigation helpers introduced in 2.6.0).
- Nothing.
- Nothing.
- Nothing.
- #44 fixes the
constructor of
HelperPluginManager
to ensure it is backwards compatible with zend-servicemanager v2.
- #8 adds a new method to
each of the
Breadcrumbs
andMenu
navigation helpers,renderPartialWithParams(array $params = [], $container = null, $partial = null)
. This method allows passing parameters to the navigation partial to render, just as you would when using thepartial()
view helper.
- Nothing.
- Nothing.
- #15,
#17,
#35, and
#42 update the component
to be forwards-compatible with the v3 releases of zend-eventmanager,
zend-servicemanager, and zend-stdlib. The changes include:
- changes to how events are triggered to ensure they continue working correctly.
- updates to the plugin manager to be forwards-compatible.
- updates to helper factories to be forwards-compatible.
- #5 adds support for the
itemprop
attribute in theheadLink()
view helper.
- Nothing.
- Nothing.
- #25 updates
PhpRenderer::render()
to no longer lazy-instantiate aFilterChain
; content filtering is now only done if aFitlerChain
is already injected in the renderer.
- Nothing.
- Nothing.
- Nothing.
- #4 fixes an issue with
how the
ServerUrl
detects and emits the port when port-forwarding is in effect.
- Nothing.
- Nothing.
- Nothing.
- #4 fixes an issue with
how the
ServerUrl
detects and emits the port when port-forwarding is in effect.