Skip to content

Instantly share code, notes, and snippets.

@Assert\Choice(message="validation.error.field.must_be_valid_choice", callback="getStatusList")
@Glifery
Glifery / Console clear
Created January 5, 2016 13:46
- clear console screen - back to begin of the line
system('clear');
$output->write("\x0D");
@Glifery
Glifery / Assessment.php
Last active June 18, 2018 06:46
Entity to it's ID serialization handler
<?php
namespace MyVendor\MyBundle\Model;
use MyVendor\MyBundle\Entity\User;
use JMS\Serializer\Annotation as JMS;
class Assessment
{
...
@Glifery
Glifery / ObjectChangedWatcher.php
Created September 24, 2015 15:16
Watch for changes in objects
<?php
namespace Reddin\Bundle\MEPBundle\Service;
class ObjectChangedWatcher
{
/**
* @var array
*/
private $objects;