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

feature: [PHP8.2] Support for readonly classes #6745

Merged

Conversation

Wirone
Copy link
Member

@Wirone Wirone commented Jan 9, 2023

Fixes #6604.

These are changes initially proposed by SpacePossum in #6624 but abandoned due to personal reasons. Since it's accepted by the author to use these changes, I've just applied the full patch, so we can continue work.

@Wirone Wirone changed the title [PHP8.2] Support for readonly classes feature: [PHP8.2] Support for readonly classes Jan 9, 2023
@keradus
Copy link
Member

keradus commented Jan 9, 2023

is it easily possible to split the commit into what Space' provided and new changes separately? now, you kind of ask for review everything from scratch :(

@Wirone
Copy link
Member Author

Wirone commented Jan 9, 2023

@keradus this is only patch applied from @SpacePossum's commit taken from here, no new changes. I wanted to check if it passes on newest master and provide changes if required. At this point it is 1:1 with #6624 🙂

@coveralls
Copy link

coveralls commented Jan 9, 2023

Pull Request Test Coverage Report for Build 4283243810

  • 82 of 98 (83.67%) changed or added relevant lines in 10 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 92.906%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Tokenizer/TokensAnalyzer.php 16 18 88.89%
src/Fixer/AbstractPhpUnitFixer.php 0 4 0.0%
src/Fixer/ClassNotation/ClassDefinitionFixer.php 27 37 72.97%
Totals Coverage Status
Change from base Build 4277061626: -0.04%
Covered Lines: 22735
Relevant Lines: 24471

💛 - Coveralls

@kubawerlos kubawerlos added the topic/PHP8.2 Related to features available in PHP 8.2+ label Jan 21, 2023
tests/Tokenizer/TokensAnalyzerTest.php Outdated Show resolved Hide resolved
tests/Tokenizer/TokensAnalyzerTest.php Outdated Show resolved Hide resolved
tests/Tokenizer/TokensAnalyzerTest.php Outdated Show resolved Hide resolved
tests/Fixer/ClassNotation/FinalInternalClassFixerTest.php Outdated Show resolved Hide resolved
@Wirone
Copy link
Member Author

Wirone commented Feb 27, 2023

FYI: Sorry for lack of response, I did not have time lately, but I'll try to look at it later today 🙂

SpacePossum and others added 2 commits February 27, 2023 13:20
These are changes initially proposed by SpacePossum in PHP-CS-Fixer#6624 but abandoned due to personal reasons. Since it's accepted by the author to use these changes, I've just applied the full patch, so we can continue work.
@Wirone Wirone force-pushed the codito/6604-support-for-readonly-classes branch 2 times, most recently from 1e99e74 to a59ea7b Compare February 27, 2023 12:52
I wanted to commit suggestion from Github, but it would fail in tests (expected output had to be changed too).
@Wirone Wirone force-pushed the codito/6604-support-for-readonly-classes branch from 352ad95 to 12daa46 Compare February 27, 2023 14:08
@keradus
Copy link
Member

keradus commented Feb 28, 2023

big thanks @SpacePossum and @Wirone , as well as @kubawerlos for nice review!

@keradus keradus merged commit d611a46 into PHP-CS-Fixer:master Feb 28, 2023
@SpacePossum
Copy link
Contributor

nice one @Wirone 👍 🎉

@Wirone Wirone deleted the codito/6604-support-for-readonly-classes branch March 1, 2023 07:11
@Wirone
Copy link
Member Author

Wirone commented Mar 1, 2023

To be fair, it's all thanks to @SpacePossum - I only did maintenance work to refresh the branch and fixed little issues to align the code with current CS rules. Anyway, happy that readonly classes support got merged 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/PHP8.2 Related to features available in PHP 8.2+
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PHP8.2] Support for readonly classes
5 participants