Skip to content

Commit

Permalink
prepare maintenance release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed Jan 7, 2024
1 parent c4966d5 commit 69dd282
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 18 deletions.
26 changes: 26 additions & 0 deletions .changes/1.x/1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

## 1.1.0 - 2024-01-07

### Added

- introduces the new `resources/serialize.php` script (to demonstrate usage with help of Symfony/Serializer component)
- all unit tests missing from first release 1.0

### Changed

- raise minimum PHP requirement (7.4 or greater) for property type hinting
- add type hinting on properties and upgrade phpDoc blocks
- remove try/catch bloc that print the final SarifLog object in json format on all examples scripts
- API: `SarifLog` is no more marked as final to be able to extends or change current (`__toString`, `jsonSerializable`) behavior

### Fixed

Codebase is now PHPStan rule level 9 compatible :

- `ExternalPropertyFileReference` definition with optional values
- `GraphTraversal` definition with optional values
- `PhysicalLocation` definition with optional values
- `Region` definition with optional values
- `Taxonomies` property

**Full Changelog**: [1.0.1...1.1.0](https://github.com/llaville/sarif-php-sdk/compare/1.0.1...1.1.0)
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@ 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.1.0 - 2024-01-07

### Added

- introduces the new `resources/serialize.php` script (to demonstrate usage with help of Symfony/Serializer component)
- all unit tests missing from first release 1.0

### Changed

- raise minimum PHP requirement (7.4 or greater) for property type hinting
- add type hinting on properties and upgrade phpDoc blocks
- remove try/catch bloc that print the final SarifLog object in json format on all examples scripts
- API: `SarifLog` is no more marked as final to be able to extends or change current (`__toString`, `jsonSerializable`) behavior

### Fixed

Codebase is now PHPStan rule level 9 compatible :

- `ExternalPropertyFileReference` definition with optional values
- `GraphTraversal` definition with optional values
- `PhysicalLocation` definition with optional values
- `Region` definition with optional values
- `Taxonomies` property

**Full Changelog**: [1.0.1...1.1.0](https://github.com/llaville/sarif-php-sdk/compare/1.0.1...1.1.0)

## 1.0.1 - 2021-12-20

### Fixed
Expand Down
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ written in [property bags](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sar
> Learn how to install this library in different way.
See [Installation Guide](installation.md)

## API Reference

> Discover all API objects with each one at least an example of how to generate a SARIF report.
See [Reference Guide](reference/README.md)
27 changes: 10 additions & 17 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

1. [Requirements](#requirements)
2. [PHAR](#phar)
3. [Docker](#docker)
4. [Phive](#phive)
5. [Composer](#composer)
6. [Git](#git)
3. [Phive](#phive)
4. [Composer](#composer)
5. [Git](#git)

## Requirements

* PHP 7.1 or greater
* PHP 7.4 or greater
* ext-json
* ext-pcre
* ext-spl
Expand All @@ -20,15 +19,10 @@
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.

## Docker

Retrieve official image with [Docker][docker]

```shell
docker pull ghcr.io/llaville/sarif-php-sdk:v1
or
docker pull ghcr.io/llaville/sarif-php-sdk:latest
```
> **TIP** When you want to use, load autoloader as follows :
> ```php
> require_once 'phar://' . '/absolute/path/to' . '/sarif-php-sdk.phar/vendor/autoload.php';
> ```
## Phive
Expand All @@ -49,7 +43,7 @@ You can also install application locally to your project with [Phive][phive] and
```xml
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="llaville/sarif-php-sdk" version="^1" copy="false" />
<phar name="llaville/sarif-php-sdk" version="^1.1" copy="false" />
</phive>
```

Expand All @@ -63,7 +57,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
composer require bartlett/sarif-php-sdk ^1.1
```

If you cannot install it because of a dependency conflict, or you prefer to install it for your project, we recommend
Expand All @@ -88,4 +82,3 @@ git clone -b 1.1 https://github.com/llaville/sarif-php-sdk.git
[bamarni/composer-bin-plugin]: https://github.com/bamarni/composer-bin-plugin
[github-repo]: https://github.com/llaville/sarif-php-sdk.git
[phive]: https://github.com/phar-io/phive
[docker]: https://docs.docker.com/get-docker/
1 change: 1 addition & 0 deletions resources/build.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* file that was distributed with this source code.
*
* @author Laurent Laville
* @since Release 1.1.0
*/

use Bartlett\GraphUml\Generator\GraphVizGenerator;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Serializer/NativeJsonSerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function sarifLogDataProvider(): Generator
}

#[DataProvider('sarifLogDataProvider')]
public function testRequiredProperties(string $example, SarifLog $sarifLog, ?string $expectException): void
public function testBuildReport(string $example, SarifLog $sarifLog, ?string $expectException): void
{
if (!empty($expectException)) {
$this->expectException($expectException);
Expand Down

0 comments on commit 69dd282

Please sign in to comment.