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

Add scenario for generating proxies for union types in class properties #727

Open
Ocramius opened this issue Dec 7, 2021 · 0 comments
Open
Milestone

Comments

@Ocramius
Copy link
Owner

Ocramius commented Dec 7, 2021

Similar to #725 and #722, we need to expand our test assets with a class that contains union types for

  • methods
  • properties
  • parameters

For that, we should create a new class alike ClassWithMixedReferenceableTypedProperties:

<?php
declare(strict_types=1);
namespace ProxyManagerTestAsset;
/**
* Base test class to play around with mixed visibility properties with different type definitions
*
* @author Marco Pivetta <ocramius@gmail.com>
* @license MIT
*/
class ClassWithMixedReferenceableTypedProperties
{
public static $publicStaticUnTypedProperty = 'publicStaticUnTypedProperty';
public static $publicStaticUnTypedPropertyWithoutDefaultValue;

Specifically, |null needs very careful evaluation, as nullable vs non-nullable union types have quite sensitive semantics around code generation and by-ref evaluation.

Once added, we should use this new class wherever ClassWithMixedReferenceableTypedProperties (and proceed fixing any potentially detected issues).

@Ocramius Ocramius added this to the 2.14.0 milestone Dec 7, 2021
@Ocramius Ocramius changed the title Add scenario for generating proxies for intersection types in properties/parameters Add scenario for generating proxies for union types in class properties Dec 7, 2021
@Ocramius Ocramius modified the milestones: 2.14.0, 2.15.0 Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant