Skip to content

Commit

Permalink
Merge pull request #17 from yiimaker/2.3
Browse files Browse the repository at this point in the history
Release 2.3.0
  • Loading branch information
greeflas authored Sep 20, 2018
2 parents 3f1efda + fa9acf4 commit 203c872
Show file tree
Hide file tree
Showing 43 changed files with 1,776 additions and 640 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/.scrutinizer.yml export-ignore
/.php_cs export-ignore
/codeception.yml export-ignore
/tests export-ignore
/docs export-ignore
Expand Down
27 changes: 15 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Codeception is not needed
codecept.phar

# Composer itself is not needed
composer.phar
# Windows thumbnail cache
Thumbs.db

# Composer vendor dir
/vendor
# Mac DS_Store Files
.DS_Store

# PHPStorm project files
.idea
.idea/

# Netbeans project files
nbproject
Expand All @@ -18,8 +15,14 @@ nbproject
.project
.settings

# Windows thumbnail cache
Thumbs.db
# Codeception is not needed
codecept.phar

# Mac DS_Store Files
.DS_Store
# Composer itself is not needed
composer.phar

# Composer vendor dir
/vendor/

# PHP CS Fixer cache
php_cs.cache
105 changes: 105 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?php

$header = <<<HEADER
@link https://github.com/yiimaker/yii2-social-share
@copyright Copyright (c) 2017-2018 Yii Maker
@license BSD 3-Clause License
HEADER;

$finder = \PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'docs',
'src/assets/src',
'tests/_config',
'tests/_output',
'tests/_support/_generated',
])
->notPath('tests/_support/UnitTester.php')
->notPath('tests/_bootstrap.php')
;

return \PhpCsFixer\Config::create()
->setCacheFile(__DIR__ . '/php_cs.cache')
->setRules([
'@PSR2' => true,
'array_syntax' => [
'syntax' => 'short',
],
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => [
'statements' => [
'for',
'foreach',
'if',
'return',
'switch',
'while',
],
],
'cast_spaces' => [
'space' => 'single',
],
'compact_nullable_typehint' => true,
'concat_space' => [
'spacing' => 'one',
],
'final_internal_class' => true,
'function_to_constant' => true,
'function_typehint_space' => true,
'header_comment' => [
'header' => $header,
'commentType' => 'PHPDoc',
'separate' => 'bottom',
],
'is_null' => true,
'logical_operators' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'native_constant_invocation' => true,
'native_function_invocation' => true,
'no_alias_functions' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_null_property_initialization' => true,
'no_php4_constructor' => true,
'no_short_bool_cast' => true,
'no_superfluous_elseif' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_final_method' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'object_operator_without_whitespace' => true,
'php_unit_construct' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_no_package' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => false,
'phpdoc_return_self_reference' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => false,
'phpdoc_to_comment' => true,
'phpdoc_types' => true,
'phpdoc_types_order' => true,
'phpdoc_var_without_name' => true,
'pow_to_exponentiation' => true,
'psr4' => true,
'return_type_declaration' => true,
'short_scalar_cast' => true,
'single_quote' => true,
'single_blank_line_before_namespace' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'yoda_style' => true,
'new_with_braces' => true,
])
->setFinder($finder)
;
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Social Share Change Log
=======================

2.3.0 September 20, 2018
------------------------
* Enh #16: Adds `enableIcons` and `enableDefaultAsset` option to the default configurator instead of `enableDefaultIcons` (greeflas, dimmitri)
* Enh: Improves architecture of configurator, adds more abstraction to reduce dependency to the default implementation in widget (greeflas)
* Chg: Deprecate `enableDefaultIcons` option of the default configurator (greeflas)

2.2.0 April 22, 2018
--------------------
* Enh #13: Created driver for Trello (greeflas)
Expand Down
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ You must follow the next rules to contribute to this project:

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Only English** - Please use English language in pull requests.

Tests
-----

Expand All @@ -24,7 +26,22 @@ $ composer test
or using following command

```
$ codecept build && codecept run
$ ./vendor/bin/codecept build && ./vendor/bin/codecept run
```

Code style
----------

To fix the code style just run the following command

```
$ composer cs-fix
```

or

```
$ ./vendor/bin/php-cs-fixer fix --allow-risky=yes
```

Happy coding :)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $ composer require yiimaker/yii2-social-share
or add

```
"yiimaker/yii2-social-share": "~2.2"
"yiimaker/yii2-social-share": "~2.3"
```

to the `require` section of your `composer.json`.
Expand Down Expand Up @@ -88,7 +88,7 @@ $ composer test
or using following command

```
$ codecept build && codecept run
$ ./vendor/bin/codecept build && ./vendor/bin/codecept run
```

Contributing
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"yiisoft/yii2": "^2.0.13"
},
"require-dev": {
"codeception/codeception": "~2.3"
"codeception/codeception": "~2.3",
"friendsofphp/php-cs-fixer": "^2.13"
},
"autoload": {
"psr-4": {
Expand All @@ -40,13 +41,14 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.2.x-dev"
"dev-master": "2.3.x-dev"
}
},
"scripts": {
"test": [
"codecept build",
"codecept run"
]
],
"cs-fix": "php-cs-fixer fix --allow-risky=yes"
}
}
Loading

0 comments on commit 203c872

Please sign in to comment.