-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated 1.2 to support Symfony up to 2.7 #104
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//noinspection JSUnusedGlobalSymbols | ||
/** | ||
* Checks if value is (bool) false | ||
* @constructor | ||
* @author dev.ymalcev@gmail.com | ||
*/ | ||
function SymfonyComponentValidatorConstraintsIsFalse() { | ||
this.message = ''; | ||
|
||
this.validate = function (value) { | ||
var errors = []; | ||
if ('' !== value && false !== value) { | ||
errors.push(this.message.replace('{{ value }}', FpJsBaseConstraint.formatValue(value))); | ||
} | ||
|
||
return errors; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//noinspection JSUnusedGlobalSymbols | ||
/** | ||
* Checks if value is null | ||
* @constructor | ||
* @author dev.ymalcev@gmail.com | ||
*/ | ||
function SymfonyComponentValidatorConstraintsIsNull() { | ||
this.message = ''; | ||
|
||
this.validate = function(value) { | ||
var errors = []; | ||
if (null !== value) { | ||
errors.push(this.message.replace('{{ value }}', FpJsBaseConstraint.formatValue(value))); | ||
} | ||
|
||
return errors; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//noinspection JSUnusedGlobalSymbols | ||
/** | ||
* Checks if value is (bool) true | ||
* @constructor | ||
* @author dev.ymalcev@gmail.com | ||
*/ | ||
function SymfonyComponentValidatorConstraintsIsTrue() { | ||
this.message = ''; | ||
|
||
this.validate = function(value) { | ||
if ('' === value) { | ||
return []; | ||
} | ||
|
||
var errors = []; | ||
if (true !== value) { | ||
errors.push(this.message.replace('{{ value }}', FpJsBaseConstraint.formatValue(value))); | ||
} | ||
|
||
return errors; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,12 +139,9 @@ protected function makeScreenshot() | |
} | ||
|
||
try { | ||
$name = date('Y-m-d_H:i:s') . '.png'; | ||
file_put_contents( | ||
'/tmp/' . $name, | ||
$this->session->getScreenshot() | ||
); | ||
$imageUrl = $this->getUploader()->upload('/tmp/' . $name); | ||
$path = sprintf('%s/%s.png', sys_get_temp_dir(), date('Y-m-d_H-i-s')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ":" cannot be a part of a filename on windows |
||
file_put_contents($path, $this->session->getScreenshot()); | ||
$imageUrl = $this->getUploader()->upload($path); | ||
} catch (\Exception $e) { | ||
$imageUrl = $e->getMessage(); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -711,7 +711,7 @@ public function isValidSingleChoice() | |
*/ | ||
public function isValidMultipleChoice() | ||
{ | ||
return $this->_t_get(array('June', 'July'), array('June', 'May', 'September')); | ||
return $this->_t_get(array('June', 'July'), array('June', 'May')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Symfony stopped showing both error messages since 2.5.5. That's described in #83 So i kept only one invalid option and changed the last supported Symfony version of this branch to <2.7. Otherwise we could not support Symfony from 2.5.5 to <2.7 so easily. |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,15 +19,15 @@ | |
|
||
"require": { | ||
"php": ">=5.3.2", | ||
"symfony/form": ">=2.3,<=2.5.4", | ||
"symfony/validator": "~2.3.0,>=2.3.19||~2.4.0,>=2.4.9||~2.5.0,>=2.5.3,<=2.5.4", | ||
"symfony/symfony": "~2.3.0,>=2.3.19" | ||
"symfony/form": ">=2.3,<2.7", | ||
"symfony/validator": "~2.3.0,>=2.3.19||~2.4.0,>=2.4.9||>=2.5.3,<2.7", | ||
"symfony/symfony": "~2.3.0,>=2.3.19||^2.4,<2.6||~2.6.2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a bug in DI in Symfony 2.6.0 and 2.6.1 |
||
}, | ||
|
||
"require-dev": { | ||
"doctrine/orm": ">=2.2.3", | ||
"doctrine/doctrine-bundle": "~1.2", | ||
"symfony/assetic-bundle": ">=2.3,<=2.5.4", | ||
"symfony/assetic-bundle": "^2.3", | ||
"phpunit/phpunit": "3.7.*", | ||
"behat/mink-bundle": "dev-master", | ||
"behat/mink-selenium2-driver": "1.1.0", | ||
|
@@ -51,7 +51,7 @@ | |
|
||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.1-dev" | ||
"dev-master": "1.2-dev" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just aliases. IsTrue/IsFalse/IsNull were added in favor of deprecated True/False/Null because of PHP7.