Skip to content

Commit

Permalink
PHP flags extra options.
Browse files Browse the repository at this point in the history
* The `-dallow_url_fopen` option is always set.
* Updated tests to reflect changes.
  • Loading branch information
warrickbayman committed Oct 12, 2023
1 parent 362ff90 commit d8b39ef
Show file tree
Hide file tree
Showing 7 changed files with 1,710 additions and 2,567 deletions.
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## v1.3.2 - 2023-10-06

Fixes to composer dependency install.

## v1.3.1 - 2023-10-06

- Whoops.
- Fixes to composer dependency install.

## v1.3.0 - 2023-10-06

Just a small update to fix an irritating Composer install problem.

- A small update to fix an irritating Composer install problem.
- Dependency update.
- Pass `-dallow_url_open=1` to the PHP cli when installing composer.

Expand Down
9 changes: 6 additions & 3 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ For versions 0.3.4 and older the `root` target option was named `path`. Version
:::

### Extra options
It's also possible to include a few additional options to the target config. At the moment, the option extra option supported is `composer-flags`. When running Composer, Platoon will run the following:
It's also possible to include a few additional options to the target config. At the moment, the option extra option supported is `composer-flags`. When running Composer, Platoon will use the following:

```shell
composer install --prefer-dist --no-dev --no-progress -optimize-autoloader
```
In addition, the `-dallow_url_fopen=1` option is always passed to the PHP executable.

If you ever needed to change the flags passed to the Composer CLI, you can use the `extra.composer-flag` option:
If you ever needed to add additional flags to the Composer or PHP CLI, you can use the `extra.composer-flags` and `extra.php-flags` options:

```php
return [
Expand All @@ -70,14 +71,16 @@ return [
'--dev',
'--optimize-autoloader',
],
'php-flags' => [
'-dmemory_limit=512M',
],
],
],
];
```

::: tip Note
The `--no-progress` flag is always set.
The `--no-progress` flag is always passed to Composer, and the `-dallow_url_fopen=1` option is always set on the PHP CLI.
:::

## Directory structure
Expand Down

0 comments on commit d8b39ef

Please sign in to comment.