Skip to content

Commit 3f1554c

Browse files
authored
Merge pull request laravel-doctrine#594 from TomHAnderson/doc/proof1
3.0 docs proof 1
2 parents cc80762 + 0673cbf commit 3f1554c

File tree

4 files changed

+24
-37
lines changed

4 files changed

+24
-37
lines changed

docs/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Config settings
292292
* ``cache.query`` - Cache transformation of a DQL query to its SQL counterpart.
293293
* ``cache.result`` - The result cache can be used to cache the results of your
294294
* queries so you don't have to query the database or hydrate the data again
295-
* after the first time.
295+
after the first time.
296296

297297
Gedmo
298298
=====

docs/entities.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ with properties and getters and setters.
2929
Generally the properties are protected or private, so they only can be accessed
3030
through getters and setters.
3131

32+
However, with property hooks in 8.4, entities composed of gloal properties only
33+
may become the norm.
34+
3235
The domain/business logic is completely separated from the persistence logic.
3336
This means we have to tell Doctrine how it should map the columns from the
3437
database to our Entity class. In this example we are using annotations.
@@ -47,8 +50,6 @@ You can easily add on new relations with ``->add()``, remove them with
4750
The ``Scientist`` entity used in the example above looks like this when using
4851
annotations for the meta data.
4952

50-
Coding note: Thanks to property hooks in PHP 8.4, getters and setters may
51-
no longer be necessary.
5253

5354
.. code-block:: php
5455

docs/index.rst

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Laravel Doctrine ORM
66
:align: center
77
:scale: 25 %
88

9+
This is the documentation for `laravel-doctrine/orm <https://github.com/laravel-doctrine/orm>`_
10+
911
An integration library for Laravel and Doctrine ORM.
1012
Version 3 of this library supports Laravel 10+,
1113
Doctrine ORM ^3.0, and Doctrine DBAL ^4.0.
@@ -51,23 +53,6 @@ object-oriented programming if persistence and entities are seperate.
5153
pagination
5254

5355

54-
Features
55-
--------
56-
57-
* Easy configuration
58-
* Pagination
59-
* Preconfigured metadata, connections and caching
60-
* Extendable: extend or add your own drivers for metadata, connections or cache
61-
* Change metadata, connection or cache settings easy with a resolved hook
62-
* Annotations, yaml, xml, config and static php meta data mappings
63-
* Multiple entity managers and connections
64-
* Laravel naming strategy
65-
* Simple authentication implementation
66-
* Password reminders implementation
67-
* Doctrine console commands
68-
* DoctrineExtensions supported
69-
* Timestamps, Softdeletes and TablePrefix listeners
70-
7156
.. role:: raw-html(raw)
7257
:format: html
7358

docs/metadata.rst

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Metadata
33
========
44

5-
Because Doctrine entities dont extend any smart base class, we have to tell
5+
Because Doctrine entities do not extend any smart ancestor class, we have to tell
66
Doctrine how to map the data from the database into the entity. There are
77
multiple ways of doing this.
88

@@ -65,26 +65,27 @@ App.Entities.Article.dcm.xml
6565

6666
.. code-block:: xml
6767
68-
<?xml version="1.0" encoding="UTF-8"?>
69-
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
70-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
71-
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
72-
http://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
73-
74-
<entity name="App\Entities\Article" table="articles">
75-
<id name="id" type="integer" column="id">
76-
<generator strategy="AUTO"/>
77-
<sequence-generator sequence-name="tablename_seq" allocation-size="100" initial-value="1" />
78-
</id>
79-
<field name="title" column="title" type="string" />
80-
</entity>
81-
</doctrine-mapping>
82-
```
68+
<?xml version="1.0" encoding="UTF-8"?>
69+
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
70+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
71+
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
72+
http://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
73+
74+
<entity name="App\Entities\Article" table="articles">
75+
<id name="id" type="integer" column="id">
76+
<generator strategy="AUTO"/>
77+
<sequence-generator sequence-name="tablename_seq" allocation-size="100" initial-value="1" />
78+
</id>
79+
<field name="title" column="title" type="string" />
80+
</entity>
81+
</doctrine-mapping>
82+
8383
8484
More information about XML mappings:
8585
https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/xml-mapping.html
8686

87-
### Config files
87+
Config files
88+
------------
8889

8990
This package adds another option, which leverages Laravel's config system.
9091
In addition to setting `meta`, this also requires setting `mapping_file`.

0 commit comments

Comments
 (0)