-
Notifications
You must be signed in to change notification settings - Fork 268
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
#192 - Add autoload and extract Exception #411
base: master
Are you sure you want to change the base?
Conversation
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.
I wonder if you have any use cases / examples to share to explain how this might be implemented. For example if you it would be possible to implement without composer?
Although I was really adding a vague suggestion when I mentioned about not using composer, I would say that having to use it is probably a non-starter. You would get no push-back from me on it's greatness, but for those of us who work in large-scale, commercial software houses that depend on masses of legacy code interactions, integrating composer into them would be a complete nightmare. The other observation is that I've never come across a piece of software where the optimal implementation was composer that couldn't be installed with out it. |
With regards to not using composer, for the time being (and foreseeable future too) we're still offering ADOdb for download and standalone installation, via the SourceForge downloads site. I see no reason to force using Composer at all. |
@dregad @mnewnham
Did you mean, that few libraries can only be installed via composer ? |
That would be too much, I think. IMO, Composer would be the standard, default way to use the library in the future, but we need to provide a fallback way of using the library to accomodate usage scenarios like the one Mark described. This could indeed be a simplified autoloader script derived from the default Composer one. |
Hello @dregad I took some time to think about a solution to simplify the composer autoloader. But I must say that the composer code is quite complex and I did not find a good solution. By using the real code of composer, we are sure that no bug is introduced in the autoloading process. Except the ones from composer itself, but I think that a project as big as this one should be a good garanty of quality. The only downside of this current solution IMO is the autoloading will need to be updated to follow the composer history. About the way the adobd project should be installed, my proposal changes nothing for now. And it allows to change this situation more easily in the future if it is needed. What do you think ? Edited: |
In case it might be of help: I faced a similar problem with the phpxmlrpc/phpxmlrpc package, which also dates to the dark ages of php 3. It is a smaller project than adodb in terms of classes and complexity of loading (ie. no drivers or plugins involved), but the basic issues were the same. My approach:
See: |
I committed the vendor folder to keep the same installation process.
I added some tests to prove nothing is broken.