Skip to content

Do not prefix scalar strings with known internal class names#1207

Open
ondrejmirtes wants to merge 1 commit into
humbug:mainfrom
ondrejmirtes:fix-scalar-string-prefixing
Open

Do not prefix scalar strings with known internal class names#1207
ondrejmirtes wants to merge 1 commit into
humbug:mainfrom
ondrejmirtes:fix-scalar-string-prefixing

Conversation

@ondrejmirtes
Copy link
Copy Markdown

I'm trying to solve a problem. Right now in 0.18.19, php-scoper prefixes code such as:

$subclasses['PDO\Mysql'] = 'PDO\Mysql';

return new ObjectType('Filter\FilterFailedException')

into:

$subclasses['PDO\Mysql'] = '_PHPStan_6ef81ee5d\PDO\Mysql';

return new ObjectType('_PHPStan_6ef81ee5d\Filter\FilterFailedException')

Since these are known internal classes, it should not be happening.

Copy link
Copy Markdown
Member

@theofidry theofidry left a comment

Choose a reason for hiding this comment

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

Does it make sense to solve that problem? Yes.

I actually thought this was already taken care of 🤦 .

Is the presented fix correct? I have to check. I'm having doubts about excluded vs. exposed atm. The line changed over time, and I need to re-evaluate that.

But I believe the direction is correct, so if that solves it I may defer that assessment later in favour of getting this out ASAP

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants