mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 20:36:33 +00:00
deprecated the 3rd argument of Sandbox error classes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
* 2.8.1 (2019-XX-XX)
|
* 2.8.1 (2019-XX-XX)
|
||||||
|
|
||||||
* deprecated passing a 4th and 5th arguments to the Sandbox exception classes
|
* deprecated passing a 3rd, 4th, and 5th arguments to the Sandbox exception classes
|
||||||
* deprecated Node::setTemplateName() in favor of Node::setSourceContext()
|
* deprecated Node::setTemplateName() in favor of Node::setSourceContext()
|
||||||
|
|
||||||
* 2.8.0 (2019-04-16)
|
* 2.8.0 (2019-04-16)
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ class SecurityNotAllowedFilterError extends SecurityError
|
|||||||
|
|
||||||
public function __construct(string $message, string $functionName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
public function __construct(string $message, string $functionName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
||||||
{
|
{
|
||||||
|
if (-1 !== $lineno) {
|
||||||
|
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
if (null !== $filename) {
|
if (null !== $filename) {
|
||||||
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ class SecurityNotAllowedFunctionError extends SecurityError
|
|||||||
|
|
||||||
public function __construct(string $message, string $functionName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
public function __construct(string $message, string $functionName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
||||||
{
|
{
|
||||||
|
if (-1 !== $lineno) {
|
||||||
|
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
if (null !== $filename) {
|
if (null !== $filename) {
|
||||||
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ class SecurityNotAllowedMethodError extends SecurityError
|
|||||||
|
|
||||||
public function __construct(string $message, string $className, string $methodName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
public function __construct(string $message, string $className, string $methodName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
||||||
{
|
{
|
||||||
|
if (-1 !== $lineno) {
|
||||||
|
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
if (null !== $filename) {
|
if (null !== $filename) {
|
||||||
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ class SecurityNotAllowedPropertyError extends SecurityError
|
|||||||
|
|
||||||
public function __construct(string $message, string $className, string $propertyName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
public function __construct(string $message, string $className, string $propertyName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
||||||
{
|
{
|
||||||
|
if (-1 !== $lineno) {
|
||||||
|
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
if (null !== $filename) {
|
if (null !== $filename) {
|
||||||
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ class SecurityNotAllowedTagError extends SecurityError
|
|||||||
|
|
||||||
public function __construct(string $message, string $tagName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
public function __construct(string $message, string $tagName, int $lineno = -1, string $filename = null, \Exception $previous = null)
|
||||||
{
|
{
|
||||||
|
if (-1 !== $lineno) {
|
||||||
|
@trigger_error(sprintf('Passing $lineno as a 3th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
if (null !== $filename) {
|
if (null !== $filename) {
|
||||||
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing $filename as a 4th argument of the %s constructor is deprecated since Twig 2.8.1.', __CLASS__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user