Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

[EasyCodingStandard] smaller sets over random imports + add BlankLineAfterStrictTypesFixer #443

Merged
merged 31 commits into from Nov 16, 2017

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Nov 14, 2017

Related Changes

  • dropped FinalTestCase, use SlamCsFixer\FinalInternalClassFixer instead
  • added BlankLineAfterStrictTypesFixer

Todo

if ($this->skipper->shouldSkipCodeAndFile($fullyQualifiedCode, $this->path)) {
return false;
}

$this->addError($error, $stackPtr, $code, $data, $severity, true);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe instead of your fix there should be

return $this->addError($error, $stackPtr, $code, $data, $severity, true) && $this->isFixer;

What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

It felt bit weird to create duplicated code. This could be nicer.
Could you change it here? Just browser edit will do

@TomasVotruba
Copy link
Member Author

@enumag I've failed to rebase on pull :/, so I've added your commit manually.

@TomasVotruba TomasVotruba changed the title [EasyCodingStandard] smaller sets over random imports [EasyCodingStandard] smaller sets over random imports + add BlankLineAfterStrictTypesFixer Nov 15, 2017
@TomasVotruba TomasVotruba merged commit 7a4c8b7 into master Nov 16, 2017
@TomasVotruba TomasVotruba deleted the ecs-clean-sets branch November 16, 2017 00:24
@enumag
Copy link
Member

enumag commented Nov 29, 2017

@TomasVotruba Can we backport this fix to 2.5? I tried to use 3.0-RC but you're still making BC breaks like removing sniffs so I'd like to stick to 2.5 until it's stable. With such changes 3.0 is alpha at best, I'd not call it RC.

@TomasVotruba
Copy link
Member Author

@enumag Sure. Feel free to create such branch and release patch tag with it.

I recommend to wait until Symfony 4 is out.

As for naming, I could try alpha next time. How should I name 2nd, 3rd, 4th etc. such version?

@enumag
Copy link
Member

enumag commented Nov 29, 2017

@TomasVotruba Ok I'll send a PR on Friday after SF4 is our. According to semver it should be like v3.0.0-alpha.2, similarly RC should be like v3.0.0-rc.1. While the dot is in all their examples it is not necessary. Composer works fine with versions like v3.0.0-alpha2 too.

@enumag
Copy link
Member

enumag commented Nov 29, 2017

@TomasVotruba Also can I ask you for write access? I can't create the 2.5 branch without permissions...

@TomasVotruba
Copy link
Member Author

@enumag I've added you to collaborators with write access

@enumag
Copy link
Member

enumag commented Dec 2, 2017

Thanks. I cherry-picked and pushed the commit to the 2.5 branch. v2.5.9...2.5

I'll try it on monday in my app to see if there is any other issue I need to fix in 2.5. Should I then tag 2.5.10 myself or leave that to you? I assume the tag will automatically appear in all the read-only repos?

@TomasVotruba
Copy link
Member Author

TomasVotruba commented Dec 2, 2017

Great job! Feel free to tag yourself.

To subsplit to single repositories, there is https://github.com/Symplify/Symplify/blob/master/build/subtree-split-master-and-last-tag.sh

For speed reasons, it only includes master and last tag (not sure it by time or number), so maybe you'd have to modify it to include 2.5.10.

@enumag
Copy link
Member

enumag commented Dec 4, 2017

Well I thought that this would do the trick but it did not. I'm not sure how to fix it.

EDIT: Oh maybe it would work but didn't because the build failed?

@TomasVotruba
Copy link
Member Author

TomasVotruba commented Dec 5, 2017

I did the subsplist with no effect. So I looked for the tag on monorepo I don't see the tag in releases: https://github.com/Symplify/Symplify/releases

Where is it?

@enumag
Copy link
Member

enumag commented Dec 5, 2017

I didn't tag it yet. The problems right now are that the 2.5 branch was not pushed to the split repos, locally one test is failing on that branch and there is no travis build for that branch. I can't tag without tests passing.

@TomasVotruba
Copy link
Member Author

I see.

I've enabled "branch builds" check on Travis. 2.5 is now there
https://travis-ci.org/Symplify/Symplify/branches

@enumag
Copy link
Member

enumag commented Dec 6, 2017

Thanks!

Ok travis is running and build is passing now. But the subsplit doesn't seem to work for that branch. How is the split command triggered? I thought it was on successful travis build but there is nothing about that in .travis.yml.

@TomasVotruba
Copy link
Member Author

You're welcome.

The command is run manually, because it would require to add github API access keys and it's super slow.
But if you prepare working manual for me, I can add it.

I can do it manually after you tag it.

@enumag
Copy link
Member

enumag commented Dec 6, 2017

Oh. In that case I'm not quite sure if this change is correct. Maybe it should not have been changed and the script in master should be changed instead to --heads="master 2.5"? I'm not familiar with subsplit and how exactly you run it - like whether or not you need to checkout the branch you want to split before you run the command.

@TomasVotruba
Copy link
Member Author

TomasVotruba commented Dec 6, 2017

If you need to publish only single tag, you'd have to name it explicitly:

git subsplit publish --tags=2.5.10 packages/EasyCodingStandard:git@github.com:Symplify/EasyCodingStandard.git

At the moment only tag of Symplify\Symplify. I will handle the rest.

I see it's too complicated to explain here. I can explain it in person under 10 minutes 👍

@enumag
Copy link
Member

enumag commented Dec 6, 2017

Ok I reverted that commit and tagged the release. https://github.com/Symplify/Symplify/releases/tag/v2.5.10

@TomasVotruba
Copy link
Member Author

@enumag
Copy link
Member

enumag commented Dec 6, 2017

@TomasVotruba Thank you! 👍

@TomasVotruba
Copy link
Member Author

You're welcome

@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Oct 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants