Skip to content

Commit

Permalink
Added basic docs for download command
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed May 16, 2024
1 parent d6dd3ba commit d8b0313
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
# 🥧 PIE (PHP Installer for Extensions)

(to be completed...)
You will need PHP 8.1 or newer to run PIE, but PIE can install an extension to any installed PHP version.

## Installing

## Usage

You can download an extension ready to be built or installed using the `download` command. For example, to download the
`example_pie_extension` extension, you would run:

```shell
$ bin/pie download asgrim/example-pie-extension
You are running PHP 8.3.7
Target PHP installation: 8.3.7 (from /usr/bin/php8.3)
Platform: NonWindows, x86_64, NonThreadSafe
Found package: asgrim/example-pie-extension:1.0.1 which provides ext-example_pie_extension
Extracted asgrim/example-pie-extension:1.0.1 source to: /tmp/pie_downloader_6645f07a28bec9.66045489/asgrim-example-pie-extension-769f906
$
```

If you are trying to install an extension for a different version of PHP, you may specify this on non-Windows systems
with the `--with-php-config` option like:

```shell
bin/pie download --with-php-config=/usr/bin/php-config7.2 my/extension
```

Windows TBD

## Developing

### Testing
Expand Down
2 changes: 2 additions & 0 deletions src/Command/DownloadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public function execute(InputInterface $input, OutputInterface $output): int
$phpBinaryPath = PhpBinaryPath::fromPhpConfigExecutable($withPhpConfig);
}

// @todo Support Windows using `--with-php-path="C:\usr\php7.4.33"`

$targetPlatform = TargetPlatform::fromPhpBinaryPath($phpBinaryPath);

$output->writeln(sprintf('<info>You are running PHP %s</info>', PHP_VERSION));
Expand Down

0 comments on commit d8b0313

Please sign in to comment.