Skip to content

Instantly share code, notes, and snippets.

@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
{
...
@corny
corny / git.cap
Created November 14, 2013 01:31
Capistrano 3 with Git Submodules
# Save this file as lib/capistrano/tasks/git.cap
namespace :git do
desc 'Copy repo to releases'
task create_release: :'git:update' do
on roles(:all) do
with fetch(:git_environmental_variables) do
within repo_path do
execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path
end
@jmikola
jmikola / FindInvalidReferencesCommand.php
Created July 27, 2012 21:47
Find invalid references among Doctrine MongoDB ODM documents
<?php
namespace Acme\FooBundle\Command;
use Doctrine\Common\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class FindInvalidReferencesCommand extends ContainerAwareCommand