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

[PropertyInfo] Fix phpDocExtractor nullable array value type #49557

Merged
merged 1 commit into from May 5, 2023

Conversation

MudrakIvan
Copy link

@MudrakIvan MudrakIvan commented Feb 28, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #49555
License MIT
Doc PR

Bug fix for nullable array value types + for multiple array key/value types.
Two existing tests changed:

  • property 'i' - change ?string|int comment to string|int|null (in newer versions (5.4+) already fixed)
  • property 'iteratorCollection' - change key types from null to string/int (default key values from phpDoc)

Added new tests:

  • property 'nonNullableCollectionOfNullableElements' - array<null|int> (nullable array value type)
  • property 'nullableCollectionOfMultipleNonNullableElementTypes' - null|array<int|string> (nullable array of int and string value types)

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.3 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/
Could you update the PR base branch to target one of these branches instead? 5.4, 6.2, 6.3.

Cheers!

Carsonbot

@MudrakIvan MudrakIvan changed the title + fix phpDocExtractor nullable array value type [PropertyInfo] Fix phpDocExtractor nullable array value type Feb 28, 2023
@MudrakIvan MudrakIvan changed the base branch from 5.3 to 5.4 February 28, 2023 11:42
@nicolas-grekas nicolas-grekas added this to the 5.4 milestone Apr 17, 2023
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(I rebased the PR)

@fabpot
Copy link
Member

fabpot commented May 5, 2023

Thank you @MudrakIvan.

@fabpot fabpot merged commit f1122a2 into symfony:5.4 May 5, 2023
9 of 11 checks passed
@fabpot fabpot mentioned this pull request May 7, 2023
This was referenced May 27, 2023
reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this pull request May 28, 2023
Handling of collections without a dedicated type has changed in
`symfony/property-info` with v6.2.11, [1] seems to be the offensive
commit.

This should be backward compatible, as only string|int make
sense for array keys and therefore is the same for array-like
object annotation syntax.

We raise the version constraint for `symfony/property-info`
package to a slightly higher patchlevel version to ensure
consistent behaviour. This is done for shipped version and
the core development, therefore the raises are also added
to the corresponding extension composer.json files.

Used command(s):

> composer require --no-update \
    -d typo3/sysext/extbase \
    "symfony/property-info":"^6.2.11"

> composer require \
    "symfony/property-info":"^6.2.11"

[1] symfony/symfony#49557

Resolves: #100927
Releases: main, 12.4
Change-Id: I1465206414cd7e596d0852ed4288c5013db23c2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79151
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Oliver Klee <typo3-coding@oliverklee.de>
TYPO3IncTeam pushed a commit to TYPO3-CMS/extbase that referenced this pull request May 28, 2023
Handling of collections without a dedicated type has changed in
`symfony/property-info` with v6.2.11, [1] seems to be the offensive
commit.

This should be backward compatible, as only string|int make
sense for array keys and therefore is the same for array-like
object annotation syntax.

We raise the version constraint for `symfony/property-info`
package to a slightly higher patchlevel version to ensure
consistent behaviour. This is done for shipped version and
the core development, therefore the raises are also added
to the corresponding extension composer.json files.

Used command(s):

> composer require --no-update \
    -d typo3/sysext/extbase \
    "symfony/property-info":"^6.2.11"

> composer require \
    "symfony/property-info":"^6.2.11"

[1] symfony/symfony#49557

Resolves: #100927
Releases: main, 12.4
Change-Id: I1465206414cd7e596d0852ed4288c5013db23c2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79151
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Oliver Klee <typo3-coding@oliverklee.de>
reviewtypo3org pushed a commit to TYPO3/typo3 that referenced this pull request May 28, 2023
Handling of collections without a dedicated type has changed in
`symfony/property-info` with v6.2.11, [1] seems to be the offensive
commit.

This should be backward compatible, as only string|int make
sense for array keys and therefore is the same for array-like
object annotation syntax.

We raise the version constraint for `symfony/property-info`
package to a slightly higher patchlevel version to ensure
consistent behaviour. This is done for shipped version and
the core development, therefore the raises are also added
to the corresponding extension composer.json files.

Used command(s):

> composer require --no-update \
    -d typo3/sysext/extbase \
    "symfony/property-info":"^6.2.11"

> composer require \
    "symfony/property-info":"^6.2.11"

[1] symfony/symfony#49557

Resolves: #100927
Releases: main, 12.4
Change-Id: I1465206414cd7e596d0852ed4288c5013db23c2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79152
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
TYPO3IncTeam pushed a commit to TYPO3-CMS/extbase that referenced this pull request May 28, 2023
Handling of collections without a dedicated type has changed in
`symfony/property-info` with v6.2.11, [1] seems to be the offensive
commit.

This should be backward compatible, as only string|int make
sense for array keys and therefore is the same for array-like
object annotation syntax.

We raise the version constraint for `symfony/property-info`
package to a slightly higher patchlevel version to ensure
consistent behaviour. This is done for shipped version and
the core development, therefore the raises are also added
to the corresponding extension composer.json files.

Used command(s):

> composer require --no-update \
    -d typo3/sysext/extbase \
    "symfony/property-info":"^6.2.11"

> composer require \
    "symfony/property-info":"^6.2.11"

[1] symfony/symfony#49557

Resolves: #100927
Releases: main, 12.4
Change-Id: I1465206414cd7e596d0852ed4288c5013db23c2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79152
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
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.

None yet

6 participants