diff options
author | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
commit | bf6655a534a6775d30cafa67bd801276bda1d98d (patch) | |
tree | c6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/instantiator/docs/en | |
parent | 94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff) | |
download | AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip |
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/instantiator/docs/en')
-rw-r--r-- | vendor/doctrine/instantiator/docs/en/index.rst | 68 | ||||
-rw-r--r-- | vendor/doctrine/instantiator/docs/en/sidebar.rst | 4 |
2 files changed, 72 insertions, 0 deletions
diff --git a/vendor/doctrine/instantiator/docs/en/index.rst b/vendor/doctrine/instantiator/docs/en/index.rst new file mode 100644 index 0000000..0c85da0 --- /dev/null +++ b/vendor/doctrine/instantiator/docs/en/index.rst | |||
@@ -0,0 +1,68 @@ | |||
1 | Introduction | ||
2 | ============ | ||
3 | |||
4 | This library provides a way of avoiding usage of constructors when instantiating PHP classes. | ||
5 | |||
6 | Installation | ||
7 | ============ | ||
8 | |||
9 | The suggested installation method is via `composer`_: | ||
10 | |||
11 | .. code-block:: console | ||
12 | |||
13 | $ composer require doctrine/instantiator | ||
14 | |||
15 | Usage | ||
16 | ===== | ||
17 | |||
18 | The instantiator is able to create new instances of any class without | ||
19 | using the constructor or any API of the class itself: | ||
20 | |||
21 | .. code-block:: php | ||
22 | |||
23 | <?php | ||
24 | |||
25 | use Doctrine\Instantiator\Instantiator; | ||
26 | use App\Entities\User; | ||
27 | |||
28 | $instantiator = new Instantiator(); | ||
29 | |||
30 | $user = $instantiator->instantiate(User::class); | ||
31 | |||
32 | Contributing | ||
33 | ============ | ||
34 | |||
35 | - Follow the `Doctrine Coding Standard`_ | ||
36 | - The project will follow strict `object calisthenics`_ | ||
37 | - Any contribution must provide tests for additional introduced | ||
38 | conditions | ||
39 | - Any un-confirmed issue needs a failing test case before being | ||
40 | accepted | ||
41 | - Pull requests must be sent from a new hotfix/feature branch, not from | ||
42 | ``master``. | ||
43 | |||
44 | Testing | ||
45 | ======= | ||
46 | |||
47 | The PHPUnit version to be used is the one installed as a dev- dependency | ||
48 | via composer: | ||
49 | |||
50 | .. code-block:: console | ||
51 | |||
52 | $ ./vendor/bin/phpunit | ||
53 | |||
54 | Accepted coverage for new contributions is 80%. Any contribution not | ||
55 | satisfying this requirement won’t be merged. | ||
56 | |||
57 | Credits | ||
58 | ======= | ||
59 | |||
60 | This library was migrated from `ocramius/instantiator`_, which has been | ||
61 | donated to the doctrine organization, and which is now deprecated in | ||
62 | favour of this package. | ||
63 | |||
64 | .. _composer: https://getcomposer.org/ | ||
65 | .. _CONTRIBUTING.md: CONTRIBUTING.md | ||
66 | .. _ocramius/instantiator: https://github.com/Ocramius/Instantiator | ||
67 | .. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard | ||
68 | .. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php | ||
diff --git a/vendor/doctrine/instantiator/docs/en/sidebar.rst b/vendor/doctrine/instantiator/docs/en/sidebar.rst new file mode 100644 index 0000000..0c36479 --- /dev/null +++ b/vendor/doctrine/instantiator/docs/en/sidebar.rst | |||
@@ -0,0 +1,4 @@ | |||
1 | .. toctree:: | ||
2 | :depth: 3 | ||
3 | |||
4 | index | ||