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

GLOB_BRACE fails on Win 7 using Xampp stack #219

Merged
merged 1 commit into from
Dec 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions doc/book/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ repository, and also provides a mechanism for slip-streaming in
configuration based on our environment (you might use different settings in
development than in production, after all!).

First, install zend-config:
First, install zend-config and zend-stdlib:

```bash
$ composer require zendframework/zend-config
$ composer require zendframework/zend-config zendframework/zend-stdlib
```

Now we can start creating our configuration files and container factories.
Expand All @@ -269,10 +269,13 @@ In `config/config.php`, place the following:
```php
<?php
use Zend\Config\Factory as ConfigFactory;
use Zend\Stdlib\Glob;

return ConfigFactory::fromFiles(
glob('config/autoload/{global,local}.php', GLOB_BRACE)
);
$files = Glob::glob('config/autoload/{{,*.}global,{,*.}local}.php', Glob::GLOB_BRACE);
if (0 === count($files)) {
return [];
}
return ConfigFactory::fromFiles($files);
```

In `config/autoload/global.php`, place the following:
Expand All @@ -299,9 +302,10 @@ In `config/dependencies.php`, place the following:
```php
<?php
use Zend\Config\Factory as ConfigFactory;
use Zend\Stdlib\Glob;

return ConfigFactory::fromFiles(
glob('config/autoload/dependencies.{global,local}.php', GLOB_BRACE)
Glob::glob('config/autoload/dependencies.{global,local}.php', Glob::GLOB_BRACE)
);
```

Expand Down