Giter Site home page Giter Site logo

Add InstallerInstaller about composer HOT 7 CLOSED

composer avatar composer commented on May 2, 2024
Add InstallerInstaller

from composer.

Comments (7)

Seldaek avatar Seldaek commented on May 2, 2024

@naderman: There is a little issue here ;) For custom installers to be registered during install, or at all for that matter, we need to know which class in the package to run, like:

  "extra": {
    "class": "Symfony\\Bridge\\Composer\\BundleInstaller",
    "file": "src/Symfony/Bridge/Composer/BundleInstaller.php"
  }

The file entry would also be helpful otherwise we need to parse the autoload config at runtime, and that could prove complex.

What this means though obviously is that this class can't have any dependency, it'll just get a vendor directory, the download manager and the local repository injected, and has to be able deal with that. I'm not sure this will be sufficient, but I guess it's the only way, if people need more they probably will have to wrap composer into their framework/app to provide custom logic.

from composer.

naderman avatar naderman commented on May 2, 2024

Why can't we rely on the supplied auto loading information of that package? We don't have a generated autoloader yet, but we could register a very trivial PSR-0 autoloader based on the package contents right there and then?

from composer.

naderman avatar naderman commented on May 2, 2024

And regarding dependencies, I think that's fine. It'll be ok for that kind of an installer to load custom code in its implementation and make use of that.

from composer.

Seldaek avatar Seldaek commented on May 2, 2024

We can rely on the autoload info, it's just annoying to load that stuff inside the installer, we might need the "file" entry as optional anyway for packages that aren't autoloadable. Sounds reasonable?

from composer.

naderman avatar naderman commented on May 2, 2024

Can't we require that installers are always auto loadable?

from composer.

naderman avatar naderman commented on May 2, 2024

I'd just really like to keep our config options as minimal as possible.

from composer.

Seldaek avatar Seldaek commented on May 2, 2024

Sure we can do that too. I hope I can look into it this week.

from composer.

Related Issues (20)

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.