Cleanup some deprecations

This commit is contained in:
Timothy Warren 2018-07-11 09:18:46 -04:00
parent e546d77670
commit b5f62d7e7e
17 changed files with 545 additions and 459 deletions

6
.gitignore vendored
View File

@ -1,12 +1,6 @@
###> symfony/framework-bundle ### ###> symfony/framework-bundle ###
.env .env
/public/bundles/ /public/bundles/
/var/ /var/
/vendor/ /vendor/
###< symfony/framework-bundle ### ###< symfony/framework-bundle ###
###> symfony/phpunit-bridge ###
.phpunit
/phpunit.xml
###< symfony/phpunit-bridge ###

View File

@ -2,7 +2,7 @@
"type": "project", "type": "project",
"license": "proprietary", "license": "proprietary",
"require": { "require": {
"php": "^7.1.0", "php": "^7.2.0",
"doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5", "doctrine/orm": "^2.5",
"sensio/framework-extra-bundle": "^5.1", "sensio/framework-extra-bundle": "^5.1",

743
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,12 +7,10 @@ use App\Form\CameraType;
use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMInvalidArgumentException; use Doctrine\ORM\ORMInvalidArgumentException;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/** /**
* Camera controller. * Camera controller.
@ -24,8 +22,7 @@ class CameraController extends Controller
/** /**
* Lists all camera entities. * Lists all camera entities.
* *
* @Route("/", name="camera_index") * @Route("/", name="camera_index", methods={"GET"})
* @Method("GET")
*/ */
public function indexAction() public function indexAction()
{ {
@ -46,8 +43,7 @@ class CameraController extends Controller
/** /**
* Creates a new camera entity. * Creates a new camera entity.
* *
* @Route("/new", name="camera_new") * @Route("/new", name="camera_new", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function newAction(Request $request) public function newAction(Request $request)
{ {
@ -72,8 +68,7 @@ class CameraController extends Controller
/** /**
* Finds and displays a camera entity. * Finds and displays a camera entity.
* *
* @Route("/{id}", name="camera_show") * @Route("/{id}", name="camera_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(Camera $camera) public function showAction(Camera $camera)
{ {
@ -88,8 +83,7 @@ class CameraController extends Controller
/** /**
* Displays a form to edit an existing camera entity. * Displays a form to edit an existing camera entity.
* *
* @Route("/{id}/edit", name="camera_edit") * @Route("/{id}/edit", name="camera_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
* @throws \LogicException * @throws \LogicException
*/ */
public function editAction(Request $request, Camera $camera) public function editAction(Request $request, Camera $camera)
@ -117,8 +111,7 @@ class CameraController extends Controller
/** /**
* Deletes a camera entity. * Deletes a camera entity.
* *
* @Route("/{id}", name="camera_delete") * @Route("/{id}", name="camera_delete", methods={"DELETE"})
* @Method("DELETE")
* @throws \LogicException * @throws \LogicException
*/ */
public function deleteAction(Request $request, Camera $camera) public function deleteAction(Request $request, Camera $camera)
@ -136,8 +129,7 @@ class CameraController extends Controller
/** /**
* Moves a camera to the previouslyOwned table * Moves a camera to the previouslyOwned table
* *
* @Route("/{id}/deacquire", name="camera_deacquire") * @Route("/{id}/deacquire", name="camera_deacquire", methods={"POST"})
* @Method("POST")
* @param Request $request * @param Request $request
* @param Camera $camera * @param Camera $camera
* @throws \LogicException * @throws \LogicException

View File

@ -4,8 +4,7 @@ namespace App\Controller;
use App\Entity\CameraType; use App\Entity\CameraType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -18,8 +17,7 @@ class CameraTypeController extends Controller
/** /**
* Lists all cameraType entities. * Lists all cameraType entities.
* *
* @Route("/", name="camera-type_index") * @Route("/", name="camera-type_index", methods={"GET"})
* @Method("GET")
*/ */
public function indexAction() public function indexAction()
{ {
@ -37,8 +35,7 @@ class CameraTypeController extends Controller
/** /**
* Creates a new cameraType entity. * Creates a new cameraType entity.
* *
* @Route("/new", name="camera-type_new") * @Route("/new", name="camera-type_new", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function newAction(Request $request) public function newAction(Request $request)
{ {
@ -63,8 +60,7 @@ class CameraTypeController extends Controller
/** /**
* Finds and displays a cameraType entity. * Finds and displays a cameraType entity.
* *
* @Route("/{id}", name="camera-type_show") * @Route("/{id}", name="camera-type_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(CameraType $cameraType) public function showAction(CameraType $cameraType)
{ {
@ -79,8 +75,7 @@ class CameraTypeController extends Controller
/** /**
* Displays a form to edit an existing cameraType entity. * Displays a form to edit an existing cameraType entity.
* *
* @Route("/{id}/edit", name="camera-type_edit") * @Route("/{id}/edit", name="camera-type_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function editAction(Request $request, CameraType $cameraType) public function editAction(Request $request, CameraType $cameraType)
{ {
@ -104,8 +99,7 @@ class CameraTypeController extends Controller
/** /**
* Deletes a cameraType entity. * Deletes a cameraType entity.
* *
* @Route("/{id}", name="camera-type_delete") * @Route("/{id}", name="camera-type_delete", methods={"DELETE"})
* @Method("DELETE")
*/ */
public function deleteAction(Request $request, CameraType $cameraType) public function deleteAction(Request $request, CameraType $cameraType)
{ {

View File

@ -2,8 +2,8 @@
namespace App\Controller; namespace App\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
class DefaultController extends Controller class DefaultController extends Controller

View File

@ -4,15 +4,10 @@ namespace App\Controller;
use App\Entity\Film; use App\Entity\Film;
use App\Form\FilmType; use App\Form\FilmType;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMInvalidArgumentException;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/** /**
* Film controller. * Film controller.
@ -24,8 +19,7 @@ class FilmController extends Controller
/** /**
* Lists all film entities. * Lists all film entities.
* *
* @Route("/", name="film_index") * @Route("/", name="film_index", methods={"GET"})
* @Method("GET")
*/ */
public function indexAction() public function indexAction()
{ {
@ -45,8 +39,7 @@ class FilmController extends Controller
/** /**
* Creates a new film entity. * Creates a new film entity.
* *
* @Route("/new", name="film_new") * @Route("/new", name="film_new", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function newAction(Request $request) public function newAction(Request $request)
{ {
@ -71,8 +64,7 @@ class FilmController extends Controller
/** /**
* Finds and displays a film entity. * Finds and displays a film entity.
* *
* @Route("/{id}", name="film_show") * @Route("/{id}", name="film_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(Film $film) public function showAction(Film $film)
{ {
@ -87,8 +79,7 @@ class FilmController extends Controller
/** /**
* Displays a form to edit an existing film entity. * Displays a form to edit an existing film entity.
* *
* @Route("/{id}/edit", name="film_edit") * @Route("/{id}/edit", name="film_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
* @throws \LogicException * @throws \LogicException
*/ */
public function editAction(Request $request, Film $film) public function editAction(Request $request, Film $film)
@ -114,8 +105,7 @@ class FilmController extends Controller
/** /**
* Deletes a film entity. * Deletes a film entity.
* *
* @Route("/{id}", name="film_delete") * @Route("/{id}", name="film_delete", methods={"DELETE"})
* @Method("DELETE")
* @throws \LogicException * @throws \LogicException
*/ */
public function deleteAction(Request $request, Film $film) public function deleteAction(Request $request, Film $film)

View File

@ -4,8 +4,7 @@ namespace App\Controller;
use App\Entity\Flash; use App\Entity\Flash;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -18,8 +17,7 @@ class FlashController extends Controller
/** /**
* Lists all flash entities. * Lists all flash entities.
* *
* @Route("/", name="flash_index") * @Route("/", name="flash_index", methods={"GET"})
* @Method("GET")
*/ */
public function indexAction() public function indexAction()
{ {
@ -39,8 +37,7 @@ class FlashController extends Controller
/** /**
* Creates a new flash entity. * Creates a new flash entity.
* *
* @Route("/new", name="flash_new") * @Route("/new", name="flash_new", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function newAction(Request $request) public function newAction(Request $request)
{ {
@ -65,8 +62,7 @@ class FlashController extends Controller
/** /**
* Finds and displays a flash entity. * Finds and displays a flash entity.
* *
* @Route("/{id}", name="flash_show") * @Route("/{id}", name="flash_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(Flash $flash) public function showAction(Flash $flash)
{ {
@ -81,8 +77,7 @@ class FlashController extends Controller
/** /**
* Displays a form to edit an existing flash entity. * Displays a form to edit an existing flash entity.
* *
* @Route("/{id}/edit", name="flash_edit") * @Route("/{id}/edit", name="flash_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function editAction(Request $request, Flash $flash) public function editAction(Request $request, Flash $flash)
{ {
@ -106,8 +101,7 @@ class FlashController extends Controller
/** /**
* Deletes a flash entity. * Deletes a flash entity.
* *
* @Route("/{id}", name="flash_delete") * @Route("/{id}", name="flash_delete", methods={"DELETE"})
* @Method("DELETE")
*/ */
public function deleteAction(Request $request, Flash $flash) public function deleteAction(Request $request, Flash $flash)
{ {

View File

@ -4,8 +4,8 @@ namespace App\Controller;
use App\Entity\Lenses; use App\Entity\Lenses;
use App\Form\LensesType; use App\Form\LensesType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\{Method, Route};
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\{Request, RedirectResponse}; use Symfony\Component\HttpFoundation\{Request, RedirectResponse};
@ -19,8 +19,7 @@ class LensesController extends Controller
/** /**
* Lists all lens entities. * Lists all lens entities.
* *
* @Route("/", name="lens_index") * @Route("/", name="lens_index", methods={"GET"})
* @Method("GET")
*/ */
public function indexAction() public function indexAction()
{ {
@ -43,8 +42,7 @@ class LensesController extends Controller
/** /**
* Creates a new lens entity. * Creates a new lens entity.
* *
* @Route("/new", name="lens_new") * @Route("/new", name="lens_new", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function newAction(Request $request) public function newAction(Request $request)
{ {
@ -69,8 +67,7 @@ class LensesController extends Controller
/** /**
* Finds and displays a lens entity. * Finds and displays a lens entity.
* *
* @Route("/{id}", name="lens_show") * @Route("/{id}", name="lens_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(Lenses $lense) public function showAction(Lenses $lense)
{ {
@ -85,8 +82,7 @@ class LensesController extends Controller
/** /**
* Displays a form to edit an existing lens entity. * Displays a form to edit an existing lens entity.
* *
* @Route("/{id}/edit", name="lens_edit") * @Route("/{id}/edit", name="lens_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function editAction(Request $request, Lenses $lens) public function editAction(Request $request, Lenses $lens)
{ {
@ -112,8 +108,7 @@ class LensesController extends Controller
/** /**
* Moves a camera to the previouslyOwned table * Moves a camera to the previouslyOwned table
* *
* @Route("/{id}/deacquire", name="lens_deacquire") * @Route("/{id}/deacquire", name="lens_deacquire", methods={"POST"})
* @Method("POST")
* @param Request $request * @param Request $request
* @param Lenses $lens * @param Lenses $lens
* @return RedirectResponse * @return RedirectResponse
@ -132,8 +127,7 @@ class LensesController extends Controller
/** /**
* Deletes a lens entity. * Deletes a lens entity.
* *
* @Route("/{id}", name="lens_delete") * @Route("/{id}", name="lens_delete", methods={"DELETE"})
* @Method("DELETE")
*/ */
public function deleteAction(Request $request, Lenses $lens) public function deleteAction(Request $request, Lenses $lens)
{ {

View File

@ -4,8 +4,8 @@ namespace App\Controller;
use App\Entity\PreviouslyOwnedCamera; use App\Entity\PreviouslyOwnedCamera;
use App\Form\PreviouslyOwnedCameraType; use App\Form\PreviouslyOwnedCameraType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\{Method, Route};
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\{RedirectResponse, Request}; use Symfony\Component\HttpFoundation\{RedirectResponse, Request};
@ -19,8 +19,7 @@ class PreviouslyOwnedCameraController extends Controller
/** /**
* Lists all previouslyOwnedCamera entities. * Lists all previouslyOwnedCamera entities.
* *
* @Route("/", name="previously-owned-camera_index") * @Route("/", name="previously-owned-camera_index", methods={"GET"})
* @Method("GET")
* @throws \UnexpectedValueException * @throws \UnexpectedValueException
*/ */
public function indexAction() public function indexAction()
@ -41,8 +40,7 @@ class PreviouslyOwnedCameraController extends Controller
/** /**
* Finds and displays a previouslyOwnedCamera entity. * Finds and displays a previouslyOwnedCamera entity.
* *
* @Route("/{id}", name="previously-owned-camera_show") * @Route("/{id}", name="previously-owned-camera_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(PreviouslyOwnedCamera $previouslyOwnedCamera) public function showAction(PreviouslyOwnedCamera $previouslyOwnedCamera)
{ {
@ -54,8 +52,7 @@ class PreviouslyOwnedCameraController extends Controller
/** /**
* Displays a form to edit an existing previouslyOwnedCamera entity. * Displays a form to edit an existing previouslyOwnedCamera entity.
* *
* @Route("/{id}/edit", name="previously-owned-camera_edit") * @Route("/{id}/edit", name="previously-owned-camera_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
* @throws \LogicException * @throws \LogicException
*/ */
public function editAction(Request $request, PreviouslyOwnedCamera $previouslyOwnedCamera) public function editAction(Request $request, PreviouslyOwnedCamera $previouslyOwnedCamera)
@ -81,8 +78,7 @@ class PreviouslyOwnedCameraController extends Controller
/** /**
* Moves a camera to the previouslyOwned table * Moves a camera to the previouslyOwned table
* *
* @Route("/{id}/reacquire", name="previously-owned-camera_reacquire") * @Route("/{id}/reacquire", name="previously-owned-camera_reacquire", methods={"POST"})
* @Method("POST")
* @param Request $request * @param Request $request
* @param PreviouslyOwnedCamera $camera * @param PreviouslyOwnedCamera $camera
* @throws \LogicException * @throws \LogicException

View File

@ -4,8 +4,7 @@ namespace App\Controller;
use App\Entity\PreviouslyOwnedFlash; use App\Entity\PreviouslyOwnedFlash;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -18,8 +17,7 @@ class PreviouslyOwnedFlashController extends Controller
/** /**
* Lists all previouslyOwnedFlash entities. * Lists all previouslyOwnedFlash entities.
* *
* @Route("/", name="previously-owned-flash_index") * @Route("/", name="previously-owned-flash_index", methods={"GET"})
* @Method("GET")
*/ */
public function indexAction() public function indexAction()
{ {
@ -38,8 +36,7 @@ class PreviouslyOwnedFlashController extends Controller
/** /**
* Creates a new previouslyOwnedFlash entity. * Creates a new previouslyOwnedFlash entity.
* *
* @Route("/new", name="previously-owned-flash_new") * @Route("/new", name="previously-owned-flash_new", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function newAction(Request $request) public function newAction(Request $request)
{ {
@ -64,8 +61,7 @@ class PreviouslyOwnedFlashController extends Controller
/** /**
* Finds and displays a previouslyOwnedFlash entity. * Finds and displays a previouslyOwnedFlash entity.
* *
* @Route("/{id}", name="previously-owned-flash_show") * @Route("/{id}", name="previously-owned-flash_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(PreviouslyOwnedFlash $previouslyOwnedFlash) public function showAction(PreviouslyOwnedFlash $previouslyOwnedFlash)
{ {
@ -77,8 +73,7 @@ class PreviouslyOwnedFlashController extends Controller
/** /**
* Displays a form to edit an existing previouslyOwnedFlash entity. * Displays a form to edit an existing previouslyOwnedFlash entity.
* *
* @Route("/{id}/edit", name="previously-owned-flash_edit") * @Route("/{id}/edit", name="previously-owned-flash_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function editAction(Request $request, PreviouslyOwnedFlash $previouslyOwnedFlash) public function editAction(Request $request, PreviouslyOwnedFlash $previouslyOwnedFlash)
{ {

View File

@ -4,8 +4,7 @@ namespace App\Controller;
use App\Entity\PreviouslyOwnedLenses; use App\Entity\PreviouslyOwnedLenses;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
@ -18,8 +17,7 @@ class PreviouslyOwnedLensesController extends Controller
/** /**
* Lists all previouslyOwnedLense entities. * Lists all previouslyOwnedLense entities.
* *
* @Route("/", name="previously-owned-lens_index") * @Route("/", name="previously-owned-lens_index", methods={"GET"})
* @Method("GET")
*/ */
public function indexAction() public function indexAction()
{ {
@ -41,8 +39,7 @@ class PreviouslyOwnedLensesController extends Controller
/** /**
* Finds and displays a previouslyOwnedLense entity. * Finds and displays a previouslyOwnedLense entity.
* *
* @Route("/{id}", name="previously-owned-lens_show") * @Route("/{id}", name="previously-owned-lens_show", methods={"GET"})
* @Method("GET")
*/ */
public function showAction(PreviouslyOwnedLenses $previouslyOwnedLense) public function showAction(PreviouslyOwnedLenses $previouslyOwnedLense)
{ {
@ -54,8 +51,7 @@ class PreviouslyOwnedLensesController extends Controller
/** /**
* Displays a form to edit an existing previouslyOwnedLense entity. * Displays a form to edit an existing previouslyOwnedLense entity.
* *
* @Route("/{id}/edit", name="previously-owned-lens_edit") * @Route("/{id}/edit", name="previously-owned-lens_edit", methods={"GET", "POST"})
* @Method({"GET", "POST"})
*/ */
public function editAction(Request $request, PreviouslyOwnedLenses $previouslyOwnedLense) public function editAction(Request $request, PreviouslyOwnedLenses $previouslyOwnedLense)
{ {

View File

@ -311,9 +311,9 @@ trait CameraTrait
* *
* @return string * @return string
*/ */
public function getNotes(): ?string public function getNotes(): string
{ {
return $this->notes; return $this->notes ?? '';
} }
/** /**
@ -335,9 +335,9 @@ trait CameraTrait
* *
* @return string * @return string
*/ */
public function getSerial(): ?string public function getSerial(): string
{ {
return $this->serial; return $this->serial ?? '';
} }
/** /**

76
src/Entity/FilmFormat.php Normal file
View File

@ -0,0 +1,76 @@
<?php declare(strict_types = 1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="film_format", schema="camera")
* @ORM\Entity
*/
class FilmFormat {
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="number_id", type="integer")
*/
private $numberId;
/**
* @var string
*
* @ORM\Column(name="name", type="string")
*/
private $name;
/**
* @return int
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return int
*/
public function getNumberId(): ?int
{
return $this->numberId;
}
/**
* @param int $numberId
* @return self
*/
public function setNumberId(int $numberId): self
{
$this->numberId = $numberId;
return $this;
}
/**
* @return string
*/
public function getName(): ?string
{
return $this->name;
}
/**
* @param string $name
* @return self
*/
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
}

View File

@ -361,9 +361,9 @@ trait LensTrait
* *
* @return string * @return string
*/ */
public function getSerial() public function getSerial(): string
{ {
return $this->serial; return $this->serial ?? '';
} }
/** /**
@ -373,7 +373,7 @@ trait LensTrait
* *
* @return self * @return self
*/ */
public function setNotes(string $notes): self public function setNotes(?string $notes): self
{ {
$this->notes = $notes; $this->notes = $notes;
@ -385,9 +385,9 @@ trait LensTrait
* *
* @return string * @return string
*/ */
public function getNotes(): ?string public function getNotes(): string
{ {
return $this->notes; return $this->notes ?? '';
} }
/** /**

View File

@ -14,8 +14,11 @@ class Kernel extends BaseKernel
const CONFIG_EXTS = '.{php,xml,yaml,yml}'; const CONFIG_EXTS = '.{php,xml,yaml,yml}';
protected $loadClassCache = FALSE;
public function getCacheDir() public function getCacheDir()
{ {
//return '/dev/null';
return $this->getProjectDir().'/var/cache/'.$this->environment; return $this->getProjectDir().'/var/cache/'.$this->environment;
} }

View File

@ -59,6 +59,9 @@
"monolog/monolog": { "monolog/monolog": {
"version": "1.23.0" "version": "1.23.0"
}, },
"nikic/php-parser": {
"version": "v4.0.0"
},
"psr/cache": { "psr/cache": {
"version": "1.0.1" "version": "1.0.1"
}, },
@ -179,14 +182,8 @@
"symfony/options-resolver": { "symfony/options-resolver": {
"version": "v4.0.0" "version": "v4.0.0"
}, },
"symfony/phpunit-bridge": { "symfony/polyfill-ctype": {
"version": "3.3", "version": "v1.8.0"
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "55a81726745b54cc6f8d845f1a094ed7d9ed2e32"
}
}, },
"symfony/polyfill-intl-icu": { "symfony/polyfill-intl-icu": {
"version": "v1.6.0" "version": "v1.6.0"