Skip to content

Commit

Permalink
Update several CI settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Eckerstorfer committed Oct 25, 2015
1 parent 8dfc9ff commit b090e35
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 80 deletions.
3 changes: 1 addition & 2 deletions .appveyor.yml
Expand Up @@ -23,7 +23,6 @@ install:
- echo extension=php_openssl.dll >> php.ini
- echo extension=php_mbstring.dll >> php.ini
- echo extension=php_fileinfo.dll >> php.ini
- echo extension=php_curl.dll >> php.ini
- echo memory_limit=1G >> php.ini
- cd c:\projects\cocur\slugify
- php -r "readfile('http://getcomposer.org/installer');" | php
Expand All @@ -35,7 +34,7 @@ test_script:

notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/8bfd287c1e8cd5f18f31
url: https://webhooks.gitter.im/e/aaf55568e4629e650616
on_build_success: false
on_build_failure: true
on_build_status_changed: true
6 changes: 0 additions & 6 deletions .coveralls.yml

This file was deleted.

198 changes: 159 additions & 39 deletions .scrutinizer.yml
@@ -1,42 +1,162 @@
tools:
external_code_coverage: true
php_sim: true
php_pdepend: true
php_analyzer: true

filter:
excluded_paths:
- 'vendor/*'
- 'tests/*'
before_commands:
- 'composer --prefer-source --dev install'
- 'cp phpunit.xml.dist phpunit.xml'
tools:
php_mess_detector:
config:
naming_rules: { boolean_method_name: true }
controversial_rules: { camel_case_class_name: true, camel_case_property_name: true, camel_case_method_name: true, camel_case_parameter_name: true, camel_case_variable_name: true }
php_analyzer:
config:
parameter_reference_check: { enabled: false }
checkstyle: { enabled: true, no_trailing_whitespace: true, naming: { enabled: true, local_variable: '^[a-z][a-zA-Z0-9]*$', abstract_class_name: ^Abstract|Factory$, utility_class_name: 'Utils?$', constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$', property_name: '^[a-z][a-zA-Z0-9]*$', method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$', parameter_name: '^[a-z][a-zA-Z0-9]*$', interface_name: '^[A-Z][a-zA-Z0-9]*Interface$', type_name: '^[A-Z][a-zA-Z0-9]*$', exception_name: '^[A-Z][a-zA-Z0-9]*Exception$', isser_method_name: '^(?:is|has|should|may|supports)' } }
unreachable_code: { enabled: true }
check_access_control: { enabled: false }
typo_checks: { enabled: true }
check_variables: { enabled: true }
suspicious_code: { enabled: false, overriding_parameter: false, overriding_closure_use: false, parameter_closure_use_conflict: false, parameter_multiple_times: false, non_existent_class_in_instanceof_check: false, non_existent_class_in_catch_clause: false, assignment_of_null_return: false, non_commented_switch_fallthrough: false, non_commented_empty_catch_block: false, overriding_private_members: false, use_statement_alias_conflict: false, precedence_in_condition_assignment: false }
dead_assignments: { enabled: true }
verify_php_doc_comments: { enabled: true, parameters: true, return: true, suggest_more_specific_types: true, ask_for_return_if_not_inferrable: true, ask_for_param_type_annotation: true }
loops_must_use_braces: { enabled: true }
check_usage_context: { enabled: true, method_call_on_non_object: { enabled: true, ignore_null_pointer: true }, foreach: { value_as_reference: true, traversable: true }, missing_argument: true, argument_type_checks: lenient }
simplify_boolean_return: { enabled: true }
phpunit_checks: { enabled: true }
reflection_checks: { enabled: false }
precedence_checks: { enabled: true, assignment_in_condition: true, comparison_of_bit_result: true }
basic_semantic_checks: { enabled: true }
doc_comment_fixes: { enabled: true }
reflection_fixes: { enabled: false }
use_statement_fixes: { enabled: true, remove_unused: true, preserve_multiple: false, order_alphabetically: false }
php_code_sniffer:
config:
standard: PSR2
sensiolabs_security_checker: true
php_code_coverage:
config_path: phpunit.xml.dist
php_cpd: true
php_loc: true
php_pdepend: true
- 'examples/*'

