Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Conversation

@MatthiasKuehneEllerhold
Copy link
Contributor

See #36

Copy link
Member

@marc-mabe marc-mabe left a comment

Choose a reason for hiding this comment

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

Else - from my perspective it looks quite good 👍

/**
* Set options
*
* @param array|\Traversable|PhpSerializeOptions $options
Copy link
Member

Choose a reason for hiding this comment

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

please import Traversable

* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
Copy link
Member

Choose a reason for hiding this comment

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

2015?

{
$value = 'O:8:"stdClass":0:{}';

$this->adapter->getOptions()->setUnserializeClassWhitelist(false);
Copy link
Member

Choose a reason for hiding this comment

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

This will fail on PHP < 7

{
$value = 'O:8:"stdClass":0:{}';

$this->adapter->getOptions()->setUnserializeClassWhitelist([\My\Dummy::class]);
Copy link
Member

Choose a reason for hiding this comment

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

This will fail on PHP < 7

{
$value = 'O:8:"stdClass":0:{}';

$this->adapter->getOptions()->setUnserializeClassWhitelist([\stdClass::class]);
Copy link
Member

Choose a reason for hiding this comment

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

This will fail on PHP < 7

protected $unserializeClassWhitelist = true;

/**
* @param array|bool $unserializeClassWhitelist
Copy link
Member

Choose a reason for hiding this comment

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

@param string[]|bool $unserializeClassWhitelist

}

/**
* @return array|bool
Copy link
Member

Choose a reason for hiding this comment

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

@return string[]|bool

@weierophinney weierophinney merged commit 4423d9c into zendframework:develop May 14, 2018
weierophinney added a commit that referenced this pull request May 14, 2018
weierophinney added a commit that referenced this pull request May 14, 2018
- Updates license docblocks of changed files to reflect current standards.
- Use a ternary to get the return value of the `unserialize()` operation
  (simpler to read than if/else block).
- No fluent operations in new classes.
- Review all docblocks for formatting, grammar.
- Use annotations to require PHP 7 for tests
  - split out a single test to demonstrate expected behavior in versions prior to 7.0
weierophinney added a commit that referenced this pull request May 14, 2018
weierophinney added a commit that referenced this pull request May 14, 2018
@weierophinney
Copy link
Member

Thanks, @MatthiasKuehneEllerhold!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants