This repository was archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
Multiple assertions develop #379
Merged
Merged
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
d1e0751
update dependencies
basz 26d7d46
update test to work with phpunit 6
basz 5ffbad2
patch test case without tests
basz f432acc
php7 return types
basz 1e8a77f
copy zfr-rbac into repository
basz f9841b0
adding docheader to pipline
basz b2dd14f
switch notifications
basz 868083b
adding return type to ZfcRbac/Rbac which results in removal of Except…
basz 8b9d261
fix travis doccheck
basz 40b3082
review feedback
basz bb74310
PermissionInterface is gone
basz 918b1d6
adds a test
basz 4902b38
remove php56 from travis matrix
basz ef3bb59
switch cs tooling updated travis conf
basz a27a554
apply code styling
basz 881f839
ZfcRbac\Rbac\Role to ZfcRbac\Role
basz b4287d1
support only sm3 plugin managers
basz dfe3c85
v3 factories
basz 43e1c95
tests for sm3 plugin managers
basz 4f61a49
typo and env addition
basz 5019c5e
remove :void (for now)
basz f8583c6
Revert "remove :void (for now)"
basz 1b09787
require php71
basz 6061d60
update travis to reflect requirement change
basz aa27bf2
remove as for v2 service manager
basz b456f17
not needed
basz 069c058
remove aliases
basz ac95f43
add consistent final declaration
basz 15b86cb
fix test: final classes can't be mocked
basz bd0f4c2
avoid confusion
basz 925aa8c
incorrect reference
basz 2c4ee74
aids IDE
basz 36c0407
not needed as argument is type hinted
basz 73c65dd
yield from ...
basz 8aec2f5
phpstan level7
basz f0e1564
think notation was incorrect, this is more expressive (not sure)
basz 607b1b6
hinting
basz e83c9ba
fixes tests
basz 00295b7
move declare
basz 544b8da
switch to psr-container
basz 1b97382
whoops
basz 0a67f02
fix minimum dependen
basz 126e9e8
bring back stdlib
basz fe378ff
remove hhvm
basz 242101d
by popular demand no more spaces
basz b6f3de5
optimize yielding
basz f69ed6d
params and doc block not needed
basz dd0fb93
unused property
basz f254ad5
more unneeded doc block removed
basz 92d46d6
stdlib ^3.1
basz 875090b
remove allow failure from travis
basz bf40881
revert unpack, does not work
basz 523fd25
fix, must be of the type array, null given,
basz b1c1d1e
cs
basz 2d10256
ternary assignment
basz 9a4a615
import class
basz cc27436
ternary for real
basz 66fedba
not needed as we switched to psr/container
basz 2f89286
void return types on tests methods
basz 869abfb
cache assertions
basz 5c0290b
adds assertion set
basz 10e6bcd
tests
basz 02757b3
apply in AuthorizationService
basz 81178b8
rebase conflict
basz 175b48b
cs
basz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
* This software consists of voluntary contributions made by many individuals | ||
* and is licensed under the MIT license. | ||
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
vendor | ||
composer.lock | ||
.idea | ||
.php_cs.cache | ||
build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<?php | ||
|
||
use PhpCsFixer\Config as PhpCsFixerConfig; | ||
|
||
class Config extends PhpCsFixerConfig | ||
{ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->setRiskyAllowed(true); | ||
} | ||
|
||
public function getRules(): array | ||
{ | ||
return [ | ||
'@PSR2' => true, | ||
'@PHP71Migration' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'binary_operator_spaces' => [ | ||
'align_double_arrow' => true, | ||
'align_equals' => false, | ||
], | ||
'blank_line_after_opening_tag' => true, | ||
'blank_line_after_namespace' => true, | ||
'blank_line_before_return' => true, | ||
'braces' => true, | ||
'cast_spaces' => true, | ||
'class_definition' => true, | ||
'combine_consecutive_unsets' => true, | ||
'concat_space' => false, | ||
'declare_strict_types' => true, | ||
'elseif' => true, | ||
'encoding' => true, | ||
'full_opening_tag' => true, | ||
'function_declaration' => true, | ||
'function_typehint_space' => true, | ||
'hash_to_slash_comment' => true, | ||
'header_comment' => false, | ||
'include' => true, | ||
'indentation_type' => true, | ||
'linebreak_after_opening_tag' => true, | ||
'line_ending' => true, | ||
'lowercase_constants' => true, | ||
'lowercase_keywords' => true, | ||
'method_argument_space' => true, | ||
'method_separation' => true, | ||
'modernize_types_casting' => true, | ||
'native_function_casing' => true, | ||
'new_with_braces' => true, | ||
'no_alias_functions' => true, | ||
'no_blank_lines_after_class_opening' => true, | ||
'no_closing_tag' => true, | ||
'no_empty_statement' => true, | ||
'no_extra_consecutive_blank_lines' => true, | ||
'no_leading_import_slash' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'no_multiline_whitespace_around_double_arrow' => true, | ||
'no_multiline_whitespace_before_semicolons' => true, | ||
'no_short_bool_cast' => true, | ||
'no_short_echo_tag' => true, | ||
'no_singleline_whitespace_before_semicolons' => true, | ||
'no_spaces_around_offset' => true, | ||
'no_trailing_comma_in_list_call' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_unneeded_control_parentheses' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_unused_imports' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'no_spaces_inside_parenthesis' => true, | ||
'no_trailing_whitespace_in_comment' => true, | ||
'no_whitespace_before_comma_in_array' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'normalize_index_brace' => true, | ||
'not_operator_with_successor_space' => true, | ||
'object_operator_without_whitespace' => true, | ||
'ordered_imports' => true, | ||
'phpdoc_indent' => true, | ||
'phpdoc_inline_tag' => true, | ||
'psr4' => true, | ||
'return_type_declaration' => true, | ||
'semicolon_after_instruction' => true, | ||
'short_scalar_cast' => true, | ||
'simplified_null_return' => false, | ||
'single_blank_line_at_eof' => true, | ||
'single_class_element_per_statement' => true, | ||
'single_import_per_statement' => true, | ||
'single_line_after_imports' => true, | ||
'single_quote' => true, | ||
'standardize_not_equals' => true, | ||
'strict_comparison' => true, | ||
'switch_case_semicolon_to_colon' => true, | ||
'switch_case_space' => true, | ||
'ternary_operator_spaces' => true, | ||
'trailing_comma_in_multiline_array' => true, | ||
'trim_array_spaces' => true, | ||
'unary_operator_spaces' => true, | ||
'visibility_required' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
]; | ||
} | ||
} | ||
|
||
$config = new Config(); | ||
$config->getFinder()->in(__DIR__)->exclude(['data', 'docs']); | ||
|
||
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__; | ||
|
||
$config->setCacheFile($cacheDir . '/.php_cs.cache'); | ||
|
||
return $config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,45 @@ | ||
sudo: false | ||
|
||
language: php | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- hhvm | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
- $HOME/.php-cs-fixer | ||
|
||
env: | ||
matrix: | ||
- PREFER_LOWEST="--prefer-lowest" | ||
- PREFER_LOWEST="" | ||
matrix: | ||
include: | ||
- php: 7.1 | ||
env: | ||
- DEPENDENCIES="" | ||
- EXECUTE_CS_CHECK=true | ||
- TEST_COVERAGE=true | ||
- php: 7.1 | ||
env: | ||
- DEPENDENCIES="--prefer-lowest --prefer-stable" | ||
- php: 7.2 | ||
env: | ||
- DEPENDENCIES="" | ||
- php: 7.2 | ||
env: | ||
- DEPENDENCIES="--prefer-lowest --prefer-stable" | ||
|
||
before_script: | ||
- mkdir -p "$HOME/.php-cs-fixer" | ||
- phpenv config-rm xdebug.ini | ||
- composer self-update | ||
- composer update --prefer-source $PREFER_LOWEST | ||
- composer update $DEPENDENCIES | ||
|
||
script: | ||
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml | ||
- ./vendor/bin/phpcs --standard=PSR2 ./src/ | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi | ||
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi | ||
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/docheader check src/ tests/; fi | ||
|
||
after_script: | ||
- php vendor/bin/coveralls -v | ||
after_success: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/coveralls -v; fi | ||
|
||
notifications: | ||
irc: "irc.freenode.org#zftalk.modules" | ||
email: true | ||
|
||
matrix: | ||
allow_failures: | ||
- php: hhvm | ||
webhooks: | ||
urls: | ||
- https://webhooks.gitter.im/e/90753b5c820315c57410 | ||
on_success: change # options: [always|never|change] default: always | ||
on_failure: always # options: [always|never|change] default: always | ||
on_start: never # options: [always|never|change] default: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use v7