Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Updated reference articles to Symfony 4#8643
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
da67105ef2a044e80995b206bf70f709035File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,17 +12,17 @@ Full Default Configuration | ||
| .. code-block:: yaml | ||
| # config/packages/doctrine.yaml | ||
| doctrine: | ||
| dbal: | ||
| default_connection: default | ||
| types: | ||
| # A collection of custom types | ||
| # Example | ||
| some_custom_type: | ||
| class:App\DBAL\MyCustomType | ||
| commented: true | ||
| connections: | ||
| # A collection of different named connections (e.g. default, conn2, etc) | ||
| @@ -75,11 +75,11 @@ Full Default Configuration | ||
| mapping_types: | ||
| # an array of mapping types | ||
| name: [] | ||
| # If defined, only the tables whose names match this regular expression are managed | ||
| # by the schema tool (in this example, any table name not starting with `wp_`) | ||
| #schema_filter: '/^(?!wp_)/' | ||
| slaves: | ||
| # a collection of named slave connections (e.g. slave1, slave2) | ||
| @@ -163,17 +163,17 @@ Full Default Configuration | ||
| # a collection of string functions | ||
| string_functions: | ||
| # example | ||
| # test_string:App\DQL\StringFunction | ||
| # a collection of numeric functions | ||
| numeric_functions: | ||
| # example | ||
| # test_numeric:App\DQL\NumericFunction | ||
| # a collection of datetime functions | ||
| datetime_functions: | ||
| # example | ||
| # test_datetime:App\DQL\DatetimeFunction | ||
| # Register SQL Filters in the entity manager | ||
| filters: | ||
| @@ -184,7 +184,7 @@ Full Default Configuration | ||
| .. code-block:: xml | ||
| <!-- config/packages/doctrine.xml --> | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <container xmlns="http://symfony.com/schema/dic/services" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| @@ -204,22 +204,22 @@ Full Default Configuration | ||
| user="user" | ||
| password="secret" | ||
| driver="pdo_mysql" | ||
| driver-class="App\DBAL\MyDatabaseDriver" | ||
| path="%kernel.project_dir%/var/data/data.sqlite" | ||
| memory="true" | ||
| unix-socket="/tmp/mysql.sock" | ||
| wrapper-class="App\DBAL\MyConnectionWrapper" | ||
| charset="UTF8" | ||
| logging="%kernel.debug%" | ||
| platform-service="App\DBAL\MyDatabasePlatformService" | ||
| server-version="5.6" | ||
| keep-slave="false" | ||
| > | ||
| <doctrine:option key="foo">bar</doctrine:option> | ||
| <doctrine:mapping-type name="enum">string</doctrine:mapping-type> | ||
| </doctrine:connection> | ||
| <doctrine:connection name="conn1" /> | ||
| <doctrine:type name="custom">App\DBAL\MyCustomType</doctrine:type> | ||
| </doctrine:dbal> | ||
| <doctrine:orm | ||
| @@ -247,15 +247,15 @@ Full Default Configuration | ||
| <doctrine:dql> | ||
| <doctrine:string-function name="test_string"> | ||
| App\DQL\StringFunction | ||
| </doctrine:string-function> | ||
| <doctrine:numeric-function name="test_numeric"> | ||
| App\DQL\NumericFunction | ||
| </doctrine:numeric-function> | ||
| <doctrine:datetime-function name="test_datetime"> | ||
| App\DQL\DatetimeFunction | ||
| </doctrine:datetime-function> | ||
| </doctrine:dql> | ||
| </doctrine:entity-manager> | ||
| @@ -301,23 +301,23 @@ The following block shows all possible configuration keys: | ||
| password: secret | ||
| driver: pdo_mysql | ||
| # the DBAL driverClass option | ||
| driver_class:App\DBAL\MyDatabaseDriver | ||
| # the DBAL driverOptions option | ||
| options: | ||
| foo: bar | ||
| path: '%kernel.project_dir%/app/data/data.sqlite' | ||
| memory: true | ||
| unix_socket: /tmp/mysql.sock | ||
| # the DBAL wrapperClass option | ||
| wrapper_class:App\DBAL\MyConnectionWrapper | ||
| charset: UTF8 | ||
| logging: '%kernel.debug%' | ||
| platform_service:App\DBAL\MyDatabasePlatformService | ||
| server_version: 5.6 | ||
| mapping_types: | ||
| enum: string | ||
| types: | ||
| custom:App\DBAL\MyCustomType | ||
| .. code-block:: xml | ||
| @@ -339,19 +339,19 @@ The following block shows all possible configuration keys: | ||
| user="user" | ||
| password="secret" | ||
| driver="pdo_mysql" | ||
| driver-class="App\DBAL\MyDatabaseDriver" | ||
| path="%kernel.project_dir%/var/data/data.sqlite" | ||
| memory="true" | ||
| unix-socket="/tmp/mysql.sock" | ||
| wrapper-class="App\DBAL\MyConnectionWrapper" | ||
| charset="UTF8" | ||
| logging="%kernel.debug%" | ||
| platform-service="App\DBAL\MyDatabasePlatformService" | ||
| server-version="5.6"> | ||
| <doctrine:option key="foo">bar</doctrine:option> | ||
| <doctrine:mapping-type name="enum">string</doctrine:mapping-type> | ||
| <doctrine:type name="custom">App\DBAL\MyCustomType</doctrine:type> | ||
| </doctrine:dbal> | ||
| </doctrine:config> | ||
| </container> | ||
| @@ -480,7 +480,7 @@ The following example shows an overview of the caching configurations: | ||
| # the 'service' type requires to define the 'id' option too | ||
| query_cache_driver: | ||
| type: service | ||
| id:App\ORM\MyCacheService | ||
| Mapping Configuration | ||
| ~~~~~~~~~~~~~~~~~~~~~ | ||
| @@ -492,42 +492,35 @@ you can control. The following configuration options exist for a mapping: | ||
| type | ||
| .... | ||
| One of ``annotation`` (the default value), ``xml``, ``yml``, ``php`` or | ||
| ``staticphp``. Thisspecifies which type of metadata type your mapping uses. | ||
| dir | ||
| ... | ||
| Absolute path to the mapping or entity files (depending on the driver). The | ||
| default value is ``%kernel.project_dir%/src/Entity/``. | ||
| prefix | ||
| ...... | ||
| A common namespace prefix that all entities of this mapping share. This prefix | ||
| should never conflict with prefixes of other defined mappings otherwise some of | ||
| your entities cannot be found by Doctrine. This option defaults to | ||
| ``App\Entity`` because it's recommended to store the entities in ``src/Entity/``. | ||
| alias | ||
| ..... | ||
| Doctrine offers a way to alias entity namespaces to simpler, shorter names | ||
| to be used in DQL queries or for Repository access. It's default value is ``App``. | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Btw, I took out these "default value is". These aren't really the default values - it's just what you get out-of-the-box with the recipe. And I think if you're configuring these things, then you are clearly looking at your | ||
| is_bundle | ||
| ......... | ||
| This option is ``false`` by default and it's considered a legacy option. It was | ||
| only useful in previous Symfony versions, when it was recommended to use bundles | ||
| to organize the application code. | ||
| Custom Mapping Entities in a Bundle | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| @@ -593,9 +586,7 @@ directory instead: | ||
| Mapping Entities Outside of a Bundle | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| For example, the following looks for entity classes in the ``Entity`` | ||
| namespace in the ``src/Entity`` directory and gives them an ``App`` alias | ||
| (so you can say things like ``App:Post``): | ||
| @@ -662,7 +653,7 @@ If the ``type`` on the bundle configuration isn't set, the DoctrineBundle | ||
| will try to detect the correct mapping configuration format for the bundle. | ||
| DoctrineBundle will look for files matching ``*.orm.[FORMAT]`` (e.g. | ||
| ``Post.orm.yaml``) in the configured ``dir`` of your mapping (if you're mapping | ||
| a bundle, then ``dir`` is relative to the bundle's directory). | ||
| The bundle looks for (in this order) XML, YAML and PHP files. | ||
Uh oh!
There was an error while loading.Please reload this page.