Composer and using libraries

7 views
Skip to first unread message

Mike van Riel

unread,
Jun 16, 2014, 1:54:18 PM6/16/14
to joindin-d...@googlegroups.com
Dear all,

I have been browsing the web2 code today and would like to have some background on three things I encountered:

  1. I noticed that the web2 project does not use composer and even has third party code included in the vendor folder (notably Twig and Slim). Since nowadays it is considered good practice to use composer for requirements as these I was wondering whether this was an intentional design decision or a leftover from a pre-composer age?
  2. I also noticed that a custom autoloader component is used while there are existing autoloader implementations that need not be maintained by the project; such as composer's
  3. The BaseApi class seems to be a custom wrapper around file_get_contents in order to interact with the API; libraries such as Guzzle or Buzz are better suited and reduce maintenance to the project.
I am definitely not saying this must be changed or anything but I would like some background as that makes me understand the project better.

Thanks in advance,

Mike van Riel

Lorna Mitchell

unread,
Jun 17, 2014, 4:48:58 AM6/17/14
to joindin-d...@googlegroups.com
Mike

You guessed right - this was a pre-composer project and so our library inclusion and autoloaders aren't particularly modern.  I see that you have added a pull request to update us (https://github.com/joindin/joindin-web2/pull/117 for context for others), thankyou :)

I'd be totally happy to see a Guzzle wrapper where the BaseApi is right now - there's also been talk of writing a service descriptor for Guzzle that would give us an easy way of calling the API, either or both of those would be welcome changes.

Hope that helps

Lorna



--
You received this message because you are subscribed to the Google Groups "joindin-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joindin-develop...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Lorna Mitchell
http://lornajane.net


Mike van Riel

unread,
Jun 17, 2014, 4:56:54 AM6/17/14
to joindin-d...@googlegroups.com
Hi Lorna,

I might have been a bit impatient about the Composer thing :)

I am currently working on the event submission page but I can make a Guzzle service definition after that if you'd like. I have experience with that at a client where I am working now, including oAuth authentication.

I do have a question about that; would you like that integrated or as a separate API package so that other projects can use it as an SDK of sorts?

Mike

Lorna Mitchell

unread,
Jun 17, 2014, 5:12:59 AM6/17/14
to joindin-d...@googlegroups.com
Mike

Great question, I think we may need a separate package for the service descriptor - as you say, it can/will be used on its own by other projects and I guess we'll just publish via packagist and consume it ourselves.  Let me know when you're ready to get going with that and I will happily make a repo on the organisation for it.

Thanks for all your enthusiasm!

Lorna


Reply all
Reply to author
Forward
0 new messages