diff --git a/.travis.yml b/.travis.yml index 2588c77..f780e09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,10 @@ language: php php: - 5.3 - 5.4 + - 5.5 env: - - SYMFONY_VERSION=v2.3.3 + - SYMFONY_VERSION=v2.8 - SYMFONY_VERSION=origin/master before_script: diff --git a/Form/Type/DatetimeType.php b/Form/Type/DatetimeType.php index be802aa..bf4bdd9 100644 --- a/Form/Type/DatetimeType.php +++ b/Form/Type/DatetimeType.php @@ -46,7 +46,7 @@ class DatetimeType extends AbstractType * * @param array $options */ - public function __construct(array $options) + public function __construct(array $options = array()) { $this->options = $options; @@ -164,7 +164,7 @@ public function getParent() public function getName() { - return 'collot_datetime'; + return $this->getBlockPrefix(); } public function getBlockPrefix() diff --git a/README.md b/README.md index 251770e..167bc6b 100644 --- a/README.md +++ b/README.md @@ -59,14 +59,16 @@ $ php app/console assets:install web/ ``` php add('createdAt', 'collot_datetime') + ->add('createdAt', DatetimeType::class) // full options - ->add('updatedAt', 'collot_datetime', array( 'pickerOptions' => + ->add('updatedAt', DatetimeType::class, array( 'pickerOptions' => array('format' => 'mm/dd/yyyy', 'weekStart' => 0, 'startDate' => date('m/d/Y'), //example diff --git a/composer.json b/composer.json index 75ff649..bee1939 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ } ], "require": { - "php": ">=5.3", - "symfony/framework-bundle": "2.*", - "symfony/symfony": "2.*" + "php": ">=5.3.9", + "symfony/framework-bundle": "~2.8 || ~3.0", + "symfony/symfony": "~2.8 || ~3.0" }, "autoload": { "psr-0": {