mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Namespace autoloaded functions (#1724)
Since functions defined in files referenced in 'files' section in composer autoload config are automatically loaded when composer autoloader is included (for example when Psalm is installed into project vendors), it's good idea to keep them namespaced. Otherwise it would prevent dependents to declare their own functions in the global namespace with the same names.
This commit is contained in:
parent
5eb7cb9b04
commit
8534955572
@ -21,8 +21,6 @@ use Psalm\Progress\Progress;
|
||||
use Psalm\Progress\VoidProgress;
|
||||
use SimpleXMLElement;
|
||||
|
||||
use function isAbsolutePath;
|
||||
|
||||
class Config
|
||||
{
|
||||
const DEFAULT_FILE_NAME = 'psalm.xml';
|
||||
|
@ -1,4 +1,8 @@
|
||||
<?php
|
||||
namespace Psalm;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
*
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Psalm\Tests;
|
||||
|
||||
use function Psalm\isAbsolutePath;
|
||||
|
||||
class IsAbsolutePathTest extends TestCase
|
||||
{
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user