-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add support for php7 and get all tests running #53
Changes from all commits
331ba65
e3dce52
5acfac2
ab5ab09
3a855c8
da8e950
2dab648
b6b85e8
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 |
---|---|---|
|
@@ -59,7 +59,7 @@ public function load(array $configs, ContainerBuilder $container) | |
$processor = new ConfigurationProcessor($container, 'ezpublish_legacy'); | ||
$processor->mapConfig( | ||
$config, | ||
function (array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) { | ||
function (array $scopeSettings, $currentScope, ContextualizerInterface $contextualizer) { | ||
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. Is this something that could break on PHP 5.x? 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. Don't see how, the variable is not modified inside the closure. 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. Yep, just wanted to confirm. 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. No, it won't break. |
||
if (isset($scopeSettings['templating']['view_layout'])) { | ||
$contextualizer->setContextualParameter('view_default_layout', $currentScope, $scopeSettings['templating']['view_layout']); | ||
} | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,8 @@ public function testGetPreAuthenticatedData() | |
|
||
$userId = 123; | ||
$passwordHash = md5('password'); | ||
$legacyUser = new eZUser(array('contentobject_id' => $userId)); | ||
// Specifically silence E_DEPRECATED on constructor name for php7 | ||
$legacyUser = @new eZUser(array('contentobject_id' => $userId)); | ||
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. Same comment as above. Better manipulate php.ini to silent 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. did not fix this as the aim is to only silence deprecation errors regarding constructor since that is the only one we most likely can't do anything about w/o introducing BC. So left this one here but with a comment, which I guess is ok given this is test code only. |
||
$apiUser = $this | ||
->getMockBuilder('eZ\Publish\API\Repository\Values\User\User') | ||
->setConstructorArgs(array(array('passwordHash' => $passwordHash))) | ||
|
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.
Isn't this a breaking change? If so, we should require eZ Kernel
>=6.3.2|>=6.4.2
(when 6.4.2 is released) incomposer.json
, right?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.
yes, but adding optional argument won't break the contract. In retrospective it was the kernel that broke the contract here.
So besides the fact that kernel should not have done this change, I think this fix is ok as is, it will work on older kernels also.
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.
Agreed.