-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Reference] Fixed lots of minor things using the review bot #4462
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
DoctrineBundle Configuration ("doctrine") | ||
========================================= | ||
|
||
Full default configuration | ||
Full Default Configuration | ||
-------------------------- | ||
|
||
.. configuration-block:: | ||
|
@@ -180,8 +180,10 @@ Full default configuration | |
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:doctrine="http://symfony.com/schema/dic/doctrine" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd"> | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services | ||
http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/doctrine | ||
http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd"> | ||
|
||
<doctrine:config> | ||
<doctrine:dbal default-connection="default"> | ||
|
@@ -209,16 +211,44 @@ Full default configuration | |
<doctrine:type name="custom">Acme\HelloBundle\MyCustomType</doctrine:type> | ||
</doctrine:dbal> | ||
|
||
<doctrine:orm default-entity-manager="default" auto-generate-proxy-classes="false" proxy-namespace="Proxies" proxy-dir="%kernel.cache_dir%/doctrine/orm/Proxies"> | ||
<doctrine:entity-manager name="default" query-cache-driver="array" result-cache-driver="array" connection="conn1" class-metadata-factory-name="Doctrine\ORM\Mapping\ClassMetadataFactory"> | ||
<doctrine:metadata-cache-driver type="memcache" host="localhost" port="11211" instance-class="Memcache" class="Doctrine\Common\Cache\MemcacheCache" /> | ||
<doctrine:orm | ||
default-entity-manager="default" | ||
auto-generate-proxy-classes="false" | ||
proxy-namespace="Proxies" | ||
proxy-dir="%kernel.cache_dir%/doctrine/orm/Proxies" | ||
> | ||
<doctrine:entity-manager | ||
name="default" | ||
query-cache-driver="array" | ||
result-cache-driver="array" | ||
connection="conn1" | ||
class-metadata-factory-name="Doctrine\ORM\Mapping\ClassMetadataFactory" | ||
> | ||
<doctrine:metadata-cache-driver | ||
type="memcache" | ||
host="localhost" | ||
port="11211" | ||
instance-class="Memcache" | ||
class="Doctrine\Common\Cache\MemcacheCache" | ||
/> | ||
|
||
<doctrine:mapping name="AcmeHelloBundle" /> | ||
|
||
<doctrine:dql> | ||
<doctrine:string-function name="test_string">Acme\HelloBundle\DQL\StringFunction</doctrine:string-function> | ||
<doctrine:numeric-function name="test_numeric">Acme\HelloBundle\DQL\NumericFunction</doctrine:numeric-function> | ||
<doctrine:datetime-function name="test_datetime">Acme\HelloBundle\DQL\DatetimeFunction</doctrine:datetime-function> | ||
<doctrine:string-function | ||
name="test_string" | ||
>Acme\HelloBundle\DQL\StringFunction</doctrine:string-function> | ||
|
||
<doctrine:numeric-function name="test_numeric"> | ||
Acme\HelloBundle\DQL\NumericFunction | ||
</doctrine:numeric-function> | ||
|
||
<doctrine:datetime-function name="test_datetime"> | ||
Acme\HelloBundle\DQL\DatetimeFunction | ||
</doctrine:datetime-function> | ||
</doctrine:dql> | ||
</doctrine:entity-manager> | ||
|
||
<doctrine:entity-manager name="em2" connection="conn2" metadata-cache-driver="apc"> | ||
<doctrine:mapping | ||
name="DoctrineExtensions" | ||
|
@@ -235,8 +265,8 @@ Full default configuration | |
Configuration Overview | ||
---------------------- | ||
|
||
This following configuration example shows all the configuration defaults that | ||
the ORM resolves to: | ||
This following configuration example shows all the configuration defaults | ||
that the ORM resolves to: | ||
|
||
.. code-block:: yaml | ||
|
||
|
@@ -258,8 +288,8 @@ certain classes, but those are for very advanced use-cases only. | |
Caching Drivers | ||
~~~~~~~~~~~~~~~ | ||
|
||
For the caching drivers you can specify the values "array", "apc", "memcache", "memcached", | ||
"xcache" or "service". | ||
For the caching drivers you can specify the values "array", "apc", "memcache", | ||
"memcached", "xcache" or "service". | ||
|
||
The following example shows an overview of the caching configurations: | ||
|
||
|
@@ -282,34 +312,34 @@ Mapping Configuration | |
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Explicit definition of all the mapped entities is the only necessary | ||
configuration for the ORM and there are several configuration options that you | ||
can control. The following configuration options exist for a mapping: | ||
configuration for the ORM and there are several configuration options that | ||
you can control. The following configuration options exist for a mapping: | ||
|
||
* ``type`` One of ``annotation``, ``xml``, ``yml``, ``php`` or ``staticphp``. | ||
This specifies which type of metadata type your mapping uses. | ||
|
||
* ``dir`` Path to the mapping or entity files (depending on the driver). If | ||
this path is relative it is assumed to be relative to the bundle root. This | ||
only works if the name of your mapping is a bundle name. If you want to use | ||
this option to specify absolute paths you should prefix the path with the | ||
kernel parameters that exist in the DIC (for example %kernel.root_dir%). | ||
* ``dir`` Path to the mapping or entity files (depending on the driver). | ||
If this path is relative it is assumed to be relative to the bundle root. | ||
This only works if the name of your mapping is a bundle name. If you want | ||
to use this option to specify absolute paths you should prefix the path | ||
with the kernel parameters that exist in the DIC (for example ``%kernel.root_dir%``). | ||
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. These changes look like you broke lines before the 72nd character. 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. After the word that crosses it. |
||
|
||
* ``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 the bundle namespace + ``Entity``, for example for an | ||
application bundle called ``AcmeHelloBundle`` prefix would be | ||
mappings otherwise some of your entities cannot be found by Doctrine. | ||
This option defaults to the bundle namespace + ``Entity``, for example | ||
for an application bundle called ``AcmeHelloBundle`` prefix would be | ||
``Acme\HelloBundle\Entity``. | ||
|
||
* ``alias`` Doctrine offers a way to alias entity namespaces to simpler, | ||
shorter names to be used in DQL queries or for Repository access. When using | ||
a bundle the alias defaults to the bundle name. | ||
shorter names to be used in DQL queries or for Repository access. When | ||
using a bundle the alias defaults to the bundle name. | ||
|
||
* ``is_bundle`` This option is a derived value from ``dir`` and by default is | ||
set to true if dir is relative proved by a ``file_exists()`` check that | ||
returns false. It is false if the existence check returns true. In this case | ||
an absolute path was specified and the metadata files are most likely in a | ||
directory outside of a bundle. | ||
* ``is_bundle`` This option is a derived value from ``dir`` and by default | ||
is set to true if dir is relative proved by a ``file_exists()`` check | ||
that returns false. It is false if the existence check returns true. In | ||
this case an absolute path was specified and the metadata files are most | ||
likely in a directory outside of a bundle. | ||
|
||
.. index:: | ||
single: Configuration; Doctrine DBAL | ||
|
@@ -363,8 +393,11 @@ The following block shows all possible configuration keys: | |
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:doctrine="http://symfony.com/schema/dic/doctrine" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd"> | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services | ||
http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/doctrine | ||
http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd" | ||
> | ||
|
||
<doctrine:config> | ||
<doctrine:dbal | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks strange compared to the functions below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will fix that. I first thought there was no trim transformation done on this value, it turns out there is.