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

New configuration option: class_name_scalars #19

Merged
merged 9 commits into from
Aug 13, 2016
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add this in your own global .gitignore rules, not in the project rules.

Copy link
Member Author

@michalbundyra michalbundyra Aug 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In many projects we have it so I thought it's ok

vendor/
phpunit.xml
5 changes: 5 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,10 @@ 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`

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a bullet point:

- Since 1.2.1


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",
"zendframework/zend-servicemanager": "^2.7.6 || ^3.1.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this added? I'm not seeing it used in any of the new code. If anything, I'd expect to see container-interop as a dev dependency...

},
"autoload": {
"psr-4": {
Expand Down
149 changes: 116 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