Commit 741d418
committed
minor symfony#61721 [TypeInfo] improve BuiltinType::isIdentifiedBy() method performance (landure)
This PR was merged into the 7.3 branch.
Discussion
----------
[TypeInfo] improve BuiltinType::isIdentifiedBy() method performance
Improve `isIdentifiedBy` method performance by replacing unnecessary `TypeIdentifier` backed enum instantiation by an identity test between a string identifier and its value.
| Q | A
| ------------- | ---
| Branch? | 7.3
| Bug fix? | yes
| New feature? | no <!-- if yes, also update src/**/CHANGELOG.md -->
| Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md -->
| Issues | Fix symfony#61720
| License | MIT
<!--
🛠️ Replace this text with a concise explanation of your change:
- What it does and why it's needed
- A simple example of how it works (include PHP, YAML, etc.)
- If it modifies existing behavior, include a before/after comparison
Contributor guidelines:
- ✅ Add tests and ensure they pass
- 🐞 Bug fixes must target the **lowest maintained** branch where they apply
https://symfony.com/releases#maintained-symfony-branches
- ✨ New features and deprecations must target the **feature** branch
and must add an entry to the changelog file of the patched component:
https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
- 🔒 Do not break backward compatibility:
https://symfony.com/bc
-->
Commits
-------
caf9dc8 [TypeInfo] simplify identifier comparison in isIdentifiedBy method1 file changed
+1
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 44 | + | |
53 | 45 | | |
54 | 46 | | |
55 | 47 | | |
| |||
0 commit comments