-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added fast isset() path to token->equals() #4041
Closed
Closed
Conversation
This file contains 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
# Conflicts: # src/Console/Application.php
* 2.12: Fix typos in changelog
…or ext-mbstring aliasses (SpacePossum) This PR was squashed before being merged into the 2.13-dev branch (closes PHP-CS-Fixer#3841). Discussion ---------- NoAliasFunctionsFixer - add opt in option for ext-mbstring aliasses closes PHP-CS-Fixer#3840 Commits ------- 5120a08 NoAliasFunctionsFixer - add opt in option for ext-mbstring aliasses
* 2.12: Update integrations tests
* 2.12: "yield from" as keyword
…e as "count". (SpacePossum) This PR was merged into the 2.13-dev branch. Discussion ---------- PhpUnitDedicateAssertFixer - fix "sizeOf" same as "count". @ see PHP-CS-Fixer#3785 (comment) Commits ------- 67d4f8c PhpUnitDedicateAssertFixer - fix "sizeOf" same as "count".
* 2.12: Update composer.json Fix priority between PHPDoc return type fixers
…fix strategy (SpacePossum) This PR was merged into the 2.13-dev branch. Discussion ---------- BinaryOperatorSpacesFixer - Add "no space" fix strategy closes PHP-CS-Fixer#3827 also prepares for merging the `space around concat` fixers into the BinaryOperatorSpacesFixer Commits ------- 9fa2263 BinaryOperatorSpacesFixer - Add "no space" fix strategy
* 2.12: SpaceAfterSemicolonFixer - loop over all tokens
* 2.12: Add install/update using PHIVE instructions to README
* 2.12: NativeConstantInvocationFixer - better constant detection
# Conflicts: # src/Console/Application.php
* 2.12: Add priority to AlignMultilineCommentFixer
* 2.12: ArrayIndentFixer - Don't indent empty lines
* 2.12: NoExtraBlankLinesFixer - remove blank lines after open tag
* 2.12: StrictParamFixer - make it case-insensitive
* 2.12: PhpdocNoEmptyReturnFixer - fix docs
* 2.12: FunctionsAnalyzer - false positive for constant and function definition
* 2.12: DX: simplifying return expression in FunctionsAnalyzer
Symfony wants this fixer applied for compiler-optimized functions.
…he Symfony:risky ruleset (stof) This PR was merged into the 2.13-dev branch. Discussion ---------- Add the native_function_invocation fixer in the Symfony:risky ruleset Symfony wants this fixer applied for compiler-optimized functions (we were the ones requesting the feature). Commits ------- 8556bee Add the native_function_invocation fixer in the Symfony:risky ruleset
* 2.12: DX: cleanup - remove special treatment for PHP <5.6
# Conflicts: # .php_cs.dist
# Conflicts: # src/Console/Application.php
This PR was squashed before being merged into the 2.13-dev branch (closes PHP-CS-Fixer#3886). Discussion ---------- Add PhpUnitMethodCasingFixer Closes PHP-CS-Fixer#3302 ```diff class MyTest extends \PhpUnit\FrameWork\TestCase { - public function test_my_code() {} + public function testMyCode() {} } ``` - [x] Implement base fixer - [x] Take care of `@depends` - [x] Run after `PhpUnitTestAnnotationFixer` - [x] Deprecate `PhpUnitTestAnnotationFixer` *case* config Commits ------- b87f254 Add PhpUnitMethodCasingFixer
…SpacePossum) This PR was merged into the 2.13-dev branch. Discussion ---------- Add FopenFlagOrderFixer & FopenFlagsFixer closes PHP-CS-Fixer#3417 ping @ntzm , hope you can help me out with: - define the order of all flags - ~do we want to have an option to remove flags when found, like `t`~ - ~do we want to have an option to add flags when not found, like `b`~ Commits ------- 8682d86 Add FopenFlagOrderFixer & FopenFlagsFixer
This PR was squashed before being merged into the 2.13-dev branch (closes PHP-CS-Fixer#3979). Discussion ---------- DX: enable php_unit_method_casing Appendix for PHP-CS-Fixer#3886 Commits ------- 3fff21a DX: enable php_unit_method_casing
This PR was merged into the 2.13-dev branch. Discussion ---------- Add MagicMethodCasingFixer ``` $ php php-cs-fixer describe magic_method_casing Description of magic_method_casing rule. Magic method definitions and calls must be using the correct casing. Fixing examples: * Example PHP-CS-Fixer#1. ---------- begin diff ---------- --- Original +++ New @@ -1,7 +1,7 @@ <?php class Foo { - public function __Sleep() + public function __sleep() { } } ----------- end diff ----------- * Example PHP-CS-Fixer#2. ---------- begin diff ---------- --- Original +++ New @@ -1,2 +1,2 @@ <?php -$foo->__INVOKE(1); +$foo->__invoke(1); ----------- end diff ----------- ``` Commits ------- e45919f Add MagicMethodCasingFixer
This PR was squashed before being merged into the 2.13-dev branch (closes PHP-CS-Fixer#3826). Discussion ---------- Add CombineNestedDirnameFixer Input: ```php dirname(dirname(dirname($path))); ``` is fixed to: ```php dirname($path, 3); ``` (Requires PHP >= 7.0) Commits ------- 398f343 Add CombineNestedDirnameFixer
This PR was squashed before being merged into the 2.13-dev branch (closes PHP-CS-Fixer#3907). Discussion ---------- Add ImplodeCallFixer Resolves PHP-CS-Fixer#3904 Adding to `@Symfony` rule set was suggested by @keradus. Commits ------- f063eae Add ImplodeCallFixer
* 2.12: Clarifies allow-risky usage
looking up the existance of a property via isset() is waaaaay faster then array_key_exists(). we still need array_key_exists() as a fallback, when properties exist with a null-value to work properly. this case is very rare, therefore this can be considered a speedup.
(Try a rebuild) |
re-submitted with new merge-base |
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.
looking up the existance of a property via isset() is waaaaay faster then array_key_exists().
we still need array_key_exists() as a fallback, when properties exist with a null-value to work properly. this case is very rare, therefore this can be considered a speedup.
this change speeds up php-cs-fixer by 5.6%.