migration symfony 5 4 (#300)

* symfony 5.4 (diff dev)

* symfony 5.4 (working)

* symfony 5.4 (update autoload)

* symfony 5.4 (remove swiftmailer mailer implementation)

* symfony 5.4 (php doc and split Global accessor class)


### Impacted packages:

composer require php:">=7.2.5 <8.0.0" symfony/console:5.4.* symfony/dotenv:5.4.* symfony/framework-bundle:5.4.* symfony/twig-bundle:5.4.* symfony/yaml:5.4.* --update-with-dependencies

composer require symfony/stopwatch:5.4.* symfony/web-profiler-bundle:5.4.* --dev --update-with-dependencies
This commit is contained in:
bdalsass
2022-06-16 09:13:24 +02:00
committed by GitHub
parent abb13b70b9
commit 79da71ecf8
2178 changed files with 87439 additions and 59451 deletions

View File

@@ -16,6 +16,6 @@ namespace Symfony\Component\Dotenv\Exception;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
interface ExceptionInterface
interface ExceptionInterface extends \Throwable
{
}

View File

@@ -20,14 +20,14 @@ final class FormatException extends \LogicException implements ExceptionInterfac
{
private $context;
public function __construct($message, FormatExceptionContext $context, $code = 0, \Exception $previous = null)
public function __construct(string $message, FormatExceptionContext $context, int $code = 0, \Throwable $previous = null)
{
$this->context = $context;
parent::__construct(sprintf("%s in \"%s\" at line %d.\n%s", $message, $context->getPath(), $context->getLineno(), $context->getDetails()), $code, $previous);
}
public function getContext()
public function getContext(): FormatExceptionContext
{
return $this->context;
}

View File

@@ -21,7 +21,7 @@ final class FormatExceptionContext
private $lineno;
private $cursor;
public function __construct($data, $path, $lineno, $cursor)
public function __construct(string $data, string $path, int $lineno, int $cursor)
{
$this->data = $data;
$this->path = $path;
@@ -29,17 +29,17 @@ final class FormatExceptionContext
$this->cursor = $cursor;
}
public function getPath()
public function getPath(): string
{
return $this->path;
}
public function getLineno()
public function getLineno(): int
{
return $this->lineno;
}
public function getDetails()
public function getDetails(): string
{
$before = str_replace("\n", '\n', substr($this->data, max(0, $this->cursor - 20), min(20, $this->cursor)));
$after = str_replace("\n", '\n', substr($this->data, $this->cursor, 20));

View File

@@ -18,7 +18,7 @@ namespace Symfony\Component\Dotenv\Exception;
*/
final class PathException extends \RuntimeException implements ExceptionInterface
{
public function __construct($path, $code = 0, \Exception $previous = null)
public function __construct(string $path, int $code = 0, \Throwable $previous = null)
{
parent::__construct(sprintf('Unable to read the "%s" environment file.', $path), $code, $previous);
}