Skip to content

Conversation

@malteschlueter
Copy link
Contributor

Q A
Branch? 6.0
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

This remove deprecated code from PropertyAccess.

@carsonbot
Copy link

Hey!

I think @HeahDude has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

*/
public function testGetValueReturnsNullIfPropertyNotFoundAndExceptionIsDisabledUsingBooleanArgument($objectOrArray, $path)
{
$this->expectDeprecation('Since symfony/property-access 5.3: Passing a boolean as the fourth argument to "Symfony\Component\PropertyAccess\PropertyAccessor::__construct()" is deprecated. Pass a combination of bitwise flags as the second argument instead (i.e an integer).');
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also remove ExpectDeprecationTrait from this test:

use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;

see #41298 (comment)

public function __construct(int $magicMethods = self::MAGIC_GET | self::MAGIC_SET, int $throw = self::THROW_ON_INVALID_PROPERTY_PATH, CacheItemPoolInterface $cacheItemPool = null, PropertyReadInfoExtractorInterface $readInfoExtractor = null, PropertyWriteInfoExtractorInterface $writeInfoExtractor = null)
{
if (\is_bool($magicMethods)) {
trigger_deprecation('symfony/property-access', '5.2', 'Passing a boolean as the first argument to "%s()" is deprecated. Pass a combination of bitwise flags instead (i.e an integer).', __METHOD__);
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove symfony/deprecation-contracts from the composer.json file. See #41298 (comment)

@jschaedl
Copy link
Contributor

Shall we update the component's CHANGELOG file accordingly?

@nicolas-grekas
Copy link
Member

Shall we update the component's CHANGELOG file accordingly?

yes please, please also rebase and take review comments into account of course

@nicolas-grekas
Copy link
Member

Please rebase to restart tests 🙏

@nicolas-grekas
Copy link
Member

Thank you @malteschlueter.

@nicolas-grekas nicolas-grekas merged commit a6ed11e into symfony:6.0 May 27, 2021
@fabpot fabpot mentioned this pull request Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants