mirror of
https://github.com/danog/psalm-plugin-symfony.git
synced 2024-11-26 20:04:58 +01:00
Migrate Seferov => Psalm
This commit is contained in:
parent
a1f37c396b
commit
d21ccc2307
@ -26,7 +26,7 @@ If you followed installation instructions, psalm-plugin command would added plug
|
||||
<!-- project configuration -->
|
||||
|
||||
<plugins>
|
||||
<pluginClass class="Seferov\SymfonyPsalmPlugin\Plugin" />
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin" />
|
||||
</plugins>
|
||||
</psalm>
|
||||
```
|
||||
@ -34,7 +34,7 @@ If you followed installation instructions, psalm-plugin command would added plug
|
||||
To be able to detect return types of services using ID (generally starts with `@` in Symfony YAML config files. Ex: `logger` service)
|
||||
`containerXml` must be provided. Example:
|
||||
```xml
|
||||
<pluginClass class="Seferov\SymfonyPsalmPlugin\Plugin">
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin">
|
||||
<containerXml>var/cache/dev/App_KernelDevDebugContainer.xml</containerXml>
|
||||
</pluginClass>
|
||||
```
|
||||
|
@ -22,18 +22,18 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Seferov\\SymfonyPsalmPlugin\\": "src"
|
||||
"Psalm\\SymfonyPsalmPlugin\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Seferov\\SymfonyPsalmPlugin\\Tests\\Acceptance\\": ["tests/acceptance/_support"],
|
||||
"Seferov\\SymfonyPsalmPlugin\\Tests\\": ["tests/unit"]
|
||||
"Psalm\\SymfonyPsalmPlugin\\Tests\\Acceptance\\": ["tests/acceptance/_support"],
|
||||
"Psalm\\SymfonyPsalmPlugin\\Tests\\": ["tests/unit"]
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"psalm" : {
|
||||
"pluginClass": "Seferov\\SymfonyPsalmPlugin\\Plugin"
|
||||
"pluginClass": "Psalm\\SymfonyPsalmPlugin\\Plugin"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Handler;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Handler;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
@ -14,8 +14,8 @@ use Psalm\Plugin\Hook\AfterMethodCallAnalysisInterface;
|
||||
use Psalm\StatementsSource;
|
||||
use Psalm\Storage\ClassLikeStorage;
|
||||
use Psalm\Type\Union;
|
||||
use Seferov\SymfonyPsalmPlugin\Issue\ContainerDependency;
|
||||
use Seferov\SymfonyPsalmPlugin\Issue\RepositoryStringShortcut;
|
||||
use Psalm\SymfonyPsalmPlugin\Issue\ContainerDependency;
|
||||
use Psalm\SymfonyPsalmPlugin\Issue\RepositoryStringShortcut;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
class ClassHandler implements AfterClassLikeAnalysisInterface, AfterMethodCallAnalysisInterface
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Handler;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Handler;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Handler;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Handler;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
@ -13,9 +13,9 @@ use Psalm\Plugin\Hook\AfterMethodCallAnalysisInterface;
|
||||
use Psalm\StatementsSource;
|
||||
use Psalm\Type\Atomic\TNamedObject;
|
||||
use Psalm\Type\Union;
|
||||
use Seferov\SymfonyPsalmPlugin\Issue\PrivateService;
|
||||
use Seferov\SymfonyPsalmPlugin\Issue\ServiceNotFound;
|
||||
use Seferov\SymfonyPsalmPlugin\Symfony\ContainerMeta;
|
||||
use Psalm\SymfonyPsalmPlugin\Issue\PrivateService;
|
||||
use Psalm\SymfonyPsalmPlugin\Issue\ServiceNotFound;
|
||||
use Psalm\SymfonyPsalmPlugin\Symfony\ContainerMeta;
|
||||
|
||||
class ContainerXmlHandler implements AfterMethodCallAnalysisInterface
|
||||
{
|
||||
@ -56,7 +56,7 @@ class ContainerXmlHandler implements AfterMethodCallAnalysisInterface
|
||||
}
|
||||
|
||||
if (!self::$containerMeta) {
|
||||
throw new \Exception('\Seferov\SymfonyPsalmPlugin\Handler\ContainerXmlHandler::init() must be run to initialize this hook');
|
||||
throw new \Exception('\Psalm\SymfonyPsalmPlugin\Handler\ContainerXmlHandler::init() must be run to initialize this hook');
|
||||
}
|
||||
|
||||
$service = self::$containerMeta->get($serviceId);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Issue;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Issue;
|
||||
|
||||
use Psalm\CodeLocation;
|
||||
use Psalm\Issue\CodeIssue;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Issue;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Issue;
|
||||
|
||||
use Psalm\CodeLocation;
|
||||
use Psalm\Issue\CodeIssue;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Issue;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Issue;
|
||||
|
||||
use Psalm\CodeLocation;
|
||||
use Psalm\Issue\CodeIssue;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Issue;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Issue;
|
||||
|
||||
use Psalm\CodeLocation;
|
||||
use Psalm\Issue\CodeIssue;
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin;
|
||||
namespace Psalm\SymfonyPsalmPlugin;
|
||||
|
||||
use Psalm\Exception\ConfigException;
|
||||
use Psalm\Plugin\PluginEntryPointInterface;
|
||||
use Psalm\Plugin\RegistrationInterface;
|
||||
use Seferov\SymfonyPsalmPlugin\Handler\ClassHandler;
|
||||
use Seferov\SymfonyPsalmPlugin\Handler\ContainerHandler;
|
||||
use Seferov\SymfonyPsalmPlugin\Handler\ContainerXmlHandler;
|
||||
use Seferov\SymfonyPsalmPlugin\Symfony\ContainerMeta;
|
||||
use Psalm\SymfonyPsalmPlugin\Handler\ClassHandler;
|
||||
use Psalm\SymfonyPsalmPlugin\Handler\ContainerHandler;
|
||||
use Psalm\SymfonyPsalmPlugin\Handler\ContainerXmlHandler;
|
||||
use Psalm\SymfonyPsalmPlugin\Symfony\ContainerMeta;
|
||||
use SimpleXMLElement;
|
||||
|
||||
class Plugin implements PluginEntryPointInterface
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Symfony;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Symfony;
|
||||
|
||||
use Psalm\Exception\ConfigException;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Symfony;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Symfony;
|
||||
|
||||
class Service
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ Feature: ContainerDependency
|
||||
<ignoreFiles> <directory name="../../vendor"/> </ignoreFiles>
|
||||
</projectFiles>
|
||||
<plugins>
|
||||
<pluginClass class="Seferov\SymfonyPsalmPlugin\Plugin"/>
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
|
||||
</plugins>
|
||||
</psalm>
|
||||
"""
|
||||
|
@ -12,7 +12,7 @@ Feature: Container service
|
||||
</projectFiles>
|
||||
|
||||
<plugins>
|
||||
<pluginClass class="Seferov\SymfonyPsalmPlugin\Plugin"/>
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
|
||||
</plugins>
|
||||
</psalm>
|
||||
"""
|
||||
|
@ -12,7 +12,7 @@ Feature: Container XML config
|
||||
</projectFiles>
|
||||
|
||||
<plugins>
|
||||
<pluginClass class="Seferov\SymfonyPsalmPlugin\Plugin">
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin">
|
||||
<containerXml>../../tests/acceptance/container.xml</containerXml>
|
||||
</pluginClass>
|
||||
</plugins>
|
||||
|
@ -18,7 +18,7 @@ Feature: RepositoryStringShortcut
|
||||
</issueHandlers>
|
||||
|
||||
<plugins>
|
||||
<pluginClass class="Seferov\SymfonyPsalmPlugin\Plugin"/>
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
|
||||
</plugins>
|
||||
</psalm>
|
||||
"""
|
||||
|
@ -12,7 +12,7 @@ Feature: Request getContent
|
||||
</projectFiles>
|
||||
|
||||
<plugins>
|
||||
<pluginClass class="Seferov\SymfonyPsalmPlugin\Plugin"/>
|
||||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
|
||||
</plugins>
|
||||
</psalm>
|
||||
"""
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Seferov\SymfonyPsalmPlugin\Tests\Symfony;
|
||||
namespace Psalm\SymfonyPsalmPlugin\Tests\Symfony;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psalm\Exception\ConfigException;
|
||||
use Seferov\SymfonyPsalmPlugin\Symfony\ContainerMeta;
|
||||
use Seferov\SymfonyPsalmPlugin\Symfony\Service;
|
||||
use Psalm\SymfonyPsalmPlugin\Symfony\ContainerMeta;
|
||||
use Psalm\SymfonyPsalmPlugin\Symfony\Service;
|
||||
|
||||
/**
|
||||
* @testdox ContainerMetaTest
|
||||
|
Loading…
Reference in New Issue
Block a user