Skip to content

Commit 34b8048

Browse files
Merge pull request #2 from nscuro/fixes
Add support for PHP5
2 parents 129f9ac + 74d1d66 commit 34b8048

File tree

13 files changed

+219
-2601
lines changed

13 files changed

+219
-2601
lines changed

.github/workflows/php.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,24 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
9-
8+
strategy:
9+
matrix:
10+
php-versions: ["5.6", "7.0", "7.1", "7.2", "7.3"]
11+
name: PHP ${{ matrix.php-versions }}
1012
steps:
11-
- uses: actions/checkout@v1
12-
13-
- name: Validate composer.json and composer.lock
14-
run: composer validate
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@master
17+
with:
18+
php-version: ${{ matrix.php-versions }}
19+
extension-csv: dom # Required by phpunit
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate
1522

16-
- name: Install dependencies
17-
run: composer install --prefer-dist --no-progress --no-suggest
23+
- name: Install dependencies
24+
run: composer install --prefer-dist --no-progress --no-suggest
1825

19-
- name: Run test suite
20-
run: composer test
26+
- name: Run test suite
27+
run: composer test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/vendor/
2+
3+
# Because we're supporting PHP 5 and 7, we cannot distribute the lockfile
4+
composer.lock

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,31 @@
77

88
# CycloneDX PHP Composer Plugin
99

10+
A plugin for PHP's [Composer](https://getcomposer.org/) that generates Bill of Materials in [CycloneDX](https://cyclonedx.org/) format.
11+
1012
## Usage
1113

14+
### Requirements
15+
16+
The plugin supports PHP 5.5 and later.
17+
1218
### Installation
1319

1420
`composer require --dev cyclonedx/cyclonedx-php-composer`
1521

1622
### Options
1723

18-
```sh
19-
$ composer makeBom -h
24+
After successful installation, the composer command `make-bom` is available.
25+
26+
```sh
27+
$ composer make-bom -h
2028
Usage:
21-
makeBom [options]
29+
make-bom [options]
2230

2331
Options:
24-
--outputFile=OUTPUTFILE Path to the output file (default is bom.xml)
25-
--excludeDev Exclude dev dependencies
26-
--excludePlugins Exclude composer plugins
32+
--output-file=OUTPUT-FILE Path to the output file (default is bom.xml)
33+
--exclude-dev Exclude dev dependencies
34+
--exclude-plugins Exclude composer plugins
2735
-h, --help Display this help message
2836
-q, --quiet Do not output any message
2937
-V, --version Display this application version

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.1",
13+
"php": "^5.5 || ^7.0",
1414
"composer-plugin-api": "^1.0"
1515
},
16+
"require-dev": {
17+
"phpunit/phpunit": ">=5.0 <7.0",
18+
"composer/composer": "^1.9"
19+
},
1620
"autoload": {
1721
"psr-4": {
1822
"CycloneDX\\": "src"
1923
}
2024
},
21-
"extra": {
22-
"class": "CycloneDX\\ComposerPlugin"
23-
},
2425
"scripts": {
2526
"test": [
2627
"phpunit --bootstrap vendor/autoload.php tests"
2728
]
2829
},
29-
"require-dev": {
30-
"phpunit/phpunit": "^7",
31-
"composer/composer": "^1.9"
30+
"extra": {
31+
"class": "CycloneDX\\ComposerPlugin"
3232
}
3333
}

0 commit comments

Comments
 (0)