Open AlgorithMan-de opened 8 years ago
Nitpick: would lime\
or Lime\
be better?
(As a side note: I notice GitHub doesn't mark that commit as yours. Have you added its email address to your account?)
On sourceforge it's LIME... wondering why sourceforge is still the main repo though?
github probably didn't mark the commit as mine because I used an SSH key that has "E-Mail address" viktor@viktor or so... that's a bit stupid on githubs side there...
It hasn't cared about the SSH key for me, but maybe it does. Looking at the raw commit, your git author info is Viktor Engelmann <viktor.engelmann@qt.io>
. Do you have that email on your GitHub account?
no, I didn't - changed that :) thanks
I would suggest implementing support for autoloader (PSR-4), because you probably want to use Lime as a library for a project and not as a standalone tool.
Do I understand you correctly that you suggest naming the files & directories according to PSR-4, so that you don't have to explicitly include the files, because the file dirs & names can be deduced from the class name and can be loaded automatically? I personally don't mind loading the files explicitly, because you only need to include 2-3 files and I don't think you'll need to do that very often... I'd say you could make a separate issue for that.
Using an autoloader you will only load the files you really need for the actual path of the script (e.g. if you need a class in just one if statement, which is only necessary every 4th page view) You don't have to manage all the files you may need for the actual file. You also don't have to care about file paths every time you want to include.
For a small project with Lime as it's sole library, there may only be 2 or 3 files but the number can grow with more dependencies. (I wouldn't necessarily use autoloader for the parts of Lime, which are only be used to build the parser class while development)
A further step could be to allow Lime to be included easily by a dependency management tool.
Adding a composer.json
and submitting to Packagist could be done.
I wasn't sure about the activity of this repo, so I did this about a month ago, though it would be nice if this repo would get further improvements and would be usable via packagist.
Lime declares a class named "Error". PHP also declares a class with that name since PHP 7. To solve the resulting "PHP Fatal error: Cannot declare class error, because the name is already in use", all Lime code was moved into namespace lime.