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

Improve getNamespacedName() return type #1428

Merged
merged 7 commits into from
May 31, 2024
Merged

Conversation

staabm
Copy link
Contributor

@staabm staabm commented May 31, 2024

@staabm staabm changed the title Improve ReflectionConstant->getNamespacedName() return type Improve getNamespacedName() return type May 31, 2024
@@ -49,6 +49,10 @@
"conflict": {
"thecodingmachine/safe": "<1.1.3"
},
"scripts": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not used to the psalm commands.. have to google them all the time.. added them here to ease contributing for non-psalm experienced people like me

Copy link
Member

Choose a reason for hiding this comment

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

Not very happy to have composer as a wrapper to run scripts, but it's a non-blocker for this patch

@staabm staabm marked this pull request as ready for review May 31, 2024 08:20
ondrejmirtes added a commit to phpstan/phpstan-src that referenced this pull request May 31, 2024
@@ -49,6 +49,10 @@
"conflict": {
"thecodingmachine/safe": "<1.1.3"
},
"scripts": {
Copy link
Member

Choose a reason for hiding this comment

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

Not very happy to have composer as a wrapper to run scripts, but it's a non-blocker for this patch

Comment on lines +32 to +34
if ($namespaceName === '') {
throw new LogicException('Namespace name should never be empty');
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this something we can test at all? Or is it an upstream type refinement required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the upstream type is already refined, but the change itself is not yet released

nikic/PHP-Parser#993

Copy link
Member

Choose a reason for hiding this comment

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

Let's then roll with this as-is: a lock file update will expose the type contradiction later on 👍

@Ocramius Ocramius added this to the 6.37.0 milestone May 31, 2024
@Ocramius Ocramius self-assigned this May 31, 2024
@Ocramius Ocramius merged commit 5caf819 into Roave:6.37.x May 31, 2024
23 checks passed
@Ocramius
Copy link
Member

Thanks @staabm!

@staabm staabm deleted the patch-1 branch May 31, 2024 16:52
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.

2 participants