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

Improved composer plugin #675

Merged
merged 21 commits into from
Nov 29, 2019
Merged

Conversation

veewee
Copy link
Contributor

@veewee veewee commented Sep 13, 2019

Still a work in progress. The goals of this rewrite are:

Todos:

  • Remove doesn't always trigger (for example during update --no-dev)
  • Windoooows

Testing:

composer.json

{
    "require": {
        "phpro/grumphp": "dev-composer-plugin-rewrite"
    },
    "repositories": [
        {
            "type": "git",
            "url": "[email protected]:veewee/grumphp.git"
        }
    ]
}
composer install

@veewee veewee added this to the 0.16.1 milestone Sep 13, 2019
@veewee veewee force-pushed the composer-plugin-rewrite branch from 4f98ebf to cbdc72b Compare September 13, 2019 04:57
@veewee veewee modified the milestones: 0.16.1, 0.16.2 Sep 20, 2019
@veewee veewee modified the milestones: 0.16.2, 0.16.3 Oct 29, 2019
@veewee veewee force-pushed the composer-plugin-rewrite branch from 7f34896 to bb522b0 Compare November 29, 2019 08:45
@veewee veewee force-pushed the composer-plugin-rewrite branch from 3b75bf2 to ab00e3d Compare November 29, 2019 11:32
@veewee veewee changed the title [WIP] Improved composer plugin Improved composer plugin Nov 29, 2019
@@ -0,0 +1 @@
3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to delete this file

// Windows requires double double quotes
// https://bugs.php.net/bug.php?id=49139
$windowsIsInsane = function (string $command) {
return $this->runsOnWindows() ? '"'.$command.'"' : $command;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣

@@ -19,7 +19,7 @@ public static function integrate(Event $event): void
$filesystem = new Filesystem();

$composerBinDir = $event->getComposer()->getConfig()->get('bin-dir');
$executable = getcwd().'/bin/grumphp';
$executable = __DIR__.'/../../bin/grumphp';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$executable = __DIR__.'/../../bin/grumphp';
$executable = dirname(__DIR__, 2) . '/bin/grumphp';

@Landerstraeten Landerstraeten self-requested a review November 29, 2019 12:36
@veewee veewee modified the milestones: 0.17.1, 0.17.0 Nov 29, 2019
@veewee veewee merged commit 11e2593 into phpro:master Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants