Skip to content

Commit

Permalink
Merge branch '3.0' into make-classes-final
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacePossum committed Mar 14, 2019
2 parents c4e4985 + 70f291d commit 2755fc9
Show file tree
Hide file tree
Showing 363 changed files with 9,514 additions and 2,249 deletions.
7 changes: 4 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ clone_folder: C:\projects\php-cs-fixer

environment:
matrix:
- php_ver: 7.1.2
- php_ver: 5.6.30
- php_ver: 7.3.1
- php_ver: 5.6.40

cache:
- '%APPDATA%\Composer'
Expand All @@ -28,13 +28,14 @@ install:
- echo extension=php_curl.dll >> php.ini
- echo extension=php_openssl.dll >> php.ini
- echo extension=php_mbstring.dll >> php.ini
- IF NOT EXIST C:\tools\composer.phar (cd C:\tools && appveyor DownloadFile https://getcomposer.org/download/1.4.1/composer.phar)
- IF NOT EXIST C:\tools\composer.phar (cd C:\tools && appveyor DownloadFile https://getcomposer.org/composer.phar)
- cd C:\projects\php-cs-fixer
- php C:\tools\composer.phar global show hirak/prestissimo -q || php C:\tools\composer.phar global require hirak/prestissimo

before_test:
- cd C:\projects\php-cs-fixer
- php C:\tools\composer.phar update --optimize-autoloader --no-interaction --no-progress --prefer-stable --no-ansi
- php C:\tools\composer.phar info -D | sort

test_script:
- cd C:\projects\php-cs-fixer
Expand Down
31 changes: 31 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2

jobs:
build:
macos:
xcode: '10.1.0'
steps:
- checkout

- restore_cache:
keys:
- cache-{{ checksum "composer.json" }}

- run: brew update
- run: brew install php@7.2
- run: brew link --force --overwrite php@7.2
- run: php --version
- run: echo "memory_limit = 512M" > $(brew --prefix)/etc/php/7.2/conf.d/memory.ini
- run: curl -sS https://getcomposer.org/installer | php
- run: php composer.phar global show hirak/prestissimo -q || php composer.phar global require --no-interaction --no-progress --optimize-autoloader hirak/prestissimo
- run: php composer.phar install --optimize-autoloader --no-interaction --no-progress --no-suggest
- run: php composer.phar info -D | sort

- save_cache:
key: cache-{{ checksum "composer.json" }}
paths:
- ~/.composer
- ~/Library/Caches/Homebrew

- run: vendor/bin/phpunit
- run: PHP_CS_FIXER_FUTURE_MODE=1 php php-cs-fixer --diff --dry-run -v fix
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tests/Test/AbstractFixerWithAliasedOptionsTestCase.php export-ignore
tests/Test/AbstractTransformerTestCase.php export-ignore

.appveyor.yml export-ignore
.circleci/ export-ignore
.composer-require-checker.json export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
Expand Down
57 changes: 3 additions & 54 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,69 +13,18 @@ EOF;
$finder = PhpCsFixer\Finder::create()
->exclude('tests/Fixtures')
->in(__DIR__)
->append([__DIR__.'/php-cs-fixer'])
;

$config = PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PHP56Migration' => true,
'@PHPUnit60Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'comment_to_phpdoc' => true,
'compact_nullable_typehint' => true,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'final_internal_class' => true,
'fully_qualified_strict_types' => true,
'function_to_constant' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'header_comment' => ['header' => $header],
'heredoc_to_nowdoc' => true,
'list_syntax' => ['syntax' => 'long'],
'logical_operators' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'native_function_invocation' => false,
'no_alternative_syntax' => true,
'no_binary_string' => true,
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
'no_null_property_initialization' => true,
'no_short_echo_tag' => true,
'no_superfluous_elseif' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
'no_unreachable_default_argument_value' => true,
'no_unset_on_property' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_internal_class' => true,
'php_unit_ordered_covers' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
'php_unit_test_annotation' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types_order' => true,
'return_assignment' => true,
'semicolon_after_instruction' => true,
'single_line_comment_style' => true,
'strict_comparison' => true,
'strict_param' => true,
'string_line_ending' => true,
'yoda_style' => true,
])
->setFinder($finder)
;
Expand Down
28 changes: 16 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: php

sudo: false

git:
depth: 1

Expand Down Expand Up @@ -66,8 +64,8 @@ jobs:
php: 7.0
install:
# Composer: enforce given Symfony components version
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/force-lowest:$SYMFONY_VERSION; fi
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/lts:$(echo $SYMFONY_VERSION | grep -o 'v[0-9]\+') || true; fi
- if [ "$SYMFONY_VERSION" != "" ]; then composer global show symfony/flex -q || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS symfony/flex; fi
- if [ "$SYMFONY_VERSION" != "" ]; then composer config extra.symfony.require $SYMFONY_VERSION || true; fi

- travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS
- composer info -D | sort
Expand All @@ -85,7 +83,7 @@ jobs:
<<: *STANDARD_TEST_JOB
stage: Test
php: 7.1
env: SYMFONY_DEPRECATIONS_HELPER=weak SYMFONY_VERSION="v4.0"
env: SYMFONY_DEPRECATIONS_HELPER=weak SYMFONY_VERSION="~4.1.0"

-
<<: *STANDARD_TEST_JOB
Expand All @@ -95,7 +93,14 @@ jobs:
-
<<: *STANDARD_TEST_JOB
stage: Test
php: 7.2
php: 7.3
before_script:
- php php-cs-fixer fix --rules @PHP71Migration,@PHP71Migration:risky,blank_line_after_opening_tag -q || travis_terminate 1

-
<<: *STANDARD_TEST_JOB
stage: Test
php: 7.3
env: COLLECT_COVERAGE=1
before_install:
# check phpdbg
Expand All @@ -122,18 +127,17 @@ jobs:
stage: Test
php: nightly
env: COMPOSER_FLAGS="--ignore-platform-reqs" PHP_CS_FIXER_IGNORE_ENV=1 SYMFONY_DEPRECATIONS_HELPER=weak
script:
- php php-cs-fixer fix --rules @PHP71Migration,@PHP71Migration:risky,native_function_invocation -q || travis_terminate 1
- vendor/bin/phpunit || travis_terminate 1
- git checkout . -q
- PHP_CS_FIXER_FUTURE_MODE=1 php php-cs-fixer --diff --dry-run -v fix

-
stage: Deployment
php: 7.1
install: ./dev-tools/build.sh
script:
- PHP_CS_FIXER_TEST_ALLOW_SKIPPING_PHAR_TESTS=0 vendor/bin/phpunit tests/Smoke/
- PHP_CS_FIXER_TEST_ALLOW_SKIPPING_SMOKE_TESTS=0 vendor/bin/phpunit tests/Smoke/

before_deploy:
# ensure that deployment is happening only if tag matches version of PHP CS Fixer
- test $(php dev-tools/info-extractor.php | jq .version.vnumber) == "\"$TRAVIS_TAG\""
deploy:
provider: releases
api_key:
Expand Down

0 comments on commit 2755fc9

Please sign in to comment.