Repository navigation
chore(deps): update dependency dresscode/dresscode to v1.4.0 - #347
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.3.3→1.4.0Release Notes
dg/dresscode (dresscode/dresscode)
v1.4.0: Released version 1.4.0Compare Source
Starting with DressCode no longer means writing a configuration.
dresscode initmeasures your code and writes one that fits it, and a project coming from PHP CS Fixer, PHP_CodeSniffer or Laravel Pint brings its configuration and its suppression comments along.dresscode init– takes the measurements of your code (indentation, line width, quotes, where a condition spread over lines begins and ends, and every other decision), picks the standard closest to it and writes adresscode.neonmade to measure, with the scope your formatter or git already knows and generated files and test data left out. Where the code leaves a choice open, it asks, showing what the fix would do to a real place in your code;--dry-runonly prints the proposal,--yestakes the recommended answerssymfonyandlaravel– the Symfony Coding Standards as the@Symfonyset of PHP CS Fixer has them, and the style Laravel Pint writes by default, besideperCs,psr12andnettedresscode migrate config– finds the configuration of PHP CS Fixer, PHP_CodeSniffer (Slevomat included) or Laravel Pint the project runs, translates its rules and their options todresscode.neonand lists at the end of the file what it could not carry over.explainand the catalogue show the names each decision has in those toolsphpcs:ignore,phpcs:disable/enable,phpcs:ignoreFileand@phpcsSuppresssilence the decisions their sniff translates to, so the code needs no change on the first day;dresscode migrate suppressionsrewrites them todresscode:ignorewhenever you likedresscode-baseline.neonin the root applies without the configuration naming it, and the header ofchecksays which baseline is in use. A baseline the configuration names must now existv1.3.4: Released version 1.3.4Compare Source
✨ New Features
checktoo long for one screen now ends with what to read first: the few decisions most of its violations break, with their counts, and how many of themdresscode fixrepairsforbiddenin every standard??or|>too wide spreads its operands as it does for the other operators,[perLine, fill]in every standard.netteleaves??out of the width, so?? throw new …stays on the line of the value it guardsround($x) == 0becomesround($x) === 0.0. NeedstypeAnalysis: phpstan$posts ? reset($posts) : nullinto plainarray_first($posts)and$x = explode(…); $x = end($x);into one$x = array_last(explode(…));. Its fix is risky only where the internal pointer or an empty array can really matterforbiddensuch a comment takes the indentation of the line below, now without doubling the indentation left after//🐛 Bug Fixes
composer.jsonallows: what a later version of PHP or of a package deprecated is neither rewritten nor reported while the code must still run on the older one, where the replacement may be missing. Likewise@deprecatedcounts only in a package installed at its lowest allowed version<?php if ($a): ?> … <?php endif ?>around markup as it is, and braces.bracelessBody gives<?php foreach ($items as $v) echo $v; ?>its braces on that line instead of spreading the body through the markupdresscode.neonwhose whole content is commented out loads as if it were not thereOld::classonly as a risky fix where it is data (an operand of===, amatcharm, a needle ofin_array(), an array key), as the new name changes what such code comparestypeAnalysis: phpstan, a project whosebootstrapFilesload its own autoload with an olderphpstan/phpdoc-parserruns without errorsor,andorxor, and in the head of aforeach, whose iterated array spreads before what followsas🛡️ Robustness
--jobs 1) runs stable toopublic $a, $b;Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.