checks:
php:
verify_property_names: true
verify_argument_usable_as_reference: true
verify_access_scope_valid: true
variable_existence: true
useless_calls: true
use_statement_alias_conflict: true
use_self_instead_of_fqcn: true
uppercase_constants: true
unused_variables: true
unused_properties: true
unused_parameters: true
unused_methods: true
unreachable_code: true
too_many_arguments: true
symfony_request_injection: true
switch_fallthrough_commented: true
sql_injection_vulnerabilities: true
spacing_of_function_arguments: true
spacing_around_non_conditional_operators: true
spacing_around_conditional_operators: true
space_after_cast: true
single_namespace_per_use: true
simplify_boolean_return: true
side_effects_or_types: true
security_vulnerabilities: true
scope_indentation:
spaces_per_level: '4'
return_doc_comments: true
return_doc_comment_if_not_inferrable: true
require_scope_for_properties: true
require_scope_for_methods: true
require_php_tag_first: true
require_braces_around_control_structures: true
remove_trailing_whitespace: true
remove_php_closing_tag: true
remove_extra_empty_lines: true
psr2_switch_declaration: true
psr2_control_structure_declaration: true
psr2_class_declaration: true
property_assignments: true
properties_in_camelcaps: true
prefer_while_loop_over_for_loop: true
prefer_unix_line_ending: true
prefer_sapi_constant: true
precedence_mistakes: true
precedence_in_conditions: true
phpunit_assertions: true
php5_style_constructor: true
parameters_in_camelcaps: true
parameter_non_unique: true
parameter_doc_comments: true
param_doc_comment_if_not_inferrable: true
overriding_private_members: true
optional_parameters_at_the_end: true
one_class_per_file: true
non_commented_empty_catch_block: true
no_unnecessary_if: true
no_unnecessary_function_call_in_for_loop: true
no_unnecessary_final_modifier: true
no_underscore_prefix_in_properties: true
no_underscore_prefix_in_methods: true
no_trait_type_hints: true
no_trailing_whitespace: true
no_space_inside_cast_operator: true
no_space_between_concatenation_operator: true
no_space_before_semicolon: true
no_space_around_object_operator: true
no_space_after_cast: true
no_short_open_tag: true
no_property_on_interface: true
no_non_implemented_abstract_methods: true
code_rating: true
duplication: true
deprecated_code_usage: true
closure_use_not_conflicting: true
closure_use_modifiable: true
avoid_useless_overridden_methods: true
avoid_conflicting_incrementers: true
assignment_of_null_return: true
no_goto: true
no_global_keyword: true
no_exit: true
no_eval: true
no_error_suppression: true
no_empty_statements: true
no_elseif_statements: true
no_duplicate_arguments: true
no_debug_code: true
no_commented_out_code: true
newline_at_end_of_file: true
naming_conventions:
local_variable: '^[a-z][a-zA-Z0-9]*$'
abstract_class_name: ^Abstract|Factory$
utility_class_name: 'Utils?$'
constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
property_name: '^[a-z][a-zA-Z0-9]*$'
method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
parameter_name: '^[a-z][a-zA-Z0-9]*$'
interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
type_name: '^[A-Z][a-zA-Z0-9]*$'
exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
isser_method_name: '^(?:is|has|should|may|supports|filter)'
more_specific_types_in_doc_comments: true
missing_arguments: true
method_calls_on_non_object: true
lowercase_php_keywords: true
lowercase_basic_constants: true
instanceof_class_exists: true
function_in_camel_caps: true
function_body_start_on_new_line: true
foreach_usable_as_reference: true
foreach_traversable: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: false
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
ensure_lower_case_builtin_functions: true
encourage_single_quotes: true
encourage_shallow_comparison: true
encourage_postdec_operator: true
deadlock_detection_in_loops: true
classes_in_camel_caps: true
catch_class_exists: true
blank_line_after_namespace_declaration: true
avoid_usage_of_logical_operators: true
avoid_unnecessary_concatenation: true
avoid_todo_comments: true
avoid_tab_indentation: true
avoid_superglobals: true
avoid_perl_style_comments: true
avoid_fixme_comments: true
avoid_length_functions_in_loops: true
avoid_multiple_statements_on_same_line: true
avoid_entity_manager_injection: true
avoid_duplicate_types: true
avoid_corrupting_byteorder_marks: true
avoid_closing_tag: true
avoid_aliased_php_functions: true
align_assignments: true
argument_type_checks: true
no_mixed_inline_html: true
no_long_variable_names:
maximum: '20'
33 changes: 16 additions & 17 deletions .travis.yml
@@ -1,32 +1,31 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- hhvm
sudo: false

