| 1 | <?php |
||
| 8 | final class CompatibilityHelper |
||
| 9 | { |
||
| 10 | private static $isFormLegacy; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Returns true if legacy (older than 2.8, not support FQCN passing) version of symfony/form component is installed. |
||
| 14 | * |
||
| 15 | * @return bool |
||
| 16 | */ |
||
| 17 | 4 | public static function isFormLegacy() |
|
| 18 | { |
||
| 19 | 4 | if (null === self::$isFormLegacy) { |
|
| 20 | 1 | self::$isFormLegacy = !(new \ReflectionClass('Symfony\Component\Form\AbstractType'))->hasMethod('getBlockPrefix'); |
|
| 21 | 1 | } |
|
| 22 | |||
| 23 | 4 | return self::$isFormLegacy; |
|
| 24 | } |
||
| 25 | |||
| 26 | private function __construct() |
||
| 29 | } |
||
| 30 |