Add Support for Alphanumeric CNPJ#1644
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1644 +/- ##
============================================
+ Coverage 99.00% 99.53% +0.53%
+ Complexity 962 929 -33
============================================
Files 197 190 -7
Lines 2214 2170 -44
============================================
- Hits 2192 2160 -32
+ Misses 22 10 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
@valdeirpsr thanks for your contribution! 🐼
Support for the alphanumerical format would be nice to mention in the documentation (Cnpj.md file). This is not required for us to accept the change, but I believe it's a nice to have.
I'll give some time for other maintainers to review it as well.
Once we're done with reviews and modifications, are you willing to rebase it into a single commit?
henriquemoody
left a comment
There was a problem hiding this comment.
Thank you for the contribution, @valdeirpsr! 🐼
We don't use conventional commits, could you squash all your comments into a single one, that just describes what and why these changes we made? It would be awesome! It's okay if you don't do that, but we will squash it ourselves.
a93fe57 to
c3abe8a
Compare
Sure! Change made. |
|
@valdeirpsr can you run It will automatically adjust documentation to conventions and also update the |
346e347 to
4feb662
Compare
|
@henriquemoody can I merge this one? |
|
It's still using conventional commit message, but it's fine. Until we have an actual check I find it unfair to expect that from contributors |
|
So, yes, by all means! |
|
@valdeirpsr I'll wait for a little more. If you can reformat the commit title (just drop the Thanks for your patience with us, and again, thanks for the contribution! 🐼 |
Due to the continuous increase in the number of companies and the imminent exhaustion of available CNPJs (Brazilian taxpayer identification numbers), the Brazilian Federal Revenue Service is instituting the alphanumeric CNPJ. The initiative aims to facilitate the identification of all companies and improve the business environment, contributing to the economic and social development of Brazil. The alphanumeric CNPJ will be assigned, starting in July 2026, exclusively to new registrations. Changes: - Add support for alphanumeric CNPJ validation - Format code according to PHPCS standards - Simplify CNPJ conversion to uppercase character array - Add documentation about CNPJ structure
Ops!! The change has been made. I'm sorry for any minor mistakes. |
|
Thank you for contributing, @valdeirpsr ! |
Adds validation and tests for new CNPJ registrations, which will accept alphanumeric characters starting from July 2026.
The change was instituted through "Instrução Normativa RFB nº 2.119/2022".