Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc/processor #141

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
42 changes: 25 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ To set up the project locally for development:

### Clone the Repository

```
git clone https://github.com/sensiolabs/GotenbergBundle.git
cd GotenbergBundle
```shell
$ git clone https://github.com/sensiolabs/GotenbergBundle.git
$ cd GotenbergBundle
```

### Install Dependencies

```
composer install
```shell
$ composer install
```

## Testing
Expand All @@ -42,14 +42,14 @@ Ensure your changes work as expected by running the test suite:

### Run Tests

```
./vendor/bin/phpunit
```shell
$ ./vendor/bin/phpunit
```

### Run Tests with Coverage (optional)

```
./vendor/bin/phpunit --coverage-text
```shell
$ ./vendor/bin/phpunit --coverage-text
```

## Quality Assurance
Expand All @@ -60,24 +60,32 @@ Maintain high code quality by following these steps before submitting a pull req

Check your code for style violations:

```
./vendor/bin/php-cs-fixer check --diff
```shell
$ PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer check --diff
```

Eventually, you can fix the issues automatically:

```
./vendor/bin/php-cs-fixer fix --diff
```shell
$ PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --diff
```

### Static Analysis

```
./vendor/bin/phpstan analyse
```shell
$ php -dmemory_limit=-1 ./vendor/bin/phpstan analyse --debug
```

Detect potential issues in your code.

### Dependencies

```shell
$ ./vendor/bin/composer-dependency-analyser --show-all-usages
```

Detect potential issues in composer.json dependencies.

### Fix Issues

Address any warnings or errors reported by the tools above.
Expand All @@ -91,8 +99,8 @@ The project documentation is partially built from the source code.

### Update the documentation

```
php ./docs/generate.php
```shell
$ php ./docs/generate.php
```


Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class YourController
### Advanced Usage

1. [Configuration](./docs/configuration.md)
2. [Processing (saving for example)](./docs/processing.md)
2. [Working with assets](./docs/assets.md)
3. [Builders API](./docs/builders_api.md)
4. [Async & Webhooks](./docs/webhook.md)
Expand Down
7 changes: 7 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
->addPathToScan(__DIR__.'/src/Debug', isDev: true)
->addPathToScan(__DIR__.'/tests', isDev: true)

->ignoreErrorsOnPackage('async-aws/s3', [
ErrorType::DEV_DEPENDENCY_IN_PROD,
])
->disableExtensionsAnalysis() // TODO : Bug waiting for https://github.com/shipmonk-rnd/composer-dependency-analyser/issues/217
->ignoreErrorsOnPackage('league/flysystem', [
ErrorType::DEV_DEPENDENCY_IN_PROD,
])
->ignoreErrorsOnPackage('symfony/routing', [
ErrorType::DEV_DEPENDENCY_IN_PROD,
])
Expand Down
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@
"symfony/mime": "^6.4 || ^7.0"
},
"require-dev": {
"ext-mbstring": "*",
"async-aws/s3": "^2.6",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth to lower the requirement

"friendsofphp/php-cs-fixer": "^3.41",
"league/flysystem": "^3.29",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^10.4",
"shipmonk/composer-dependency-analyser": "^1.7",
"shipmonk/composer-dependency-analyser": "^1.8",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed to ignore ext-mbstring issues

"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-client": "^6.4 || ^7.0",
"symfony/monolog-bundle": "^3.10",
Expand All @@ -56,7 +59,9 @@
},
"suggest": {
"symfony/monolog-bundle": "Enables logging througout the generating process.",
"symfony/twig-bundle": "Allows you to use Twig to render templates into PDF",
"monolog/monolog": "Enables logging througout the generating process."
"symfony/twig-bundle": "Allows you to use Twig to render templates into PDF.",
"monolog/monolog": "Enables logging througout the generating process.",
"async-aws/s3": "Upload any file to aws s3 compatible endpoints supporting multi part upload without memory overhead.",
"league/flysystem-bundle": "Upload any file using this filesystem abstraction package."
}
}
11 changes: 10 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ The default configuration for the bundle looks like :

Assuming you have the following client configured.

```yaml
<details>
<summary>app/config/framework.yaml</summary>

```yaml
# app/config/framework.yaml

framework:
Expand All @@ -19,8 +21,13 @@ framework:
base_uri: 'http://localhost:3000'
```

</details>

Then

<details>
<summary>app/config/sensiolabs_gotenberg.yaml</summary>

```yaml
# app/config/sensiolabs_gotenberg.yaml

Expand Down Expand Up @@ -1237,6 +1244,8 @@ sensiolabs_gotenberg:
# - { name: 'X-Custom-Header', value: 'custom-header-value' }
```

</details>

> [!TIP]
> For more information about the [PDF properties](https://gotenberg.dev/docs/routes#page-properties-chromium)
> or [screenshot properties](https://gotenberg.dev/docs/routes#screenshots-route).
Expand Down
Loading