Since Mavericks stopped using the deprecated ipfw
(as of Mountain Lion), we'll be using pf
to allow port forwarding.
####1. anchor file
Create an anchor file under /etc/pf.anchors/<anchor file>
with your redirection rule like:
<?php | |
namespace Sensio\Bundle\FakeBundle\Entity; | |
use Sensio\Component\Validator\Constraints\ValidateIfNeeded; | |
use Symfony\Component\Validator\Constraints as Assert; | |
/** | |
* FakeEntity. | |
* |
#!/usr/bin/env php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP error (lint), and make sure the code | |
* is PSR compliant. | |
* | |
* Dependency: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
*/ |
I hereby claim:
To claim this, I am signing this object:
TLDR: The cascade={"remove"}
is like a "software" onDelete="CASCADE"
, and will remove objects from the database only when an explicit call to $em->remove()
occurs. Thus, it could result in more than one object being deleted. orphanRemoval
can remove objects from the database even if there was no explicit call to ->remove()
.
I answered this question a few times to different people so I will try to sum things up in this Gist.
Let's take two entities A
and B
as an example. I will use a OneToOne relationship in this example but it works exactly the same with OneToMany relationships.
class A
/Library/LaunchDaemon
(/Library/LaunchDaemons/limit.maxfiles.plist
for example) with the following content:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Label
<?php | |
$finder = Symfony\CS\Finder\DefaultFinder::create() | |
->exclude(['vendor', 'storage']) | |
->in(__DIR__) | |
; | |
return Symfony\CS\Config\Config::create() | |
->fixers([ | |
'align_double_arrow', |