forked from jamescowie/composer-patcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request jamescowie#5 from nevvermind/use-method-invoke-script
Use script callbacks instead of system commands to access config and disregard bin path
- Loading branch information
Showing
5 changed files
with
36 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Inviqa; | ||
|
||
class Command | ||
{ | ||
/** | ||
* Mehotd used as Composer script callback. | ||
* E.g. { "scripts": { "post-update-cmd": "Inviqa\\Command::patch" } } | ||
* | ||
* The \Composer\Script\Event type is accessible only for Composer's "Command Events". | ||
* These are the only events when the "Composer" object (hence its package config) | ||
* is available. | ||
* | ||
* @link https://getcomposer.org/doc/articles/scripts.md#event-names | ||
* @param \Composer\Script\Event $event | ||
*/ | ||
public static function patch(\Composer\Script\Event $event) | ||
{ | ||
$patcher = new Patcher; | ||
$patcher->patch($event); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters