Skip to content

Commit

Permalink
minor #13060 [2.7] adds deprecation notices. (hhamon)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] adds deprecation notices.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #12608, #12672, #12675 #12684, #12686
| License       | MIT
| Doc PR        | ~

Commits
-------

f9fbb4f Fixes more deprecation notices as per @stof review.
fd47c07 Fixed some deprecations according to @stof feedbacks.
2a3e7d2 Normalizes deprecation notice messages.
738b9be [Validator] fixes UuidValidator deprecated class namespace.
e608ba6 [Form] adds more deprecation notices.
cd9617a [Validator] adds more deprecation notices.
a7f841e [Form] Adds a way to trigger deprecation notice on demand for VirtualFormAwareIterator class.
97efd2c Fixes more deprecation notices.
fd9c7bb Normalized @deprecated annotations.
39cfd47 Removed deprecation notices from test files.
2a9749d Fixes deprecation notices.
6f57b7b Reverted trigger_error() function calls on deprecated interfaces to prevent breaking third party projects implementing them.
86b9f6b Adds deprecation notices for structures to be removed in 3.0.
  • Loading branch information
fabpot committed Jan 5, 2015
2 parents bbc08c1 + 0819815 commit 80e4a9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Session/Flash/FlashBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,14 @@ public function clear()
/**
* Returns an iterator for flashes.
*
* @deprecated Will be removed in 3.0.
* @deprecated since version 2.4, to be removed in 3.0.
*
* @return \ArrayIterator An \ArrayIterator instance
*/
public function getIterator()
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);

return new \ArrayIterator($this->all());
}
}
6 changes: 3 additions & 3 deletions Session/Storage/Handler/LegacyPdoSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;

trigger_error('The '.__NAMESPACE__.'\LegacyPdoSessionHandler class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler class instead.', E_USER_DEPRECATED);

/**
* Session handler using a PDO connection to read and write data.
*
Expand All @@ -24,7 +26,7 @@
* @author Michael Williams <michael.williams@funsational.com>
* @author Tobias Schultze <http://tobion.de>
*
* @deprecated Deprecated since version 2.6, to be removed in 3.0. Use
* @deprecated since version 2.6, to be removed in 3.0. Use
* {@link PdoSessionHandler} instead.
*/
class LegacyPdoSessionHandler implements \SessionHandlerInterface
Expand Down Expand Up @@ -77,8 +79,6 @@ public function __construct(\PDO $pdo, array $dbOptions = array())
throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__));
}

trigger_error('"Symfony\Component\HttpFoundation\Session\Storage\Handler\LegacyPdoSessionHandler" is deprecated since version 2.6 and will be removed in 3.0. Use "Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler" instead.', E_USER_DEPRECATED);

$this->pdo = $pdo;
$dbOptions = array_merge(array(
'db_id_col' => 'sess_id',
Expand Down

0 comments on commit 80e4a9d

Please sign in to comment.