Working at the same time in a project and its dependencies: Composer and path type repository

With the Domain-Driven Design, Microservices and API explosion, I see more teams working in a base project, such as a Web, and integrating other private packages they develop in a different repository. For example, working on the Web and an API client for a external REST service at the same time.

For example, at @AtrapaloEng, our sales development team (checkout process, purchases, orders, payments, etc.) integrates different payment methods into the web so users, specially Latam ones, can be happier using their preferred payment methods. They create a repository for each of the new payment methods we support as a external package. Sometimes a developer in the team must work with different projects at the same time, the Web and the payment method in development.

In this scenario, one option is work on the payment package, tag, push, go to the base project and update dependencies with Composer. As you can see, it’s a bit slower, how we can improve this process? Composer to the rescue!

Continue reading

Legacy Code and Teams Series: Composer

After talking about Technical Committee and Training Sessions in the previous post of the series, today, I’ll carry on with adding Composer to legacy projects without pain.

The day I left Emagister, I was sat down with Eber and Christian having beers and talking about all the cool things we did there. We were reviewing each of the changes, it cost, benefits, feelings in the team, etc. When I said, “what about composer? that was cool!”, Eber said, “Composer is not just cool, it’s a must.”. As always, he was too right. It has been also the first thing done at Atrápalo.

Starting with a brand-new project using create-project command it’s easy, but, what about those developers dealing with a big legacy project, with custom autoloader, PEAR dependencies, hardcoded fixes in a external library, non PSR-0 code, etc. Don’t worry, you can also take benefit of Composer. However, there are some tricks you should take care of in order to face those issues.

Continue reading