Skip to content
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

[TASK] Compatibility with PHP7 #970

Merged
merged 1 commit into from
Jan 7, 2016

Conversation

monosize
Copy link
Member

@monosize monosize commented Jan 4, 2016

No description provided.

@xf-
Copy link
Contributor

xf- commented Jan 4, 2016

Looks good 👍

@@ -42,18 +42,25 @@ class HasValidatorViewHelper extends AbstractConditionViewHelper {
static protected $staticReflectionService;

/**
* Initializes the "then" and "else" arguments
*/
public function __construct() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use initializeArguments. Using constructor to register arguments is indeed also done in few places in the core, but it is extremely bad practice and will be removed soon.

@NamelessCoder
Copy link
Member

Needs a bit of description of some decisions. It's far from obvious why many of the changes here are made.

parent::__construct();
$this->registerArgument('property', 'string', 'The property name, dotted path supported, to determine required.', TRUE);
$this->registerArgument('validatorName', 'string', 'The class name of the Validator that indicates the property is required.', FALSE, NULL);
$this->registerArgument('object', DomainObjectInterface::class, 'Optional object - if not specified, grabs the associated form object.', FALSE, NULL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not quite ready for the ::class conversion yet since we don't declare a PHP 5.5 minimum requirement. Tests use it extensively but the "active" code should not - yet.

@monosize
Copy link
Member Author

monosize commented Jan 4, 2016

Changes in FluidTYPO3\Vhs\ViewHelpers\Math\AbstractMultipleMathViewHelperand FluidTYPO3\Vhs\ViewHelpers\Math\AbstractSingleMathViewHelperfor avoiding strict error Declaration of FluidTYPO3\Vhs\ViewHelpers\Math\AbstractMultipleMathViewHelper::calculate($a, $b) should be compatible with FluidTYPO3\Vhs\ViewHelpers\Math\AbstractSingleMathViewHelper::calculate($a)

@@ -42,18 +42,24 @@ class HasValidatorViewHelper extends AbstractConditionViewHelper {
static protected $staticReflectionService;

/**
* Initializes the "then" and "else" arguments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment needs a fixup ;) other than that, looks good now. Math ViewHelpers will likely be refactored and made compilable but this patch should work for now.

NamelessCoder added a commit that referenced this pull request Jan 7, 2016
[TASK] Compatibility with PHP7
@NamelessCoder NamelessCoder merged commit 97f272c into FluidTYPO3:development Jan 7, 2016
@fnagel fnagel mentioned this pull request Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants