WIP: Symfony 6 project remake #2

Draft
skobkin wants to merge 103 commits from symfony6_remake into master
6 changed files with 35 additions and 44 deletions
Showing only changes of commit c7256f5a50 - Show all commits

View file

@ -1,8 +0,0 @@
<?php
namespace src\PointToolsBundle\Exception\Factory\Blog;
class FactoryException extends \Exception
{
}

View file

@ -1,10 +0,0 @@
<?php
namespace src\PointToolsBundle\Exception\Factory\Blog;
use src\PointToolsBundle\Exception\Factory\Blog\FactoryException;
class InvalidDataException extends FactoryException
{
}

View file

@ -1,26 +0,0 @@
<?php
namespace src\PointToolsBundle\Exception\Factory\Blog;
use src\PointToolsBundle\DTO\Api\Post;
use src\PointToolsBundle\Exception\Factory\Blog\InvalidDataException;
class InvalidPostDataException extends InvalidDataException
{
/**
* @var Post
*/
private $post;
public function __construct($message = '', Post $post, $code = 0, \Exception $previous = null)
{
$this->post = $post;
parent::__construct($message, $code, $previous);
}
public function getPost(): Post
{
return $this->post;
}
}

View file

@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace App\Exception\Factory\Blog;
class FactoryException extends \Exception
{
}

View file

@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace App\Exception\Factory\Blog;
class InvalidDataException extends FactoryException
{
}

View file

@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace App\Exception\Factory\Blog;
use App\DTO\Api\Post;
class InvalidPostDataException extends InvalidDataException
{
public function __construct(
public readonly Post $post,
$code = 0,
\Exception $previous = null
) {
parent::__construct('Invalid post data', $code, $previous);
}
}