Skip to content

Downgrade Jetbrains\PhpStorm\Language via DowngradeAttributeToAnnotationRector#36

Merged
TomasVotruba merged 1 commit intomainfrom
downgrade-jetbrains
Jan 18, 2023
Merged

Downgrade Jetbrains\PhpStorm\Language via DowngradeAttributeToAnnotationRector#36
TomasVotruba merged 1 commit intomainfrom
downgrade-jetbrains

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik samsonasik commented Jan 18, 2023

@TomasVotruba this is to resolve downgrade build on rector-src:

Downgrade build failure seems unrelated:

------------------------------------------------------------
Parse error: rector-prefixed-downgraded/vendor/nette/utils/src/Utils/Arrays.php:171
    169|      */
    170|     public static function grep(array $array, #[\JetBrains\PhpStorm\Language('RegExp')] string $pattern, int $flags = 0) : array
  > 171|     {
    172|         return Strings::pcre('preg_grep', [$pattern, $array, $flags]);
    173|     }
Unexpected '{', expecting variable (T_VARIABLE) in rector-prefixed-downgraded/vendor/nette/utils/src/Utils/Arrays.php on line 171
------------------------------------------------------------
Parse error: rector-prefixed-downgraded/vendor/nette/utils/src/Utils/Strings.php:399
    397|      */
    398|     public static function split(string $subject, #[\JetBrains\PhpStorm\Language('RegExp')] string $pattern, int $flags = 0) : array
  > 399|     {
    400|         return self::pcre('preg_split', [$pattern, $subject, -1, $flags | \PREG_SPLIT_DELIM_CAPTURE]);
    401|     }
Unexpected '{', expecting variable (T_VARIABLE) in rector-prefixed-downgraded/vendor/nette/utils/src/Utils/Strings.php on line 399

seems due to new nette/utils release https://github.com/nette/utils/releases/tag/v3.2.9

see https://github.com/rectorphp/rector-src/actions/runs/3948109106/jobs/6757715096#step:14:71

I don't know if there is @language Annotation, but I think it can be solution for downgrading nette/utils.

@samsonasik
Copy link
Copy Markdown
Member Author

@TomasVotruba the pending workflows can be removed:

 code_analysis / Active Classes Expected — Waiting for status to be reported 

CI should be All green after that 👍

@TomasVotruba
Copy link
Copy Markdown
Member

The active classes should be fixed later, the paths should be in easy-ci.php config. I'll handle it

Thanks 👍

@TomasVotruba TomasVotruba merged commit 0f21531 into main Jan 18, 2023
@TomasVotruba TomasVotruba deleted the downgrade-jetbrains branch January 18, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants