sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

Fixing parser not recognizing single chars aliases or tables

Open iifawzi opened this issue 3 years ago • 2 comments

Fixing: #327 and #378 Signed-off-by: iifawzi [email protected]

iifawzi avatar Aug 19 '22 14:08 iifawzi

Codecov Report

Base: 95.64% // Head: 95.66% // Increases project coverage by +0.02% :tada:

Coverage data is based on head (395c533) compared to base (8fddb4b). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #385      +/-   ##
============================================
+ Coverage     95.64%   95.66%   +0.02%     
- Complexity     2144     2156      +12     
============================================
  Files            67       67              
  Lines          4548     4569      +21     
============================================
+ Hits           4350     4371      +21     
  Misses          198      198              
Impacted Files Coverage Δ
src/Lexer.php 99.73% <100.00%> (+0.01%) :arrow_up:
src/TokensList.php 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Aug 19 '22 14:08 codecov[bot]

Regarding phpstan, I think we would need to update the baseline, what do you think @williamdes?

iifawzi avatar Aug 19 '22 14:08 iifawzi

Note: When this gets merged please hard reset your master branch to phpmyadmin/sql-parser#master and use specific branch names for your PRs ;)

williamdes avatar Nov 17 '22 15:11 williamdes

Yes, i've mistakenly used the master branch here, I will make sure to do this after this get merged

iifawzi avatar Nov 17 '22 16:11 iifawzi

Can you squash your commits on the next push ?

williamdes avatar Nov 20 '22 09:11 williamdes

Since it affects the lexer, I agree that it's potentially risky. But still, the risks that this might introduce are minimal since we're only changing the token type in very specific cases, and otherwise it's kept as it's.

Anyway, this's not an emergency yes, it can for sure wait for the next release.

iifawzi avatar Nov 21 '22 10:11 iifawzi