From 1aa9e7e8665b8b23666f8346217f8046906df619 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Sun, 28 Oct 2012 10:10:41 +0100 Subject: [PATCH 1/5] [Dependency Injection] small changes --- components/dependency_injection/advanced.rst | 6 +++--- components/dependency_injection/compilation.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index 5c9eafd21e4..e0fa3ea81d6 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -107,18 +107,18 @@ the service itself gets loaded. To do so, you can use the ``file`` directive. services: foo: class: Example\Foo\Bar - file: "%kernel.root_dir%/src/path/to/file/foo.php" + file: "%app.root_dir%/src/path/to/file/foo.php" .. code-block:: xml - %kernel.root_dir%/src/path/to/file/foo.php + %app.root_dir%/src/path/to/file/foo.php .. code-block:: php $definition = new Definition('Example\Foo\Bar'); - $definition->setFile('%kernel.root_dir%/src/path/to/file/foo.php'); + $definition->setFile('%app.root_dir%/src/path/to/file/foo.php'); $container->setDefinition('foo', $definition); Notice that symfony will internally call the PHP function require_once diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst index b4783616682..1d0d2c4ff16 100644 --- a/components/dependency_injection/compilation.rst +++ b/components/dependency_injection/compilation.rst @@ -334,7 +334,7 @@ worlds though by using configuration files and then dumping and caching the resu configuration. The ``PhpDumper`` makes dumping the compiled container easy:: use Symfony\Component\DependencyInjection\ContainerBuilder; - use Symfony\Component\DependencyInjection\Dumper\PhpDumper + use Symfony\Component\DependencyInjection\Dumper\PhpDumper; $file = __DIR__ .'/cache/container.php'; From b8a17f6a28ce7b38e2b91c8a848e05630283dda6 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 9 Nov 2012 19:58:47 -0600 Subject: [PATCH 2/5] [#1860] Reverting the removal of the kernel.root_dir use I don't see any disadvantages for using a parameter here that *happens* to be used in the framework - the advantage is that it's meaningful for half the audience (and for component users, any parameter here will be a "generic") --- components/dependency_injection/advanced.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index e0fa3ea81d6..5c9eafd21e4 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -107,18 +107,18 @@ the service itself gets loaded. To do so, you can use the ``file`` directive. services: foo: class: Example\Foo\Bar - file: "%app.root_dir%/src/path/to/file/foo.php" + file: "%kernel.root_dir%/src/path/to/file/foo.php" .. code-block:: xml - %app.root_dir%/src/path/to/file/foo.php + %kernel.root_dir%/src/path/to/file/foo.php .. code-block:: php $definition = new Definition('Example\Foo\Bar'); - $definition->setFile('%app.root_dir%/src/path/to/file/foo.php'); + $definition->setFile('%kernel.root_dir%/src/path/to/file/foo.php'); $container->setDefinition('foo', $definition); Notice that symfony will internally call the PHP function require_once From e766f4dc2372e5aa83f5d07462dd7ad6b65326e6 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Wed, 14 Nov 2012 05:45:10 -0600 Subject: [PATCH 3/5] [reference] Clarifying a few dbal config options --- reference/configuration/doctrine.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index c24a110b931..cfa355cd177 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -212,14 +212,10 @@ can control. The following configuration options exist for a mapping: Doctrine DBAL Configuration --------------------------- -.. note:: - - DoctrineBundle supports all parameters that default Doctrine drivers - accept, converted to the XML or YAML naming standards that Symfony - enforces. See the Doctrine `DBAL documentation`_ for more information. - -Besides default Doctrine options, there are some Symfony-related ones that you -can configure. The following block shows all possible configuration keys: +DoctrineBundle supports all parameters that default Doctrine drivers +accept, converted to the XML or YAML naming standards that Symfony +enforces. See the Doctrine `DBAL documentation`_ for more information. +The following block shows all possible configuration keys: .. configuration-block:: @@ -233,12 +229,15 @@ can configure. The following block shows all possible configuration keys: user: user password: secret driver: pdo_mysql + # the DBAL driverClass option driver_class: MyNamespace\MyDriverImpl + # the DBAL driverOptions option options: foo: bar path: "%kernel.data_dir%/data.sqlite" memory: true unix_socket: /tmp/mysql.sock + # the DBAL wrapperClass option wrapper_class: MyDoctrineDbalConnectionWrapper charset: UTF8 logging: "%kernel.debug%" From 88f06c6895b3b24b7e6eb65d29e48cbfc23a1230 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Wed, 14 Nov 2012 05:48:19 -0600 Subject: [PATCH 4/5] [reference] Making the link to the DBAL docs go to the actual configuration page --- reference/configuration/doctrine.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index cfa355cd177..53e6ff79571 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -303,4 +303,4 @@ which is the first one defined or the one configured via the Each connection is also accessible via the ``doctrine.dbal.[name]_connection`` service where ``[name]`` if the name of the connection. -.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/index.html +.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html From b2585aafe0f302a959ad0152f66865f0e2081bf6 Mon Sep 17 00:00:00 2001 From: David Desberg Date: Thu, 15 Nov 2012 11:54:05 -0500 Subject: [PATCH 5/5] Added MSSQL example for PDO session storage table --- cookbook/configuration/pdo_session_storage.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cookbook/configuration/pdo_session_storage.rst b/cookbook/configuration/pdo_session_storage.rst index 43a12b89c59..1a41650ffcb 100644 --- a/cookbook/configuration/pdo_session_storage.rst +++ b/cookbook/configuration/pdo_session_storage.rst @@ -182,3 +182,20 @@ For PostgreSQL, the statement should look like this: session_time integer NOT NULL, CONSTRAINT session_pkey PRIMARY KEY (session_id) ); + +Microsoft SQL Server +~~~~~~~~~~ + +For MSSQL, the statement might look like the following: + +.. code-block:: sql + + CREATE TABLE [dbo].[session]( + [session_id] [nvarchar](255) NOT NULL, + [session_value] [ntext] NOT NULL, + [session_time] [int] NOT NULL, + PRIMARY KEY CLUSTERED + ( + [session_id] ASC + ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]