Commit Graph

14463 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan b536a67738
[Scoped][e2e] Fix standalone rule test on scoped build (#2491)
* [Scoped] Fix standalone rule test on scoped build

* name
2022-06-14 08:44:59 +02:00
Tomas Votruba aceb0e8a93
bump deps (#2490) 2022-06-14 01:09:16 +02:00
Tomas Votruba 49fc61c1ff
Bump to Symplify 11 (#2489)
* Bump to Symplify 11

* remove ContainerConfigurator from prefixed classes

* static fixes
2022-06-14 01:03:30 +02:00
Abdul Malik Ikhsan ef4267ebf0
[PSR4] Handle invalid missing ; on NormalizeNamespaceByPSR4ComposerAutoloadRector with GroupUse (#2485)
* [PSR4] Handle invalid missing ; on NormalizeNamespaceByPSR4ComposerAutoloadRector with GroupUse and alias

* Fixed 🎉

* [ci-review] Rector Rectify

* more example

* fixture update

* final touch: add example for normal use

Co-authored-by: GitHub Action <action@github.com>
2022-06-13 13:47:04 +02:00
Tomas Votruba 332aad337e fix casing of enums 2022-06-13 11:04:14 +02:00
Abdul Malik Ikhsan 6f164da439
[Php55] Handle crash on concat variable single quote on PregReplaceEModifierRector (#2483)
Co-authored-by: GitHub Action <action@github.com>
2022-06-13 08:53:39 +02:00
Tomas Votruba 28ed5cf916
[automated] Re-Generate Nodes/Rectors Documentation (#2479)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2022-06-12 00:29:50 +00:00
Abdul Malik Ikhsan e1188e9bff
[DeadCode] Skip has return reassign Coalesce Op on RemoveUnusedPrivatePropertyRector (#2477)
* [DeadCode] Skip has return reassign Coalesce Op on RemoveUnusedPrivatePropertyRector

* Fixed 🎉
2022-06-11 15:58:17 +02:00
Tomas Votruba ce1c29184d [scoped] change only year and month, to make diff esaier to see; autoload is handled already 2022-06-11 14:21:30 +02:00
Abdul Malik Ikhsan 9679ed6d77
[DeadCode] Skip using coealesce assign operator on return on RemoveUnusedPrivatePropertyRector (#2476)
Co-authored-by: GitHub Action <action@github.com>
2022-06-11 14:14:26 +02:00
Abdul Malik Ikhsan a8dae7ff8f
[TypeDeclaration] Skip generic on ReturnTypeDeclarationRector (#2469)
* Add failing test fixture for ReturnTypeDeclarationRector

# Failing Test for ReturnTypeDeclarationRector

The native return type is replaced by the generic type of the pdpdoc, which does not exist.

Based on https://getrector.org/demo/5a20665a-b61f-4923-8b9a-aa9cb5c3a8ea

* Rename failing test

* Add missing namespace

* Closes #2454 Fixes https://github.com/rectorphp/rector/issues/7213

* re-trigger CI

Co-authored-by: François Poguet <francoispoguet@gmail.com>
Co-authored-by: François Poguet <francois.poguet@quarks.pro>
2022-06-11 13:54:48 +02:00
Abdul Malik Ikhsan a5340c6f06
[Renaming] Do not rename docblock same name not found in use inside namespace (#2471)
* Another failing test for #7209

* Closes #2468

* rename fixture

* fix

* Fix

* Fix

* fix

* fxi

* final touch: clean up

* final touch: clean up

* re-trigger CI

Co-authored-by: Einar Gangsø <mail@einargangso.no>
2022-06-11 13:54:13 +02:00
Tomas Votruba 797cb38b88
Clean PHPStan errors (#2475) 2022-06-10 14:43:16 +00:00
Tomas Votruba a6fb82623b
Bump to phpstan/phpdoc-parser 1.6.2 (#2473) 2022-06-10 12:11:36 +02:00
Abdul Malik Ikhsan db6623f608
Update phpdoc-parser conflict config to <1.6 on scoped build (#2472) 2022-06-10 09:51:40 +00:00
kenjis 368dbb048c
docs: fix instruction in CONTRIBUTING.md (#2470)
* docs: fix instruction

bash-3.2$ composer check-platform-reqs
No vendor dir present, checking platform requirements from the lock file

In Locker.php line 331:

  [LogicException]
  No lockfile found. Unable to read locked packages

* phpstan

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
2022-06-10 07:49:18 +02:00
Abdul Malik Ikhsan 712174b300
Update packages-tests github action to use latest phpdoc-parser (#2467)
* Update packages-tests github action to use latest phpdoc-parser

* fix compat

* [ci-review] Rector Rectify

* update to use ExtendedMethodReflection

Co-authored-by: GitHub Action <action@github.com>
2022-06-09 15:26:15 +02:00
Tomas Votruba 6f3eaff305 cleanup 2022-06-09 15:21:12 +02:00
Tomas Votruba 56651d0190 use PHPStan 1.7.12, with new phpdoc-parser to fix endline issue 2022-06-09 14:48:07 +02:00
Tomas Votruba e7ec08fe91
[phpdoc-parser] Add new TokenIterator to preload, to fix removed endline bug (#2466) 2022-06-09 14:46:58 +02:00
Abdul Malik Ikhsan 78954bb4a3
Use phpstan/phpdoc-parser 1.5.* to avoid space removal (#2464) 2022-06-09 13:46:03 +02:00
Abdul Malik Ikhsan ca02184695
[Scoped] Remove e2e/container-configurator on scoped build (#2463) 2022-06-09 13:02:40 +02:00
Tomas Votruba bdf11c5968 [DX] Add deprecation exception about old ContainerConfigurator, to prepare for removal even in CI 2022-06-09 12:14:06 +02:00
Abdul Malik Ikhsan d1b7a49e35
[DeadCode][Php73] Ensure return $node only when changed on RemoveDuplicatedCaseInSwitchRector+RegexDashEscapeRector (#2462) 2022-06-09 12:04:36 +02:00
Abdul Malik Ikhsan eaea281956
[Php70] Handle crash on EregToPregMatchRector (#2460)
* Add fixture 5 to `ereg to preg match`

* Closes #2459

Co-authored-by: Thibault <thibault.andreis@gmail.com>
2022-06-09 11:41:42 +02:00
Abdul Malik Ikhsan f2300baf89
[Php72] Handle crash on PreInc usage on CreateFunctionToAnonymousFunctionRector (#2456)
* [Php72] Handle crash on PreInc usage on CreateFunctionToAnonymousFunctionRector

* Fixed 🎉

* phpstan

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-06-09 07:52:34 +00:00
Abdul Malik Ikhsan cb1473a3ac
[Renaming] Do not rename class with same name inside different namespace on RenameClassRector (#2455)
* Another failing test for #7209

* fixture

* fixture

* Closes #2452

* try

* try

* back

* Fixed 🎉

* final touch: add example used in union

Co-authored-by: Einar Gangsø <mail@einargangso.no>
2022-06-09 09:32:19 +02:00
Abdul Malik Ikhsan ba48cd2d87
[Core] Ensure re-index node attributes (stmts, params, uses, args) on ChangedNodeScopeRefresher (#2458) 2022-06-09 08:21:09 +02:00
Abdul Malik Ikhsan ff931e4b74
[CodingStyle] Skip non-empty-string on VarConstantCommentRector (#2451) 2022-06-09 08:09:34 +02:00
Abdul Malik Ikhsan 17b86d4b77
[CodeQuality] Remove unnecessary check next return removed no SimplifyIfElseToTernaryRector (#2457) 2022-06-09 08:02:39 +02:00
Abdul Malik Ikhsan 6c8b3dc9f8
[DeadCode][PHPUnit] handle crash on RemoveJustPropertyFetchForAssignRector+SimplifyForeachInstanceOfRector (#2453)
* [DeadCode][PHPUnit] handle crash on RemoveJustPropertyFetchForAssignRector+SimplifyForeachInstanceOfRector

* Fixed 🎉
2022-06-08 07:48:55 +02:00
Abdul Malik Ikhsan 1a84313089
[Renaming] Skip rename docblock on conflict with alias on RenameClassRector (#2450)
* Another failing test for #7209

* fixture

* Closes #2448

* [ci-review] Rector Rectify

* clean up

* final touch: clean up

* final touch: clean up

Co-authored-by: Einar Gangsø <mail@einargangso.no>
Co-authored-by: GitHub Action <action@github.com>
2022-06-07 14:47:02 +02:00
Tomas Votruba 5e3c2e71e0 exclude polyfills in generics way from php-scoper docs 2022-06-07 12:33:14 +02:00
Abdul Malik Ikhsan 68b2dbfaf6
[Scoped] Update build script with no need define php 8.0 setup (#2449) 2022-06-07 09:57:47 +00:00
Tomas Votruba cbbe410aff string prefixing is still needed 2022-06-07 11:40:07 +02:00
Tomas Votruba a9779404d3 try without prefixing string classes 2022-06-07 11:32:53 +02:00
Tomas Votruba 8b66dc8439 remove slashed covered 2022-06-07 11:26:58 +02:00
Tomas Votruba d4b7b48e6d
[scoped] Build with Scoper 0.17.2 (#2445)
* remove ScoperOption, not helpful

* try Scoper 0.17.2

* use dedicated repository

* expose helper functions

* add exclude ns

* expose normalizer

* try to fix import

* container ocnfigurator

* unpreifx file info for real

* expose container configuraotr

* deploy to original repository

* complete polyfill list

* expose rector running constant

* slash

* skip RuleDefinition explicitly
2022-06-07 11:23:53 +02:00
Tomas Votruba 39c7ae65e9 return 2022-06-07 09:34:38 +02:00
Tomas Votruba 145096b208 [scoper] try removing self/parent/static patch 2022-06-07 09:26:40 +02:00
Abdul Malik Ikhsan 4f07a4f30f
[Php74] Remove ReservedFnFunctionRector (#2447)
* [Php74] Remove ReservedFnFunctionRector

* unregister rule

* phpstan
2022-06-07 08:34:00 +02:00
Tomas Votruba 0c16eb2ad9 remove old CI check 2022-06-06 22:44:25 +02:00
Tomas Votruba f261e0fea9 fix cs 2022-06-06 19:42:11 +02:00
Tomas Votruba ae4e6ac61b remove unused ScoperOption 2022-06-06 19:42:03 +02:00
Tomas Votruba 1d577017ee [CI] use no diffs to clean the output 2022-06-06 19:38:10 +02:00
Tomas Votruba c71f34afbe remove old test 2022-06-06 19:29:53 +02:00
Tomas Votruba bd0104d6c6
[DX] Detach typo3 from core to allow stable growth of both packages (#2446)
* remove old init command docs

* detach typo3 from core, for very specific domain and many direct BC breaks from rector

* cleanup scoper

* remove downgrade of enum package, as not used anymore

* remove non-existing directory
2022-06-06 19:28:24 +02:00
Tomas Votruba 0eba231b07
[PHP 8.1] Move ConstantListClassToEnumRector to PHP 8.1 (#2444) 2022-06-06 15:48:45 +00:00
Tomas Votruba ddd88a8800
[DX] Remove symlinks option to require safe way of providing explicit paths (#2443) 2022-06-06 13:27:00 +02:00
Tomas Votruba 38a9718b52
[CS] Fix dynamic and broken indent detection, allow to configure spacing via RectorConfig::indent() method (#2442) 2022-06-06 11:51:58 +02:00