Skip to content

Commit 037ad76

Browse files
#5 Update README. Add docs, CHANGELOG & CONTRIBUTING.
1 parent f72177f commit 037ad76

6 files changed

Lines changed: 153 additions & 34 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
v1.0.0
2+
------
3+
4+
* Initial stable release
5+
6+
## BC breaks
7+
8+
* [#3](https://github.com/cleverage/cache-process-bundle/issues/3) Bump dependency "cleverage/process-bundle": "^4.0"
9+
* [#5](https://github.com/cleverage/cache-process-bundle/issues/5) Update services according to Symfony best practices. Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
10+
Services must be prefixed with the bundle alias instead of using fully qualified class names => `cleverage_cache_process`
11+
12+
### Changes
13+
14+
* [#4](https://github.com/cleverage/cache-process-bundle/issues/4) Add Makefile & .docker for local standalone usage
15+
* [#4](https://github.com/cleverage/cache-process-bundle/issues/4) Add rector, phpstan & php-cs-fixer configurations & apply it
16+
17+
v0.3
18+
------
19+
20+
* Legacy release

CONTRIBUTING.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Contributing
2+
============
3+
4+
First of all, **thank you** for contributing, **you are awesome**!
5+
6+
Here are a few rules to follow in order to ease code reviews, and discussions before
7+
maintainers accept and merge your work.
8+
9+
You MUST run the quality & test suites.
10+
11+
You SHOULD write (or update) unit tests.
12+
13+
You SHOULD write documentation.
14+
15+
Please, write [commit messages that make sense](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
16+
and [rebase your branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) before submitting your Pull Request.
17+
18+
One may ask you to [squash your commits](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)
19+
too. This is used to "clean" your Pull Request before merging it (we don't want
20+
commits such as `fix tests`, `fix 2`, `fix 3`, etc.).
21+
22+
Thank you!
23+
24+
## Running the quality & test suites
25+
26+
Tests suite uses Docker environments in order to be idempotent to OS's. More than this
27+
PHP version is written inside the Dockerfile; this assures to test the bundle with
28+
the same resources. No need to have PHP installed.
29+
30+
You only need Docker set it up.
31+
32+
To allow testing environments more smooth we implemented **Makefile**.
33+
You have two commands available:
34+
35+
```bash
36+
make quality
37+
```
38+
39+
```bash
40+
make tests
41+
```
42+
43+
## Deprecations notices
44+
45+
When a feature should be deprecated, or when you have a breaking change for a future version, please :
46+
* [Fill an issue](https://github.com/cleverage/cache-process-bundl/issues/new)
47+
* Add TODO comments with the following format: `@TODO deprecated v2.0`
48+
* Trigger a deprecation error: `@trigger_error('This feature will be deprecated in v2.0', E_USER_DEPRECATED);`
49+
50+
You can check which deprecation notice is triggered in tests
51+
* `make bash`
52+
* `SYMFONY_DEPRECATIONS_HELPER=0 ./vendor/bin/phpunit`

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2015-2019 Clever-Age
3+
Copyright (c) Clever-Age
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,22 @@
11
CleverAge/CacheProcessBundle
22
=======================
33

4-
See process bundle documentation
4+
This bundle is a part of the [CleverAge/ProcessBundle](https://github.com/cleverage/process-bundle) project.
5+
It provides [Cache](https://symfony.com/doc/current/components/cache.html) integration on Process bundle.
56

6-
## Help needed
7-
8-
This bundle is a mess, it doesn't require the proper dependencies, it uses missing methods (transformValue), there is a
9-
general lack of comments and annotations and it needs to be properly migrated to PHP7.1+.
10-
11-
Also we need to check if tests are ok.
7+
Compatible with [Symfony stable version and latest Long-Term Support (LTS) release](https://symfony.com/releases).
128

139
## Documentation
1410

15-
Contains tasks and transformers to handle cache.
16-
17-
Activation
18-
----------
19-
20-
Activated if cache pool `cleverage_process` is defined.
21-
22-
Task reference
23-
--------------
24-
25-
* **Service**: `CleverAge\ProcessBundle\Transformer\ArrayFilterTransformer`
26-
* **Transformer code**: `array_filter`
27-
28-
Accepted inputs
29-
---------------
30-
31-
`array` or `\Iterable`
11+
For usage documentation, see:
12+
[docs/index.md](docs/index.md)
3213

33-
Possible outputs
34-
----------------
14+
## Support & Contribution
3515

36-
`array` containing only filtered data
16+
For general support and questions, please use [Github](https://github.com/cleverage/cache-process-bundle/issues).
17+
If you think you found a bug or you have a feature idea to propose, feel free to open an issue after looking at the [contributing](CONTRIBUTING.md) guide.
3718

38-
Options
39-
-------
19+
## License
4020

41-
| Code | Type | Required | Default | Description |
42-
| ---- | ---- | :------: | ------- | ----------- |
43-
| `condition` | `array` | | `[]` | See [ConditionTrait](TODO) |
44-
____
21+
This bundle is under the MIT license.
22+
For the whole copyright, see the [LICENSE](LICENSE) file distributed with this source code.

docs/index.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Prerequisite
2+
3+
CleverAge/ProcessBundle must be [installed](https://github.com/cleverage/process-bundle/blob/main/docs/01-quick_start.md#installation.
4+
5+
## Installation
6+
7+
Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
8+
of the Composer documentation.
9+
10+
Open a command console, enter your project directory and install it using composer:
11+
12+
```bash
13+
composer require cleverage/cache-process-bundle
14+
```
15+
16+
Remember to add the following line to config/bundles.php (not required if Symfony Flex is used)
17+
18+
```php
19+
CleverAge\CacheProcessBundle\CleverAgeCacheProcessBundle::class => ['all' => true],
20+
```
21+
22+
## Reference
23+
24+
- Tasks
25+
- TODO

docs/reference/tasks/_template.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
TaskName
2+
========
3+
4+
_Describe main goal an use cases of the task_
5+
6+
Task reference
7+
--------------
8+
9+
* **Service**: `ClassName`
10+
11+
Accepted inputs
12+
---------------
13+
14+
_Description of allowed types_
15+
16+
Possible outputs
17+
----------------
18+
19+
_Description of possible types_
20+
21+
Options
22+
-------
23+
24+
| Code | Type | Required | Default | Description |
25+
| ---- | ---- | :------: | ------- | ----------- |
26+
| `code` | `type` | **X** _or nothing_ | `default value` _if available_ | _description_ |
27+
28+
Examples
29+
--------
30+
31+
_YAML samples and explanations_
32+
33+
* Example 1
34+
- details
35+
- details
36+
37+
```yaml
38+
# Task configuration level
39+
code:
40+
service: '@service_ref'
41+
options:
42+
a: 1
43+
b: 2
44+
```

0 commit comments

Comments
 (0)