Skip to content
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

ComposerTask when composer is installed in the system (Trac #1008) #558

Closed
phing-issues-importer opened this issue Oct 9, 2016 · 9 comments

Comments

@phing-issues-importer
Copy link

phing-issues-importer commented Oct 9, 2016

Is tricky to run the ComposerTask when composer is installed in the system instead of in project directory.
I propose to enhance the task in order to modify the command that is passed to passtruh.

Maybe using by default the system's composer installation, identify it through which composer and override the behaviour if composer.phar is present in project dir.

Migrated from https://www.phing.info/trac/ticket/1008

{
    "status": "new", 
    "changetime": "2015-11-28T19:10:43", 
    "description": "Is tricky to run the ComposerTask when composer is installed in the system instead of in project directory.\nI propose to enhance the task in order to modify the command that is passed to `passtruh`.\n\nMaybe using by default the system's composer installation, identify it through `which composer` and override the behaviour if composer.phar is present in project dir.", 
    "reporter": "giacomorama@gmail.com", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1448737843092041", 
    "component": "phing-tasks-ext", 
    "summary": "ComposerTask when composer is installed in the system", 
    "priority": "minor", 
    "keywords": "composer", 
    "version": "2.5.0", 
    "time": "2013-04-22T12:19:05", 
    "milestone": "Backlog", 
    "owner": "mrook", 
    "type": "enhancement"
}
@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20130507T08:25:42: mrook commented:

Unfortunately 'which composer' is not going to work on a Windows machine.

@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20140606T09:35:46: anonymous commented:

On windows there is where.exe...

@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20140606T09:38:29: anonymous commented:

Replying to [comment:2 anonymous]:

On windows there is where.exe...
Forgettig to say that just not work on WinzXP, where there are other solutions.
Just to say that is possible to implement.

@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20140919T10:37:38: anonymous commented:

I'm also looking for a solution to use a global installed composer. I think most developers are using composer like this and therefore phing should support that. Of course providing the full path in the build.xml is not an option.

The simplest way to check, if there's a global composer installation would be to exec "composer about" or something like that and check the return code and maybe the output.

Using "which" or "where.exe" would be more of a challenge to make it work on all platforms.

An alternative would be the use of an additional setting for the command, to indicate that a global command should be used.

Let's discuss which is the best way to go. I'm willing to contribute this afterwards.

@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20140919T10:38:38: matthias@krauser.eu commented:

sorry, forgot to enter my email in my previous comment

@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20151128T15:48:36: rene@url.ee commented:

So 15 months later still no solution?

@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20151128T18:23:35: mrook commented:

Ideas are welcome :)

@phing-issues-importer
Copy link
Author

phing-issues-importer commented Oct 9, 2016

Trac update at 20151128T19:10:43: matthias@krauser.eu commented:

I would prefer a simple additonal attribute like "globalcomposer={command}". What do you think about that?

@mrook mrook removed their assignment Nov 17, 2016
@mrook mrook modified the milestones: Backlog, 3.0 RC2, 3.0 RC1 Feb 13, 2018
@mrook
Copy link
Member

mrook commented Feb 14, 2018

Fixed by merging #701.

@mrook mrook closed this as completed Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants