-
Notifications
You must be signed in to change notification settings - Fork 80
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
Reworking API internals #24
Comments
I suggest starting a new 'refactor' branch for these and related changes. There are a number of thing I'd like to see improved as well, such as the parser, support for character substitution in the Tex files and namespaces. I'm also keen to trying to achieve 100% unittest coverage. I'd liked to support at least the latest 5.x PHP version, but otherwise don't mind restructuring everything. Do note that the hyphenation part of this library has been heavily performance profiled and optimized, so I'd rather not touch the actual algorithms. Considering the recent flurry of activity, now might be a good time for an overhaul. I'm currently spending most of my time doing a similar overhaul of another github project, but will have ample time to devote to this in a couple of weeks. |
I've started a |
As for a PSR-6 implementation. I prefer https://packagist.org/packages/symfony/cache, basically because it's by far the most popular and I use Laravel in daily live, which heavily borrows from Symfony. Your thoughts? |
I would like to discuss and track changes to the project in this ticket regarding an update to the internals and adding the possibility for more interchangeable Components like PSR-6 Caching without breaking legacy compatibility as mentioned in #18.
I extracted the public facing API of the Syllable class into an interface which one of the new components would have to adhere to so we keep compatibility.
Each commented block of functions should get it's own implementation handler classes. Like the hyphening algorithm and the html processing etc. So we clean all the logic from that "master class" we currently have.
To tackle the problem with the class namespacing for legacy projects I would suggest modifying the project autoloader. There we could, a bit like the Twig project does in their class files, register
class_alias
to the old Syllable class names. We also need to add at least PSR-0 or PSR-4 compatible autoloading for those not using composer.I would say this whole rework should have multiple stages.
hyphenate($text, $language)
or so the rest should be initialization work, where as languages would have to be registered to be known in the proccess)What are your thoughts on this? Did I miss something important? Or would you tackle the whole problem in another way?
The text was updated successfully, but these errors were encountered: