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

Commit

Permalink
Merge branch 'hotfix/19'
Browse files Browse the repository at this point in the history
Close #19
  • Loading branch information
weierophinney committed Aug 13, 2016
2 parents 6c84f55 + d6a18a1 commit 5123186
Show file tree
Hide file tree
Showing 14 changed files with 321 additions and 78 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 1.2.1 - TBD
## 1.2.1 - 2016-08-13

### Added

- Nothing.
- [#19](https://github.com/zfcampus/zf-configuration/pull/19) adds the ability
to enable usage of `::class` notation in generated configuration via a
configuration setting, `zf-configuration.class_name_scalars`.

### Deprecated

Expand All @@ -18,7 +20,8 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#19](https://github.com/zfcampus/zf-configuration/pull/19) fixes a syntax
error in the `ConfigResourceFactory`.

## 1.2.0 - 2016-07-13

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The top-level configuration key for user configuration of this module is `zf-con
'zf-configuration' => [
'config_file' => 'config/autoload/development.php',
'enable_short_array' => false,
'class_name_scalars' => false,
],
```

Expand All @@ -71,6 +72,12 @@ The top-level configuration key for user configuration of this module is `zf-con
Set this value to a boolean `true` if you want to use PHP 5.4's square bracket (aka "short") array
syntax.

#### Key: `class_name_scalars`

- Since 1.2.1

Set this value to a boolean `true` if you want to use PHP 5.5's class name scalars (`::class` notation).

ZF2 Events
----------

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
"zendframework/zend-stdlib": "^2.7.7 || ^3.0.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8 || ^5.0",
"squizlabs/php_codesniffer": "^2.3.1"
"phpunit/phpunit": "^4.8 || ^5.5",
"squizlabs/php_codesniffer": "^2.6.2",
"container-interop/container-interop": "^1.1"
},
"autoload": {
"psr-4": {
Expand Down
94 changes: 61 additions & 33 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@
return [
'zf-configuration' => [
'config_file' => 'config/autoload/development.php',
/* set the following flag if you wish to use short array syntax
* in configuration files manipulated by the ConfigWriter:
*
* 'enable_short_array' => true,
*/
// set the following flag if you wish to use short array syntax
// in configuration files manipulated by the ConfigWriter:
// 'enable_short_array' => true,

// class_name_scalars defines whether configuration files
// manipulated by the ConfigWriter should use ::class notation
// 'class_name_scalars' => true,
],
'service_manager' => [
'factories' => [
ConfigResource::class => Factory\ConfigResourceFactory::class,
ConfigResourceFactory::class => Factory\ResourceFactoryFactory::class,
ConfigWriter::class => Factory\ConfigWriterFactory::class,
ModuleUtils::class => Factory\ModuleUtilsFactory::class,
]
],
],
];
6 changes: 6 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
<!-- inherit rules from: -->
<rule ref="PSR2"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Formatting.SpaceAfterNot"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="false"/>
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0"?>
<phpunit bootstrap="./vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="ZFConfiguration Module Tests">
Expand Down
Loading

0 comments on commit 5123186

Please sign in to comment.