matrix:
include:
- php: 5.5
- php: 5.6
- php: 5.6
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
- php: 7.0
- php: hhvm
- php: nightly
allow_failures:
- php: 7.0
- php: nightly
fast_finish: true

addons:
code_climate:
repo_token: e27c69a17c19e62d55c1ec43eecc6821b905c504e5cb5cc4ad7f8a997163447a
before_install:
- travis_retry composer self-update && composer --version

before_script:
- sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
- composer self-update
- composer install --prefer-source
install:
- travis_retry composer update $COMPOSER_FLAGS --prefer-source -n

script:
- mkdir -p build/logs
- ./vendor/bin/phpunit
script: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover

after_script:
- php vendor/bin/coveralls -v
- php vendor/bin/test-reporter
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'

notifications:
webhooks:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -5,7 +5,7 @@ cocur/slugify
[![Build Status](https://img.shields.io/travis/cocur/slugify.svg?style=flat)](https://travis-ci.org/cocur/slugify)
[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/cocur/slugify.svg?style=flat)](https://scrutinizer-ci.com/g/cocur/slugify/)
[![Code Coverage](http://img.shields.io/coveralls/cocur/slugify.svg?style=flat)](https://coveralls.io/r/cocur/slugify)
[![Code Coverage](https://scrutinizer-ci.com/g/cocur/slugify/badges/coverage.png?b=master&style=flat-square)](https://scrutinizer-ci.com/g/cocur/slugify/?branch=master)

[![Latest Release](https://img.shields.io/packagist/v/cocur/slugify.svg)](https://packagist.org/packages/cocur/slugify)
[![MIT License](https://img.shields.io/packagist/l/cocur/slugify.svg)](http://opensource.org/licenses/MIT)
Expand Down Expand Up @@ -361,8 +361,8 @@ $latte->addFilter('slugify', array(new SlugifyHelper(Slugify::create()), 'slugif
```


Changelog
---------
Change Log
----------

### Version 1.4 (29 September 2015)

Expand Down
2 changes: 0 additions & 2 deletions composer.json
Expand Up @@ -21,15 +21,13 @@
"require-dev": {
"phpunit/phpunit": "~4.8",
"mockery/mockery": "~0.9",
"satooshi/php-coveralls": "0.6.*",
"symfony/http-kernel": "~2.4",
"symfony/dependency-injection": "~2.4",
"twig/twig": "~1",
"silex/silex": "~1.2",
"zendframework/zend-modulemanager": "~2.2",
"zendframework/zend-view": "~2.2",
"zendframework/zend-servicemanager": "~2.2",
"codeclimate/php-test-reporter": "dev-master",
"laravel/framework": "~5.1",
"nette/di": "~2.2",
"latte/latte": "~2.2",
Expand Down
11 changes: 0 additions & 11 deletions humbug.json.dist

This file was deleted.

0 comments on commit b090e35

Please sign in to comment.