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

Feature Idea - Require-style script #3312

Closed
alexandresalome opened this Issue Sep 29, 2014 · 10 comments

Comments

Projects
None yet
10 participants
@alexandresalome

I often create small scripts to show a sample, to POC or to automate some boring things. For example, by now, I need to create quickly a script that deals with Symfony Finder. I have to:

  • Create a project directory (oh wait, it was just a script)
  • Create a composer.json
  • Run composer install
  • Create my script and vendor

What if... I just create a script:

$composer->require('symfony/finder', function () {
     $finder = new Symfony\Component\Finder\Finder();
     # ...
});

And then run it using composer:

composer run-script test.php

What's your advice on such feature?

@stof

This comment has been minimized.

Show comment
Hide comment
@stof

stof Sep 29, 2014

Contributor

IMO, this does not belong to the composer core.

However, it can probably be built on top of composer

Contributor

stof commented Sep 29, 2014

IMO, this does not belong to the composer core.

However, it can probably be built on top of composer

@fabpot

This comment has been minimized.

Show comment
Hide comment
@fabpot

fabpot Oct 1, 2014

Contributor

like it.

Contributor

fabpot commented Oct 1, 2014

like it.

@mykiwi

This comment has been minimized.

Show comment
Hide comment
@mykiwi

mykiwi Oct 1, 2014

Me too 👍.

mykiwi commented Oct 1, 2014

Me too 👍.

@jeremyFreeAgent

This comment has been minimized.

Show comment
Hide comment
@jeremyFreeAgent

jeremyFreeAgent Oct 3, 2014

Contributor

👍

Contributor

jeremyFreeAgent commented Oct 3, 2014

👍

@csarrazi

This comment has been minimized.

Show comment
Hide comment

csarrazi commented Oct 6, 2014

👍

@avant1

This comment has been minimized.

Show comment
Hide comment

avant1 commented Oct 10, 2014

👍

@lyrixx

This comment has been minimized.

Show comment
Hide comment
@lyrixx

lyrixx Oct 17, 2014

Contributor

Before someone start working on it:

During Last SensioLabs hackday, @alexandresalome and others SL dev started to work on an external application. And we are going to release it soon.

So IMHO, we can close this issue.

Contributor

lyrixx commented Oct 17, 2014

Before someone start working on it:

During Last SensioLabs hackday, @alexandresalome and others SL dev started to work on an external application. And we are going to release it soon.

So IMHO, we can close this issue.

@Seldaek

This comment has been minimized.

Show comment
Hide comment
@Seldaek

Seldaek Oct 17, 2014

Member

Cool, looking forward to see this, it's like RequireJS for php of sorts. Good idea but indeed it does not need to be in composer itself.

Member

Seldaek commented Oct 17, 2014

Cool, looking forward to see this, it's like RequireJS for php of sorts. Good idea but indeed it does not need to be in composer itself.

@Seldaek Seldaek closed this Oct 17, 2014

@jderusse jderusse referenced this issue Oct 26, 2014

Merged

WIP - Allow plugins to register commands #3377

2 of 4 tasks complete
@staabm

This comment has been minimized.

Show comment
Hide comment
Contributor

staabm commented Dec 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment