Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade Jetbrains\PhpStorm\Language via DowngradeAttributeToAnnotationRector #36

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

samsonasik
Copy link
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
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
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.

None yet

2 participants