Skip to content

Instantly share code, notes, and snippets.

@fancyweb
fancyweb / lol.php
Created January 3, 2018 16:12
Doctrine ignore unknown discriminator values
<?php
private function ignoreUnknownDiscriminatorValues()
if (method_exists(BasicEntityPersister::class, '_loadOneToManyCollection')) {
return;
}
$refl = new \ReflectionClass(BasicEntityPersister::class);
if (1676129169 !== crc32(file_get_contents($refl->getFileName()))) {
throw new \Exception(sprintf('The file "%s" has changed, please check that the "loadOneToManyCollection" method override is still working as expected.', BasicEntityPersister::class));
<?php
// copyright josé 2002
/**
* @param array $array
*
* @return array
*/
public static function cartesianProduct(array $array)
{
Allemagne
Espagne
France
Italie
Pays-Bas
Portugal
-------------------
Afghanistan
Afrique du Sud
Albanie
Afghanistan
Afrique du Sud
Albanie
Algérie
Allemagne
Andorre
Angola
Anguilla
Antarctique
Antigua-et-Barbuda