Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
8f8ba416
Commit
8f8ba416
authored
May 03, 2013
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[1.1] Update all symfony version references in the docs to 2.3
parent
7a14b209
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
22 deletions
+17
-22
doc/cookbook/validator_yaml.rst
doc/cookbook/validator_yaml.rst
+1
-1
doc/providers/form.rst
doc/providers/form.rst
+7
-7
doc/providers/security.rst
doc/providers/security.rst
+2
-2
doc/providers/translation.rst
doc/providers/translation.rst
+3
-3
doc/providers/twig.rst
doc/providers/twig.rst
+1
-1
doc/providers/validator.rst
doc/providers/validator.rst
+3
-8
No files found.
doc/cookbook/validator_yaml.rst
View file @
8f8ba416
...
...
@@ -11,7 +11,7 @@ your ``composer.json`` file:
.. code-block:: json
"require": {
"symfony/yaml": "~2.
1
"
"symfony/yaml": "~2.
3
"
}
Next, you need to tell the Validation Service that you are not using
...
...
doc/providers/form.rst
View file @
8f8ba416
...
...
@@ -55,7 +55,7 @@ Registering
.. code-block:: json
"require": {
"symfony/form": "~2.
1.4
"
"symfony/form": "~2.
3
"
}
If you are going to use the validation extension with forms, you must also
...
...
@@ -65,9 +65,9 @@ Registering
.. code-block:: json
"require": {
"symfony/validator": "~2.
1
",
"symfony/config": "~2.
1
",
"symfony/translation": "~2.
1
"
"symfony/validator": "~2.
3
",
"symfony/config": "~2.
3
",
"symfony/translation": "~2.
3
"
}
The Symfony Form Component relies on the PHP intl extension. If you don't have
...
...
@@ -76,7 +76,7 @@ Registering
.. code-block:: json
"require": {
"symfony/locale": "~2.
1
"
"symfony/locale": "~2.
3
"
}
If you want to use forms in your Twig templates, make sure to install the
...
...
@@ -85,7 +85,7 @@ Registering
.. code-block:: json
"require": {
"symfony/twig-bridge": "~2.
1
"
"symfony/twig-bridge": "~2.
3
"
}
Usage
...
...
@@ -199,4 +199,4 @@ Traits
$app->form($data);
For more information, consult the `Symfony2 Forms documentation
<http://symfony.com/doc/2.
1
/book/forms.html>`_.
<http://symfony.com/doc/2.
3
/book/forms.html>`_.
doc/providers/security.rst
View file @
8f8ba416
...
...
@@ -60,7 +60,7 @@ Registering
.. code-block:: json
"require": {
"symfony/security": "~2.
1
"
"symfony/security": "~2.
3
"
}
.. caution::
...
...
@@ -76,7 +76,7 @@ Usage
The Symfony Security component is powerful. To learn more about it, read the
`Symfony2 Security documentation
<http://symfony.com/doc/2.
1
/book/security.html>`_.
<http://symfony.com/doc/2.
3
/book/security.html>`_.
.. tip::
...
...
doc/providers/translation.rst
View file @
8f8ba416
...
...
@@ -50,7 +50,7 @@ Registering
.. code-block:: json
"require": {
"symfony/translation": "~2.
1
"
"symfony/translation": "~2.
3
"
}
Usage
...
...
@@ -126,8 +126,8 @@ file:
.. code-block:: json
"require": {
"symfony/config": "~2.
1
",
"symfony/yaml": "~2.
1
"
"symfony/config": "~2.
3
",
"symfony/yaml": "~2.
3
"
}
Next, you have to create the language mappings in YAML files. A naming you can
...
...
doc/providers/twig.rst
View file @
8f8ba416
...
...
@@ -60,7 +60,7 @@ some Symfony2 components and Twig. Add it as a dependency to your
.. code-block:: json
"require": {
"symfony/twig-bridge": "~2.
1
"
"symfony/twig-bridge": "~2.
3
"
}
When present, the ``TwigServiceProvider`` will provide you with the following
...
...
doc/providers/validator.rst
View file @
8f8ba416
...
...
@@ -44,7 +44,7 @@ Registering
.. code-block:: json
"require": {
"symfony/validator": "~2.
1
"
"symfony/validator": "~2.
3
"
}
Usage
...
...
@@ -131,12 +131,12 @@ the class properties and getters, and then call the ``validate`` method::
$book->title = 'My Book';
$book->author = $author;
$metadata = $app['validator.mapping.class_metadata_factory']->get
ClassMetadata
('Author');
$metadata = $app['validator.mapping.class_metadata_factory']->get
MetadataFor
('Author');
$metadata->addPropertyConstraint('first_name', new Assert\NotBlank());
$metadata->addPropertyConstraint('first_name', new Assert\Length(array('min' => 10)));
$metadata->addPropertyConstraint('last_name', new Assert\Length(array('min' => 10)));
$metadata = $app['validator.mapping.class_metadata_factory']->get
ClassMetadata
('Book');
$metadata = $app['validator.mapping.class_metadata_factory']->get
MetadataFor
('Book');
$metadata->addPropertyConstraint('title', new Assert\Length(array('min' => 10)));
$metadata->addPropertyConstraint('author', new Assert\Valid());
...
...
@@ -150,11 +150,6 @@ the class properties and getters, and then call the ``validate`` method::
echo 'The author is valid';
}
.. note::
If you are using Symfony 2.2, replace the ``getClassMetadata`` calls with
calls to the new ``getMetadataFor`` method.
You can also declare the class constraint by adding a static
``loadValidatorMetadata`` method to your classes::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment