Merge branch '3.4' into 4.1
* 3.4: Use the real image URL for the filesystem tests [Finder] Update PHPdoc append() [DI] Fix phpdoc Fix code examples in PHPDoc [HttpKernel] Fix inheritdocs bumped Symfony version to 3.4.16 updated VERSION for 3.4.15 updated CHANGELOG for 3.4.15
This commit is contained in:
commit
e2107d24e2
@ -27,6 +27,7 @@ use Symfony\Component\Security\Core\Exception\TokenNotFoundException;
|
||||
* and to do the conversion of the datetime column.
|
||||
*
|
||||
* In order to use this class, you need the following table in your database:
|
||||
*
|
||||
* CREATE TABLE `rememberme_token` (
|
||||
* `series` char(88) UNIQUE PRIMARY KEY NOT NULL,
|
||||
* `value` char(88) NOT NULL,
|
||||
|
@ -19,11 +19,10 @@ use Twig\TokenParser\AbstractTokenParser;
|
||||
* Token Parser for the 'dump' tag.
|
||||
*
|
||||
* Dump variables with:
|
||||
* <pre>
|
||||
*
|
||||
* {% dump %}
|
||||
* {% dump foo %}
|
||||
* {% dump foo, bar %}
|
||||
* </pre>
|
||||
*
|
||||
* @author Julien Galenski <julien.galenski@gmail.com>
|
||||
*/
|
||||
|
@ -224,18 +224,14 @@ class FormHelper extends Helper
|
||||
* Use this helper for CSRF protection without the overhead of creating a
|
||||
* form.
|
||||
*
|
||||
* <code>
|
||||
* echo $view['form']->csrfToken('rm_user_'.$user->getId());
|
||||
* </code>
|
||||
*
|
||||
* Check the token in your action using the same CSRF token id.
|
||||
*
|
||||
* <code>
|
||||
* // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface
|
||||
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
|
||||
* throw new \RuntimeException('CSRF attack detected.');
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* @param string $tokenId The CSRF token id of the protected action
|
||||
*
|
||||
|
@ -342,6 +342,7 @@ class PrototypedArrayNode extends ArrayNode
|
||||
* one is same as this->keyAttribute and the other is 'value', then the prototype will be different.
|
||||
*
|
||||
* For example, assume $this->keyAttribute is 'name' and the value array is as follows:
|
||||
*
|
||||
* array(
|
||||
* array(
|
||||
* 'name' => 'name001',
|
||||
@ -350,6 +351,7 @@ class PrototypedArrayNode extends ArrayNode
|
||||
* )
|
||||
*
|
||||
* Now, the key is 0 and the child node is:
|
||||
*
|
||||
* array(
|
||||
* 'name' => 'name001',
|
||||
* 'value' => 'value001'
|
||||
@ -357,11 +359,13 @@ class PrototypedArrayNode extends ArrayNode
|
||||
*
|
||||
* When normalizing the value array, the 'name' element will removed from the child node
|
||||
* and its value becomes the new key of the child node:
|
||||
*
|
||||
* array(
|
||||
* 'name001' => array('value' => 'value001')
|
||||
* )
|
||||
*
|
||||
* Now only 'value' element is left in the child node which can be further simplified into a string:
|
||||
*
|
||||
* array('name001' => 'value001')
|
||||
*
|
||||
* Now, the key becomes 'name001' and the child node becomes 'value001' and
|
||||
|
@ -294,7 +294,7 @@ class Table
|
||||
* Renders table to output.
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
*
|
||||
* +---------------+-----------------------+------------------+
|
||||
* | ISBN | Title | Author |
|
||||
* +---------------+-----------------------+------------------+
|
||||
@ -302,7 +302,6 @@ class Table
|
||||
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
|
||||
* | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien |
|
||||
* +---------------+-----------------------+------------------+
|
||||
* </code>
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
@ -348,7 +347,9 @@ class Table
|
||||
/**
|
||||
* Renders horizontal header separator.
|
||||
*
|
||||
* Example: <code>+-----+-----------+-------+</code>
|
||||
* Example:
|
||||
*
|
||||
* +-----+-----------+-------+
|
||||
*/
|
||||
private function renderRowSeparator(int $type = self::SEPARATOR_MID)
|
||||
{
|
||||
@ -394,7 +395,10 @@ class Table
|
||||
/**
|
||||
* Renders table row.
|
||||
*
|
||||
* Example: <code>| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |</code>
|
||||
* Example:
|
||||
*
|
||||
* | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
|
||||
*
|
||||
*/
|
||||
private function renderRow(array $row, string $cellFormat)
|
||||
{
|
||||
|
@ -18,5 +18,8 @@ namespace Symfony\Component\DependencyInjection;
|
||||
*/
|
||||
interface ContainerAwareInterface
|
||||
{
|
||||
/**
|
||||
* Sets the container.
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container = null);
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ class Definition
|
||||
/**
|
||||
* Gets the factory.
|
||||
*
|
||||
* @return string|array The PHP function or an array containing a class/Reference and a method to call
|
||||
* @return string|array|null The PHP function or an array containing a class/Reference and a method to call
|
||||
*/
|
||||
public function getFactory()
|
||||
{
|
||||
|
@ -885,7 +885,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
* Escaped characters are: quotes (") and apostrophe (').
|
||||
*
|
||||
* Examples:
|
||||
* <code>
|
||||
*
|
||||
* echo Crawler::xpathLiteral('foo " bar');
|
||||
* //prints 'foo " bar'
|
||||
*
|
||||
@ -894,7 +894,7 @@ class Crawler implements \Countable, \IteratorAggregate
|
||||
*
|
||||
* echo Crawler::xpathLiteral('a\'b"c');
|
||||
* //prints concat('a', "'", 'b"c')
|
||||
* </code>
|
||||
*
|
||||
*
|
||||
* @param string $s String to be escaped
|
||||
*
|
||||
|
@ -186,9 +186,7 @@ class FormFieldRegistry
|
||||
/**
|
||||
* Splits a field name into segments as a web browser would do.
|
||||
*
|
||||
* <code>
|
||||
* getSegments('base[foo][3][]') = array('base', 'foo, '3', '');
|
||||
* </code>
|
||||
*
|
||||
* @param string $name The name of the field
|
||||
*
|
||||
|
@ -161,7 +161,7 @@ class FilesystemTest extends FilesystemTestCase
|
||||
*/
|
||||
public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
|
||||
{
|
||||
$sourceFilePath = 'http://symfony.com/images/common/logo/logo_symfony_header.png';
|
||||
$sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png';
|
||||
$targetFilePath = $this->workspace.\DIRECTORY_SEPARATOR.'copy_target_file';
|
||||
|
||||
file_put_contents($targetFilePath, 'TARGET FILE');
|
||||
|
@ -589,7 +589,7 @@ class Finder implements \IteratorAggregate, \Countable
|
||||
*
|
||||
* The set can be another Finder, an Iterator, an IteratorAggregate, or even a plain array.
|
||||
*
|
||||
* @param mixed $iterator
|
||||
* @param iterable $iterator
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
|
@ -24,18 +24,14 @@ use Symfony\Component\PropertyAccess\PropertyPath;
|
||||
*
|
||||
* Pass the decorated factory to the constructor:
|
||||
*
|
||||
* ```php
|
||||
* $decorator = new PropertyAccessDecorator($factory);
|
||||
* ```
|
||||
*
|
||||
* You can now pass property paths for generating choice values, labels, view
|
||||
* indices, HTML attributes and for determining the preferred choices and the
|
||||
* choice groups:
|
||||
*
|
||||
* ```php
|
||||
* // extract values from the $value property
|
||||
* $list = $createListFromChoices($objects, 'value');
|
||||
* ```
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
|
@ -198,9 +198,7 @@ class ViolationPath implements \IteratorAggregate, PropertyPathInterface
|
||||
*
|
||||
* Consider the following violation path:
|
||||
*
|
||||
* <code>
|
||||
* children[address].children[office].data.street
|
||||
* </code>
|
||||
*
|
||||
* In this example, "address" and "office" map to forms, while
|
||||
* "street does not.
|
||||
|
@ -55,11 +55,9 @@ interface FormRendererEngineInterface
|
||||
* and continues with the child of that root, the child of that child etc.
|
||||
* The following is an example for a block hierarchy:
|
||||
*
|
||||
* <code>
|
||||
* form_widget
|
||||
* text_widget
|
||||
* url_widget
|
||||
* </code>
|
||||
*
|
||||
* In this example, "url_widget" is the most specific block, while the other
|
||||
* blocks are its ancestors in the hierarchy.
|
||||
@ -93,11 +91,9 @@ interface FormRendererEngineInterface
|
||||
* and continues with the child of that root, the child of that child etc.
|
||||
* The following is an example for a block hierarchy:
|
||||
*
|
||||
* <code>
|
||||
* form_widget
|
||||
* text_widget
|
||||
* url_widget
|
||||
* </code>
|
||||
*
|
||||
* The second parameter $hierarchyLevel determines the level of the hierarchy
|
||||
* that should be rendered.
|
||||
|
@ -71,18 +71,14 @@ interface FormRendererInterface
|
||||
* Use this helper for CSRF protection without the overhead of creating a
|
||||
* form.
|
||||
*
|
||||
* <code>
|
||||
* <input type="hidden" name="token" value="<?php $renderer->renderCsrfToken('rm_user_'.$user->getId()) ?>">
|
||||
* </code>
|
||||
*
|
||||
* Check the token in your action using the same token ID.
|
||||
*
|
||||
* <code>
|
||||
* // $csrfProvider being an instance of Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface
|
||||
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
|
||||
* throw new \RuntimeException('CSRF attack detected.');
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* @param string $tokenId The ID of the CSRF token
|
||||
*
|
||||
|
@ -18,7 +18,6 @@ use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
*
|
||||
* Use this class to conveniently create new form factories:
|
||||
*
|
||||
* <code>
|
||||
* use Symfony\Component\Form\Forms;
|
||||
*
|
||||
* $formFactory = Forms::createFormFactory();
|
||||
@ -31,15 +30,12 @@ use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
* 'choices' => array('Male' => 'm', 'Female' => 'f'),
|
||||
* ))
|
||||
* ->getForm();
|
||||
* </code>
|
||||
*
|
||||
* You can also add custom extensions to the form factory:
|
||||
*
|
||||
* <code>
|
||||
* $formFactory = Forms::createFormFactoryBuilder()
|
||||
* ->addExtension(new AcmeExtension())
|
||||
* ->getFormFactory();
|
||||
* </code>
|
||||
*
|
||||
* If you create custom form types or type extensions, it is
|
||||
* generally recommended to create your own extensions that lazily
|
||||
@ -47,18 +43,15 @@ use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
* does not matter that much, you can also pass them directly to the
|
||||
* form factory:
|
||||
*
|
||||
* <code>
|
||||
* $formFactory = Forms::createFormFactoryBuilder()
|
||||
* ->addType(new PersonType())
|
||||
* ->addType(new PhoneNumberType())
|
||||
* ->addTypeExtension(new FormTypeHelpTextExtension())
|
||||
* ->getFormFactory();
|
||||
* </code>
|
||||
*
|
||||
* Support for the Validator component is provided by ValidatorExtension.
|
||||
* This extension needs a validator object to function properly:
|
||||
*
|
||||
* <code>
|
||||
* use Symfony\Component\Validator\Validation;
|
||||
* use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
|
||||
*
|
||||
@ -66,14 +59,12 @@ use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
* $formFactory = Forms::createFormFactoryBuilder()
|
||||
* ->addExtension(new ValidatorExtension($validator))
|
||||
* ->getFormFactory();
|
||||
* </code>
|
||||
*
|
||||
* Support for the Templating component is provided by TemplatingExtension.
|
||||
* This extension needs a PhpEngine object for rendering forms. As second
|
||||
* argument you should pass the names of the default themes. Here is an
|
||||
* example for using the default layout with "<div>" tags:
|
||||
*
|
||||
* <code>
|
||||
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
|
||||
*
|
||||
* $formFactory = Forms::createFormFactoryBuilder()
|
||||
@ -81,11 +72,9 @@ use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
* 'FrameworkBundle:Form',
|
||||
* )))
|
||||
* ->getFormFactory();
|
||||
* </code>
|
||||
*
|
||||
* The next example shows how to include the "<table>" layout:
|
||||
*
|
||||
* <code>
|
||||
* use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
|
||||
*
|
||||
* $formFactory = Forms::createFormFactoryBuilder()
|
||||
@ -94,7 +83,6 @@ use Symfony\Component\Form\Extension\Core\CoreExtension;
|
||||
* 'FrameworkBundle:FormTable',
|
||||
* )))
|
||||
* ->getFormFactory();
|
||||
* </code>
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
|
@ -33,23 +33,21 @@ abstract class Bundle implements BundleInterface
|
||||
private $namespace;
|
||||
|
||||
/**
|
||||
* Boots the Bundle.
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Shutdowns the Bundle.
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function shutdown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the bundle.
|
||||
*
|
||||
* It is only ever called once when the cache is empty.
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* This method can be overridden to register compilation passes,
|
||||
* other extensions, ...
|
||||
@ -98,9 +96,7 @@ abstract class Bundle implements BundleInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Bundle namespace.
|
||||
*
|
||||
* @return string The Bundle namespace
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getNamespace()
|
||||
{
|
||||
@ -112,9 +108,7 @@ abstract class Bundle implements BundleInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Bundle directory path.
|
||||
*
|
||||
* @return string The Bundle absolute path
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
||||
}
|
||||
|
||||
/**
|
||||
* Boots the current kernel.
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
|
@ -353,11 +353,9 @@ class OptionsResolver implements Options
|
||||
*
|
||||
* The normalizer should be a closure with the following signature:
|
||||
*
|
||||
* ```php
|
||||
* function (Options $options, $value) {
|
||||
* // ...
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* The closure is invoked when {@link resolve()} is called. The closure
|
||||
* has access to the resolved values of other options through the passed
|
||||
|
@ -35,12 +35,10 @@ interface UserInterface
|
||||
/**
|
||||
* Returns the roles granted to the user.
|
||||
*
|
||||
* <code>
|
||||
* public function getRoles()
|
||||
* {
|
||||
* return array('ROLE_USER');
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* Alternatively, the roles might be stored on a ``roles`` property,
|
||||
* and populated in any number of different ways when the user object
|
||||
|
@ -31,9 +31,13 @@ interface AuthenticationEntryPointInterface
|
||||
* response that "helps" the user start into the authentication process.
|
||||
*
|
||||
* Examples:
|
||||
* A) For a form login, you might redirect to the login page
|
||||
*
|
||||
* - For a form login, you might redirect to the login page
|
||||
*
|
||||
* return new RedirectResponse('/login');
|
||||
* B) For an API token authentication system, you return a 401 response
|
||||
*
|
||||
* - For an API token authentication system, you return a 401 response
|
||||
*
|
||||
* return new Response('Auth header required', 401);
|
||||
*
|
||||
* @param Request $request The request that resulted in an AuthenticationException
|
||||
|
@ -39,7 +39,7 @@ abstract class AbstractOperation implements OperationInterface
|
||||
* This array stores 'all', 'new' and 'obsolete' messages for all valid domains.
|
||||
*
|
||||
* The data structure of this array is as follows:
|
||||
* ```php
|
||||
*
|
||||
* array(
|
||||
* 'domain 1' => array(
|
||||
* 'all' => array(...),
|
||||
@ -53,7 +53,6 @@ abstract class AbstractOperation implements OperationInterface
|
||||
* ),
|
||||
* ...
|
||||
* )
|
||||
* ```
|
||||
*
|
||||
* @var array The array that stores 'all', 'new' and 'obsolete' messages
|
||||
*/
|
||||
|
@ -19,11 +19,9 @@ namespace Symfony\Component\Validator;
|
||||
* element in the validation graph and the root element that was originally
|
||||
* passed to the validator. For example, take the following graph:
|
||||
*
|
||||
* <pre>
|
||||
* (Person)---(firstName: string)
|
||||
* \
|
||||
* (address: Address)---(street: string)
|
||||
* </pre>
|
||||
*
|
||||
* If the <tt>Person</tt> object is validated and validation fails for the
|
||||
* "firstName" property, the generated violation has the <tt>Person</tt>
|
||||
|
@ -38,10 +38,9 @@ class Yaml
|
||||
* Parses a YAML file into a PHP value.
|
||||
*
|
||||
* Usage:
|
||||
* <code>
|
||||
*
|
||||
* $array = Yaml::parseFile('config.yml');
|
||||
* print_r($array);
|
||||
* </code>
|
||||
*
|
||||
* @param string $filename The path to the YAML file to be parsed
|
||||
* @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior
|
||||
|
Reference in New Issue
Block a user