diff --git a/.changes/1.x/1.3.0.md b/.changes/1.x/1.3.0.md new file mode 100644 index 0000000..ca931b4 --- /dev/null +++ b/.changes/1.x/1.3.0.md @@ -0,0 +1,39 @@ + +## 1.3.0 - 2024-05-24 + +I'm happy to announce next level of SARIF converters improvements : + +### Changed + +For all converters : + +- Add ability to retrieve code snippet (`snippet` property of `region` object). +- Add `automationDetails` on `Bartlett\Sarif\Converter\ConverterInterface` with a default implementation +into `Bartlett\Sarif\Converter\AbstractConverter`. +- Add ability to print `startTimeUtc` and `endTimeUtc` properties of `invocation` object. +- Add ability to print `commandLine` property of `invocation` object. +- Add ability to provide a `fullName` property of `toolComponent` object (driver). This property is required by the Azure DevOps Advanced Security service. + +**PHP_CodeSniffer** : + +- Add `originalUriBaseIds` property on `run` object. +- Add `partialFingerprints` property of `result` object. This property is required by the GitHub Advanced Security service. +- Supports now the `responseFiles` property of `invocation` object. + +**PHPLint** : + +- Creation of a custom launcher is no more necessary with PHPLint 9.3.1 or greater. Use the `--bootstrap` option. +- Add `partialFingerprints` property of `result` object. This property is required by the GitHub Advanced Security service. +- Introduces a single `ReportingDescriptor` (rule) for syntax errors. +- Supports now the `responseFiles` property of `invocation` object. + +**PHPStan** : + +- Add `partialFingerprints` property of `result` object. This property is required by the GitHub Advanced Security service. +- Introduces a single `ReportingDescriptor` (rule) for analysis errors. + +### Fixed + +- for all converters, make path really relative to working directory. + +**Full Changelog**: [1.2.0...1.3.0](https://github.com/llaville/sarif-php-sdk/compare/1.2.0...1.3.0) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 5966b9d..d88d6f9 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -5,7 +5,7 @@ on: push: branches: - master - - "1.2" + - "1.3" paths: - docs/** pull_request: @@ -15,6 +15,6 @@ jobs: deploy: uses: llaville/.github/.github/workflows/gh-pages.yml@master with: - destination-dir: "1.2" + destination-dir: "1.3" force-orphan: false hook-script: "resources/gh-pages-hook.sh" diff --git a/CHANGELOG.md b/CHANGELOG.md index 371508b..4a8c0a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 1.3.0 - 2024-05-24 + +I'm happy to announce next level of SARIF converters improvements : + +### Changed + +For all converters : + +- Add ability to retrieve code snippet (`snippet` property of `region` object). +- Add `automationDetails` on `Bartlett\Sarif\Converter\ConverterInterface` with a default implementation + into `Bartlett\Sarif\Converter\AbstractConverter`. +- Add ability to print `startTimeUtc` and `endTimeUtc` properties of `invocation` object. +- Add ability to print `commandLine` property of `invocation` object. +- Add ability to provide a `fullName` property of `toolComponent` object (driver). This property is required by the Azure DevOps Advanced Security service. + +**PHP_CodeSniffer** : + +- Add `originalUriBaseIds` property on `run` object. +- Add `partialFingerprints` property of `result` object. This property is required by the GitHub Advanced Security service. +- Supports now the `responseFiles` property of `invocation` object. + +**PHPLint** : + +- Creation of a custom launcher is no more necessary with PHPLint 9.3.1 or greater. Use the `--bootstrap` option. +- Add `partialFingerprints` property of `result` object. This property is required by the GitHub Advanced Security service. +- Introduces a single `ReportingDescriptor` (rule) for syntax errors. +- Supports now the `responseFiles` property of `invocation` object. + +**PHPStan** : + +- Add `partialFingerprints` property of `result` object. This property is required by the GitHub Advanced Security service. +- Introduces a single `ReportingDescriptor` (rule) for analysis errors. + +### Fixed + +- for all converters, make path really relative to working directory. + +**Full Changelog**: [1.2.0...1.3.0](https://github.com/llaville/sarif-php-sdk/compare/1.2.0...1.3.0) + ## 1.2.0 - 2024-05-02 I'm happy to announce adds of SARIF converters for three well-known PHP linters : diff --git a/README.md b/README.md index 7fee926..8b0a307 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ | Stable v1.0.x | [![Branch 1.0][Branch_100x-img]][Branch_100x] | [![Minimum PHP Version)][PHPVersion_100x-img]][PHPVersion_100x] | [![Stable Version 1.0][Packagist_100x-img]][Packagist_100x] | [![License 1.0][License_100x-img]][License_100x] | [![Documentation 1.0][Documentation_100x-img]][Documentation_100x] | | Stable v1.1.x | [![Branch 1.1][Branch_101x-img]][Branch_101x] | [![Minimum PHP Version)][PHPVersion_101x-img]][PHPVersion_101x] | [![Stable Version 1.1][Packagist_101x-img]][Packagist_101x] | [![License 1.1][License_101x-img]][License_101x] | [![Documentation 1.1][Documentation_101x-img]][Documentation_101x] | | Stable v1.2.x | [![Branch 1.2][Branch_102x-img]][Branch_102x] | [![Minimum PHP Version)][PHPVersion_102x-img]][PHPVersion_102x] | [![Stable Version 1.2][Packagist_102x-img]][Packagist_102x] | [![License 1.2][License_102x-img]][License_102x] | [![Documentation 1.2][Documentation_102x-img]][Documentation_102x] | +| Stable v1.3.x | [![Branch 1.3][Branch_103x-img]][Branch_103x] | [![Minimum PHP Version)][PHPVersion_103x-img]][PHPVersion_103x] | [![Stable Version 1.3][Packagist_103x-img]][Packagist_103x] | [![License 1.3][License_103x-img]][License_103x] | [![Documentation 1.3][Documentation_103x-img]][Documentation_103x] | [Branch_100x-img]: https://img.shields.io/badge/branch-1.0-orange [Branch_100x]: https://github.com/llaville/sarif-php-sdk/tree/1.0 @@ -43,6 +44,17 @@ [Documentation_102x-img]: https://img.shields.io/badge/documentation-v1.2-green [Documentation_102x]: https://github.com/llaville/sarif-php-sdk/tree/1.2/docs +[Branch_103x-img]: https://img.shields.io/badge/branch-1.3-orange +[Branch_103x]: https://github.com/llaville/sarif-php-sdk/tree/1.3 +[PHPVersion_103x-img]: https://img.shields.io/packagist/php-v/bartlett/sarif-php-sdk/1.3.0 +[PHPVersion_103x]: https://www.php.net/supported-versions.php +[Packagist_103x-img]: https://img.shields.io/badge/packagist-v1.3.0-blue +[Packagist_103x]: https://packagist.org/packages/bartlett/sarif-php-sdk +[License_103x-img]: https://img.shields.io/packagist/l/bartlett/sarif-php-sdk +[License_103x]: https://github.com/llaville/sarif-php-sdk/blob/1.3/LICENSE +[Documentation_103x-img]: https://img.shields.io/badge/documentation-v1.3-green +[Documentation_103x]: https://github.com/llaville/sarif-php-sdk/tree/1.3/docs + ## Introduction SARIF, the Static Analysis Results Interchange Format, defines a standard format for the output of static analysis tools. @@ -59,8 +71,8 @@ is available [here][sarif-specs]. ## Documentation -All the documentation is available on [website](https://llaville.github.io/sarif-php-sdk/1.2), -generated from the [docs](https://github.com/llaville/sarif-php-sdk/tree/1.2/docs) folder. +All the documentation is available on [website](https://llaville.github.io/sarif-php-sdk/1.3), +generated from the [docs](https://github.com/llaville/sarif-php-sdk/tree/1.3/docs) folder. - API [Reference](docs/reference/README.md) describes all SARIF objects with examples. diff --git a/docs/installation.md b/docs/installation.md index 8df5b97..3d2e0f2 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -19,7 +19,8 @@ The preferred method of installation is to use the PHAR version which can be downloaded from the most recent [Github Release][releases]. This method ensures you will not have any dependency conflict issue. -> **TIP** When you want to use, load autoloader as follows : +> [!TIP] +> When you want to use, load autoloader as follows : > > ```php > require_once 'phar://' . '/absolute/path/to' . '/sarif-php-sdk.phar/vendor/autoload.php'; @@ -44,7 +45,7 @@ You can also install application locally to your project with [Phive][phive] and ```xml - + ``` @@ -58,7 +59,7 @@ The recommended way to install this library is [through composer][composer]. If you don't know yet what is composer, have a look [on introduction][composer-intro]. ```shell -composer require bartlett/sarif-php-sdk ^1.2 +composer require bartlett/sarif-php-sdk ^1.3 ``` If you cannot install it because of a dependency conflict, or you prefer to install it for your project, we recommend @@ -74,7 +75,7 @@ composer bin sarif-php-sdk require --dev bartlett/sarif-php-sdk The SARIF PHP SDK can be directly used from [GitHub][github-repo] by cloning the repository into a directory of your choice. ```shell -git clone -b 1.2 https://github.com/llaville/sarif-php-sdk.git +git clone -b 1.3 https://github.com/llaville/sarif-php-sdk.git ``` [releases]: https://github.com/llaville/sarif-php-sdk/releases/