Git Product home page Git Product logo

composer-upstream-prototypes's Introduction

Composer Upstream Prototypes

This project demonstrates different options for using Composer with Pantheon upstreams.

CircleCI Deprecated

Use Cases

As a Pantheon user with a site created from a composer-based upstreamI want my site’s composer.json to include the configuration from my upstream by reference onlyso that I can focus on my site’s dependencies without the noise of the upstream’s many dependencies

As a Pantheon user with a site created from a composer-based upstreamI want new dependencies added to the upstream to be available as a 1-click updateso that I can easily get any updates from the upstream

As a Pantheon user with a site created from a composer-based upstreamI want dependencies removed from the upstream to be available as a 1-click updateso that I can easily remove unneeded code from my site

As a Pantheon user with a site created from a composer-based upstreamI want to apply upstream updates without merge conflictsso that I can focus on my site and not resolving merge conflicts

Options

This repository contains three alternative options for meeting our needs to use Composer with upstreams.

Use wikimedia merge plugin

This option uses the Wikimedia merge plugin to include the upstream.composer.json from a file stored directly at the root of the upstream repository.

Pros:

  • Allows upstream composer.json to set configuration properties that may only go in the root-level composer.json file.
  • The upstream composer.json is stored in the same repository as the other upstream files.
  • The upstream composer.json file may have any arbitrary name, and can go at the project root.

Cons:

  • The wikimedia merge plugin is no longer well-maintained, and projects are moving away from using it.

Path repository from top-level composer.json to upstream/composer.json

Similar to option 1, but instead uses a path repository to include upstream/composer.json from a subfolder stored directly in the upstream repository.

Pros:

  • Based on standard Composer features (no additional Composer plugins required).
  • The upstream composer.json is stored in the same repository as the other upstream files.

Cons:

  • Upstream composer.json is considered a dependency, and therefore cannot set configuration properties that may only go in the root-level composer.json file.
  • The composer.json file must be named literally composer.json (no variants allowed) and must go in a subfolder.

Require an external project from top-level composer.json

This option requires an external project that has been registered with Packagist.

Pros:

  • Could potentially be used in multiple upstreams.

Cons:

  • Upstream composer.json is not stored in the same repository as the other upstream files.
  • Requires registering with Packagist and managing releases.
  • Keeping upstream metadata private requires Private Packagist, an additional expense.

Recommendation

While the Wikimedia merge plugin is more flexible and meets our design criteria most closely, it should probably be avoided due to the fact that it is not well maintained, and is falling out of favor. If we did want to use the Wikimedia merge plugin, it might be preferable to fork a Pantheon version, and remove any features we did not need.

A path repository provides most of the benefits of the Wikimedia merge plugin, and is built with standard Composer features. It is therefore probably the preferable option, in the balance.

composer-upstream-prototypes's People

Contributors

greg-1-anderson avatar kporras07 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.