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

[TASK] Switch to use ssch/typo3-rector ^2.3 #261

Merged
merged 5 commits into from
May 4, 2024
Merged

[TASK] Switch to use ssch/typo3-rector ^2.3 #261

merged 5 commits into from
May 4, 2024

Conversation

linawolf
Copy link
Member

@linawolf linawolf commented May 1, 2024

Apply Rector for TYPO3 v13
Fix cgl

Releases: main

Copy link
Contributor

@brotkrueml brotkrueml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to import namespaces via "use" instead of using FQCNs.

Also, commit message: Not rector is updated, but TYPO3-rector now used instead. Rector version 2.3 does not exist.

@linawolf linawolf changed the title [TASK] Update rector to ^2.3 [TASK] Switch to use ssch/typo3-rector ^2.3 May 1, 2024
@linawolf
Copy link
Member Author

linawolf commented May 1, 2024

The php-cs-fixer is strangely configured. Usually it is supposed to clear up such things as the FQN. Should I try to improve the cs-fixer within this PR or in a follow up?

@brotkrueml
Copy link
Contributor

The php-cs-fixer is strangely configured. Usually it is supposed to clear up such things as the FQN. Should I try to improve the cs-fixer within this PR or in a follow up?

As you know, I prefer focusing on one topic ;-)

@linawolf
Copy link
Member Author

linawolf commented May 2, 2024

As you know, I prefer focusing on one topic ;-)

So we will deal with improved CS fixing in another PR. Please concentrate on Rector here

@linawolf
Copy link
Member Author

linawolf commented May 2, 2024

I think I was able to clear it up. It is not the cs-fixer who is responsible but rector. I enabled

->withImportNames()

Now.

Configuration/Backend/AjaxRoutes.php Outdated Show resolved Hide resolved
Configuration/RequestMiddlewares.php Outdated Show resolved Hide resolved
ext_emconf.php Outdated Show resolved Hide resolved
rector.php Outdated Show resolved Hide resolved
rector.php Outdated Show resolved Hide resolved
Copy link
Contributor

@brotkrueml brotkrueml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, if rector / typo3-rector works with TYPO3 v13.1? There is a conflict between nikic/php-parser: v13.1 uses v5, whereas rector uses v4 (and not compatible yet with v5). So, I assume, TYPO3 v13.0.1 is used on dev-locally and on CI.
Currently, on my extensions, I am deactivating/removing rector because of this conflict (no recent TYPO3 v13 installable).

rector.php Outdated Show resolved Hide resolved
rector.php Outdated Show resolved Hide resolved
@linawolf
Copy link
Member Author

linawolf commented May 3, 2024

There was just a discussion about this https://typo3.slack.com/archives/C019R5LAA6A/p1714647866307099 I hit the problem in the blog-extension. It might be a good idea to use the current suggestion of kevin appelt, it is just I am not sure how to do that

@brotkrueml
Copy link
Contributor

brotkrueml commented May 3, 2024

There was just a discussion about this https://typo3.slack.com/archives/C019R5LAA6A/p1714647866307099 I hit the problem in the blog-extension. It might be a good idea to use the current suggestion of kevin appelt, it is just I am not sure how to do that

Sadly, rector does not provide a phar, so we cannot use phive for that. So, one solution may be like outlined in the link above.

Levels can be raised step by step in follow-ups

We need to get rid of the outdated XClass extension, but don't have a replacement yet, that is why I left it in for now.

run with
Build/Scripts/runTests.sh -s phpstan

Generate baseline with
Build/Scripts/runTests.sh -s phpstanBaseline
@linawolf linawolf merged commit 6756221 into main May 4, 2024
10 checks passed
@linawolf linawolf deleted the task/rector branch May 4, 2024 11:50
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.

3 participants