Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit e999a59

Browse files
committed
Merge branch 'hotfix/285'
Close #285
2 parents a1dfa80 + ac7e891 commit e999a59

File tree

2 files changed

+6
-23
lines changed

2 files changed

+6
-23
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Initial stable release.
2727
references to the `PlatesRenderer` in the error handling documentation.
2828
- [#284](https://github.com/zendframework/zend-expressive/pull/284) fixes
2929
the reference to maximebf/php-debugbar in the debug bar documentation.
30+
- [#285](https://github.com/zendframework/zend-expressive/pull/285) updates
31+
the section on mtymek/blast-base-url in the "Using a Base Path" cookbook
32+
recipe to conform to its latest release.
3033

3134
## 1.0.0rc7 - 2016-01-21
3235

doc/book/cookbook/using-a-base-path.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ configuration.
9090
To install it:
9191

9292
```bash
93-
$ composer require "mtymek/blast-base-url:dev-master@dev"
93+
$ composer require mtymek/blast-base-url
9494
```
9595

9696
To configure it, update the file `config/autoload/middleware-pipeline.global.php`,
@@ -127,9 +127,8 @@ the request URI and the operating system path to the application.
127127

128128
The primary advantage of `mtymek/blast-base-url` is in its additional features:
129129

130-
- it provides an override of `Zend\Expressive\Helper\UrlHelper` that is aware of
131-
the base path, allowing you to create route-based URLs relative to the base
132-
path.
130+
- it injects `Zend\Expressive\Helper\UrlHelper` with the base path, allowing you
131+
to create relative route-based URLs.
133132
- it provides a new helper, `Blast\BaseUrl\BasePathHelper`, which allows you to
134133
create URLs relative to the base path; this is particularly useful for assets.
135134

@@ -143,29 +142,10 @@ return [
143142
Blast\BaseUrl\BasePathHelper::class => Blast\BaseUrl\BasePathHelper::class,
144143
/* ... */
145144
],
146-
'factories' => [
147-
Blast\BaseUrl\UrlHelper::class => Blast\BaseUrl\UrlHelperFactory::class,
148-
/* ... */
149-
],
150-
'aliases' => [
151-
// alias default UrlHelper with Blast\BaseUrl alternative
152-
Helper\UrlHelper::class => Blast\BaseUrl\UrlHelper::class,
153-
/* ... */
154-
],
155145
],
156146
];
157147
```
158148

159-
Additionally, remove the following from the same file:
160-
161-
```php
162-
'factories' => [
163-
// Remove the following line only:
164-
Helper\UrlHelper::class => Helper\UrlHelperFactory::class,
165-
/* ... */
166-
],
167-
```
168-
169149
Finally, if you're using zend-view, you can register a new "basePath" helper in
170150
your `config/autoload/templates.global.php`:
171151

0 commit comments

Comments
 (0)