1
0
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:
Bruce Weirdan 2019-06-02 18:23:25 +03:00 committed by Matthew Brown
parent 5eb7cb9b04
commit 8534955572
3 changed files with 6 additions and 2 deletions

View File

@ -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';

View File

@ -1,4 +1,8 @@
<?php
namespace Psalm;
use InvalidArgumentException;
/**
* @param string $path
*

View File

@ -1,6 +1,8 @@
<?php
namespace Psalm\Tests;
use function Psalm\isAbsolutePath;
class IsAbsolutePathTest extends TestCase
{
/**