503 Commits

Author SHA1 Message Date
Tomas Votruba
1d80ef3df6
[TypeDeclaration] Add external types to ParamTypeFromStrictTypedPropertyRector (#5560) 2021-02-15 19:31:53 +00:00
Abdul Malik Ikhsan
642110750f
[PHP 7.1 Scoped] Use PHP 7.1 for build php 7.1 (#5562) 2021-02-15 19:20:20 +00:00
Abdul Malik Ikhsan
4fa3573dff
[PHP 7.1 Scoped] install dev dependency as well to allow run phpunit (#5561)
* [PHP 7.1 Scoped] install dev dependency as well to allow run phpunit
2021-02-15 18:51:26 +00:00
Abdul Malik Ikhsan
1fce3e00f8
[PHP 7.1 Scoped] Replace composer.json with autoload/require with the base composer.json (#5550) 2021-02-15 08:52:24 +00:00
Jan Mikeš
2ac7b5e12b
[CI][Docker] Push all Docker image tags at once (#5531) 2021-02-13 17:58:29 +01:00
TomasVotruba
d81489ea91 [CI] run only single scoping for tagged/non-tagged 2021-02-11 13:37:40 +01:00
Abdul Malik Ikhsan
ee0afabfc4
[PHP 7.1 Scoped] remove stubs from excluded zip at build_php71.yaml (#5489)
refs https://github.com/rectorphp/rector-php71/pull/1#discussion_r573557883
2021-02-10 11:57:24 +01:00
Tomas Votruba
b9f5fe2f3d
[CI] Add PHP 8.0 php linter (#5479) 2021-02-09 21:32:17 +01:00
Tomas Votruba
ecbef2bcaa
[Tests] remove getPhpVersion() helped method, use configs instead (#5477) 2021-02-09 17:25:16 +00:00
Tomas Votruba
1757e83cdc
misc, remove RemoveProjectFileRector (#5463) 2021-02-08 18:26:00 +00:00
TomasVotruba
9b452a214a use master branch as common 2021-02-07 23:18:57 +01:00
Abdul Malik Ikhsan
ac3611698b
[EasyCI] Using symplify/easy-ci for validate-file-length (#5431) 2021-02-06 12:34:59 +01:00
Michal Lulco
17cb30f5c7
Removed duplicit package sebastian/diff from composer.json (#5399) 2021-02-01 18:05:25 +01:00
TomasVotruba
e9b9d789b5 [ci] use united bot name 2021-01-31 15:26:44 +01:00
Tomas Votruba
4590b10b43
[Process] Add --no-diffs for better huge CI debug (#5368) 2021-01-29 20:12:09 +00:00
Abdul Malik Ikhsan
4ce73a2867
[NodeTypeResolver] Handle PropertyFetchTypeResolver on PropertyProperty resolution (#5334)
Co-authored-by: Vašek Henzl <vasek.henzl@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-27 17:00:42 +01:00
Abdul Malik Ikhsan
6f17c9c114
Apply build_php_71 workflow only in push (#5327) 2021-01-26 17:59:22 +01:00
Tomas Votruba
abadc5473b
[CI] add demo for build php 7.1 version (#4447)
* Renamed option to --exclude-path

* Exclude /**/tests/ by default

* Inverted order of downgrade

* Fixed verb

* Use sed to replace string

* Simplified message

* Use PHP version with "."

* Completed PHP versions to downgrade

* Execute Rector with --target-php-version

* Added quotes to array keys

* Allow to print command to output

* Execute script within workflow

* If rector fails, already exit 1

* Ignore PHP constraint

* Removed --dry-run and errors for testing

* Don't print command

* Run downgraded for ALL sets

* Include downgrade sets for testing

* Run all sets in a command each

* Added the target PHP version in each downgrade set

* Use a rector config file to pass exclude paths

* Exclude everything under /tests/

* Removed --dry-run

* Set unneeded transformations in false

* Exclude /ci/

* Exclude /compiler/

* Exclude DoctrineProvider

* Exclude classes for dependency-injection

* Exclude classes for http-kernel

* Exclude classes for symfony string

* Use cut instead of aws
For if the path has a space

* Calculate package execution order

* Downgrade packages on required order

* Consider the set to check package dependents

* Store packages_to_downgrade_by_set

* Store package_dependents["$package|$set"]

* Fixed converting from string to array

* Fixed converting string to array

* Fixed char

* Simplified counter

* Fixed string to array

* Fixed var

* Fixed getting dependents

* Fixed checking if dependent packages downgraded

* rector/rector has no dependents

* Simplified downgraded_packages

* Ignore dependent package on itself

* If circular dependencies, make the process fail

* Uncommented executing rector

* Exclude /stubs

* Calculate circular reference packages

* Break circular references

* Uncommented rector call

* Do downgrade ContainerBuilder

* Added expression-language as dep for PROD

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] Apply coding standards

* [ci-review] Rector Rectify

* Obtain "rector/rector" from composer

* Removed commented code

* Don't do platform check for Composer v2

* Moved comment up

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* Must dump autload to remove platform_check.php

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* Copied file from master

* Use new convention (70000) for PHP versions (7.0)

* Fixed cs

* Fixed PHPStan

* Added "create-config" command - Initial commit

* [ci-review] Rector Rectify

* Moved rector config under custom folder

* Use predefined rector configs instead of injecting --set

* Created rector config files

* Use array of rector configs, even if only 1 is used

* Require once config file

* Fixed exclude paths

* Execute only last rector config (containing many sets)

* Exclude file that makes process fail

* Removed --dry-run

* Use existing option name

* Handle GROUP_RECTOR_CONFIGS in circular packages

* Changing PHP_VERSION_ID does not work, so commented rule

* Bug fixed => uncommented using rector

* Renamed NoParticularNodeRule to ForbiddenNodeRule

* [ci-review] Rector Rectify

* Fixed PHP version constants

* Added (failing) test

* Fixed issue for nullable scalars

* Can't run Rector with --set through CLI, removed

* Added (failing) test

* Fixed issue for __construct

* Fixed constant name

* Added (failing) test for self

* Added another (failing) test

* Fixed not adding "\" before "static", "self", etc

* [ci-review] Rector Rectify

* Skip downgrading CouchbaseBucketAdapter

* Renamed var

* Added (failing) test

* Fixed interface and abstract class issue

* [ci-review] Rector Rectify

* Fixed PHPStan error

* Create artifact of downgraded code

* Added missing spaces for args

* Use 4 spaces for consistency

* Ignore build folder in rector-php71.zip

* Switch to setup-php@v2

* Added (failing) test

* Issue is on calling method, not on constructor

* Implemented fix

* Renamed test

* Added further tests

* [ci-review] Rector Rectify

* Fixed PHPStan

* Fixed PHPStan

* Added (failing) test

* Fixed issue on new Class('foo', )

* Execute tests

* No need for quotes

* Made the artifact contain the folder, not a .zip

* Removed /compiler folder (it's been deleted?)

* Do upload the artifact as a .zip (too slow otherwise)

* Remove all tests, also from under vendor/

* Upgraded zip action version

* Change Composer's PHP requirement to 7.1

* Try exclude tests under vendor/

* Renamed artifact

* Try exclude tests under vendor/

* Updated test (to fail)

* If the float has no ".", add ".0" at the end

* Must remove deps before "composer require php"

* Replaced call to phpstan

* Cannot run PHPStan on 7.1, just run Rector

* Change Composer's PHP requirement to 7.1

* Remove DEV dependencies

* Require Symfony Polyfill libraries

* Rector without DEV needs phpstan.neon removed

* Run PHPStan

* Added paths to analyze

* Access PHPStan config from file

* Fixed relative paths

* Override the artifact with downgraded Composer too

* Uncommented scanDirectories

* Include tests/ in artifact

* Exclude */tests/*

* Ignore utils/phpstan-extensions

* PHPUnit is installed in DEV, can't use it in PROD

* "nette/application" is on DEV, may not exist on PROD

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* Improved comment after rectify

* Fixed previous messed-up merge

* Removed 1st slash

* Downgrade all dependencies together

* Replace the composer.json file

* Can't have more than 1 path to downgrade

* No need to change PHP requirement to 7.1 anymore

* Remove DEV dependencies before replacing composer.json

* Changed order of commands

* No need for --ignore-platform-req=php

* Add all Symfony polyfill libraries

* Require Symfony polyfill libraries earlier on

* Test removing `ignoreErrors` from PHPStan

* Remove ignored errors which do not apply

* Fixed the list of `excludes_analyse`

* Removed commented code

* Fixed PHPStan config

* Only analyze the target PHP version if GROUP_RECTOR_CONFIGS

* Simplified script: just analyze target PHP version

* Renamed downgrade sets

* Removed unneeded create-config command

* Removed call to deleted class

* Dropped ChangePhpVersionInPlatformCheckRector

* Must remove phpstan-for-rector.neon from PROD

* Do not execute --dry-run, it returns error

* Publish downgraded code to remote repository

* Removed commented code

* Standardized script code

* Initialize variables in script

* No need to initialize vars

* Remove the zip, do not copy to target repo

* Remove .git before deploying to target repo

* Copy files to rector-downgrade/

* Use branch "main"

* Copy also hidden files

* Remove docker publish image workflow

* Trigger own tests workflow

* Include "lowest"

* Run PHPStan instead of PHPUnit

* Run PHPStan in new temp directory

* Execute in same item

* "../" for --config doesn't work for PHPStan

* Added bare run test

* Added tests for PHP 7.2

* Added test

* Run with php

* Replaced namespace

* Added PHPUnit test for PHP 7.1

* Use PHP 7.1-compatible version of "doctrine/orm"

* Can't skip downgrading doctrine-annotation-generated

* Removed commented items

* Renamed test workflow

* Added comments on code

* Run all tests, not just 1

* Downgrade package from v3.1 to v3.0.7

* Run existing tests

* Revert tests

* [ci-review] Rector Rectify

Co-authored-by: Leonardo Losoviz <leo@getpop.org>
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-25 20:25:21 +01:00
Abdul Malik Ikhsan
2b49b712bd
[Code Coverage] Fixes weekly code coverage generation (#5298)
* [Code Coverage] Fixes weekly code coverage generation Fixes #5297

* rclean up should already handled by GA
2021-01-24 10:07:42 +01:00
Tomas Votruba
0a3dc08d61
drop Sonarcube (#5215) 2021-01-17 15:32:01 +00:00
Abdul Malik Ikhsan
a071ae7dff
[CodeCoverage] Fixes weekly code coverage by move COVERALLS_REPO_TOKEN on run (#5213) 2021-01-17 14:31:55 +01:00
Tomas Votruba
04db98620a
Refactor composer modifier to ComposerRector (#5198) 2021-01-16 13:23:37 +01:00
Abdul Malik Ikhsan
35e83f75c6
[Utils] Add validate-fixture-filename command (#5199)
* [Utils] Add validate-fixture-filename command

* register command

* fix existing fixture filename with -

* clean up
2021-01-16 13:19:40 +01:00
TomasVotruba
72d01fea03 [ci] move cs and doc check to once a week 2021-01-14 11:10:03 +01:00
Tomas Votruba
d1df8f76cd
drop PHPStanAttributeTypeSyncer, handled by external package (#5131) 2021-01-10 14:51:27 +01:00
Abdul Malik Ikhsan
edcfe417a4
Another fix weekly code coverage action (#5128)
typo fix `secrets.GITHUB_TOKEN` -> `secrets.ACCESS_TOKEN`
2021-01-10 11:55:11 +01:00
Abdul Malik Ikhsan
6da34f9a35
Fix weekly code coverage github action (#5126)
it got error: 

```

The workflow is not valid. .github/workflows/weekly_code_coverage.yaml (Line: 34, Col: 51): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.GITHUB_TOKEN
```

The `secrets` seems only needed for automatic PR.
2021-01-10 08:54:52 +01:00
Abdul Malik Ikhsan
756f7dd214
Ensure clean up composer.json & build dir after run coverage weekly (#5099)
* Ensure clean up composer.json after run coverage weekly

as it use require --dev (update composer.json) during run.

* clean build dir as well
2021-01-06 12:08:03 +01:00
Tomáš Fejfar
1281c67510
Fix for #5086 (#5087) 2021-01-04 18:38:50 +01:00
Tomáš Fejfar
3611457cb6
Publish all tags as docker images (#5086)
No tags except latest were published because tags no longer contain leading `v`
2021-01-04 15:13:23 +01:00
Abdul Malik Ikhsan
e1c89d17f6
[fixtures] Enable validate-fixture-skip-naming check (#5081)
* [fixtures] Enable validate-fixture-skip-naming check

* full path vendor vendor/symplify/easy-testing/bin/easy-testing validate-fixture-skip-naming rules tests

* 21 files

* more fixture

* various fix

* various fix

* more fixtures

* apply to packages rules tests utils

* more fixtures

* more fixtures

* more fixtures

* more fixtures

* more fixtures

* more fixtures

* more fixtures

* fixture fix

* done

* fixture fix
2021-01-04 14:18:27 +01:00
Tomas Votruba
014c019449
[fixtures] require skip prefix on skipped files (#5079)
* skip unnecesary test case

* namespace corrections, skip prefix corrections

* hide for now

* skip new phpstan cases
2021-01-03 15:54:27 +00:00
Abdul Malik Ikhsan
7192385c49
[CI] Remove fork check in daily and weekly CI (#5058) 2020-12-31 14:27:44 +01:00
Abdul Malik Ikhsan
bf9e31b515
[Test] Separate Weekly CI for code coverage generation (#5044) 2020-12-29 23:48:07 +01:00
Abdul Malik Ikhsan
81751880b2
[Test] Move Re-generate code coverage to weekly pull request (#5041) 2020-12-29 19:08:24 +01:00
Abdul Malik Ikhsan
fba0bac3f8
[Github Action] Move fork check in steps for daily and weekly pull request (#5036) 2020-12-29 15:23:12 +01:00
TomasVotruba
f58deedbee drop debug build 2020-12-28 23:09:30 +01:00
Tomas Votruba
52e604c6dd
[scoper] unprefix string classes to match types (#5025) 2020-12-28 23:09:11 +01:00
Abdul Malik Ikhsan
acdc7ee6ee
[PHPUnit] Enable Coverage again (#5007)
* [PHPUnit] Enable Coverage again

* coverals

* try using pcov

* use code_coverage.yaml

* on pull request

* try with --testsuite main

* try create multiple suites and use phpcov to merge clover

* try create multiple suites and use phpcov to merge clover

* try create multiple suites and use phpcov to merge clover

* chmod +x ./phpcov.phar

* using --coverage-php for generate .cov

* surplus -

* debug

* tempoary disable collect test on utils

* try exclude packages/attribute-aware-php-doc/src/Ast/PhpDoc/AttributeAwareDeprecatedTagValueNode.php

* try exclude packages/attribute-aware-php-doc/src/Ast/PhpDoc/AttributeAwareDeprecatedTagValueNode.php

* try nimut/phpunit-merger

* using ./ for directory

* exclude directories

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* try run phpunit on explicit directory

* try using xdebug

* reverted even on push
2020-12-28 19:46:48 +00:00
Tomas Votruba
520335251d
[scoper] keep phpstan.phar to avoid conflict in install (#5009)
* fix scoping of Symfony autodiscovery namespace

* scoped: add along phpstan run

* wait longer, the old version is used

* keep phpstan.phar
2020-12-27 21:14:39 +00:00
TomasVotruba
4f66248507 push 2020-12-27 14:29:03 +01:00
TomasVotruba
a2b2a0e053 build on push dev 2020-12-27 14:27:42 +01:00
Tomas Votruba
b37cfab141
[ci] enable ramsey (#5001) 2020-12-26 15:10:44 +00:00
Tomas Votruba
ec92bcc95e
[phpstan] enable file lenght rule (#4999)
* enable file lenght rule

* longer file, just to show ci worked

* [ci] add ValidateFileLengthCommand

* [phpstan] drop PathsAreNotTooLongRule

* [Downgrade] Shorten property promotion rector rule

* [Symfony] Shorten AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector name

* shorten fixture name

* rename ChangeControlArrayAccessToAnnotatedControlVariableRector to AnnotateMagicalControlArrayAccessRector

* rename ReplaceMagicEventPropertySubscriberWithEventClassSubscriberRector to ReplaceMagicPropertyWithEventClassRector

* rename GetConfigWithDefaultsArgumentToArrayMergeInCompilerExtensionRector to MergeDefaultsInGetConfigCompilerExtensionRector

* rename ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector to ChangeStringCollectionOptionToConstantRector

* decouple ProjectFilesFinder
2020-12-26 14:53:21 +00:00
Tomas Votruba
d4883d44d9
[Prefixed Rector] Add package-scoper approach (#4559) 2020-12-26 00:17:31 +01:00
Tomas Votruba
d256bbd8c0
change rector-ci.php to rector.php (#4994) 2020-12-25 19:11:33 +01:00
TomasVotruba
b911612ba3 fix yaml suffix 2020-12-24 23:05:50 +01:00
Tomas Votruba
319d6bfca1
add phpstan-for-rector config path, consolidate return type extensions - re-use from Symplify (#4973)
* add phpstan-for-rector config path, to separate phpstan and extensions that help Rector with precise types

* move type value object to value object

* moving

* remove KernelGetContainerAfterBootReturnTypeExtension, use one from symplify

* remove ContainerGetDynamicMethodReturnTypeExtension to ContainerGetReturnTypeExtension

* remove nette extension

* add nette-extension

* removed delegated rule

* delegate implmenets + code sample PHPStan rule to symplify
2020-12-24 16:31:24 +00:00
TomasVotruba
01e6554600 [github] update issue template 2020-12-22 23:31:53 +01:00
Abdul Malik Ikhsan
bf4cd08947
[Utils] Run validate-fixture-namespace and validate-fixture-classname for /tests/ directory (#4901)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-15 19:51:03 +01:00