-
-
Notifications
You must be signed in to change notification settings - Fork 356
[Icons] Prepare lock / warmup optimization #2351
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
Conversation
First usage of symfony#2351 with the import command Next steps: * lock * warm-up :)
src/Icons/src/Iconify.php
Outdated
throw new \InvalidArgumentException('Invalid icon names.'); | ||
} | ||
|
||
// 500 chars max | ||
// 42 chars: https://api.iconify.design/mdi.json?icons= | ||
if (450 < \strlen($queryString)) { | ||
throw new \InvalidArgumentException('The query string is too long.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use dedicated exception classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the plan to catch this? (I typically only add named exceptions if this is the case - or it's realistic an end-user would want to catch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah I don't think so, but I like to have dedicated exceptions and also a base exception class per package (like they do on Symfony components)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on every component to be far... ;)
Yet I kinda agree to use custom exception but this should be done in a dedicated PR i think, carefully selecting the one we want to "migrate" and the one we do not.
To explain myself here, this is internal and "should never" happen.
But as we all know what "should never" means... i get your point.
2d57049
to
218c000
Compare
First usage of symfony#2351 with the import command Next steps: * lock * warm-up :)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Icons] Fetch icons in batch in Import command | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Issues | Fix #... | License | MIT First usage of #2351 with the import command --- **Update:** - add icons counts (imported / total) - handle same-prefix icons per batch - improve visual feedback <img width="878" alt="Capture d’écran 2024-11-09 à 19 26 16" src="https://github.com/user-attachments/assets/fc6c377e-ba40-43f3-b62a-0070ba14125b"> --- Next ones: * lock * warm-up Commits ------- 88d24e0 [Icons] Fetch icons in batch in Import command
Method needed for both