-
-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Labels
Description
Bug report
| Question | Answer |
|---|---|
| Box version | 0.6.1.0 |
| PHP version | 7.2.5 |
| Platform with version | Ubuntu |
Probably some regexp issue?
Reported here: rectorphp/rector#465 (comment)
# scoper.inc.php
<?php declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php';
use Isolated\Symfony\Component\Finder\Finder;
return [
'finders' => [
Finder::create()
->files()
->in(__DIR__ .'/test-me')
]
];With a run:
php php-scoper.phar add-prefix --no-interactionTurns this:
<?php
$tagHandlerMappings = [
'param' => '\phpDocumentor\Reflection\DocBlock\Tags\Param',
'return' => '\phpDocumentor\Reflection\DocBlock\Tags\Return_',
'var' => '\phpDocumentor\Reflection\DocBlock\Tags\Var_',
];to
<?php
namespace _PhpScoper5b0c2a3e20ef8;
$tagHandlerMappings = [
'param' => '_PhpScoper5b0c2a3e20ef8\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Param',
'return' => '\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Return_',
'var' => '\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Var_'
];Expected Prefixed
<?php
namespace _PhpScoper5b0c2a3e20ef8;
$tagHandlerMappings = [
'param' => '_PhpScoper5b0c2a3e20ef8\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Param',
- 'return' => '\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Return_',
+ 'return' => '_PhpScoper5b0c2a3e20ef8\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Return_',
- 'var' => '\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Var_'
+ 'var' => '_PhpScoper5b0c2a3e20ef8\\phpDocumentor\\Reflection\\DocBlock\\Tags\\Var_'
];