Skip to content

Commit

Permalink
qa: suggest laminas/laminas-cli so that the CLI commands can be con…
Browse files Browse the repository at this point in the history
…sumed

This also marks the existing CLI commands as internal as these are not meant to be instantiated from any project.

Signed-off-by: Maximilian Bösing <[email protected]>
  • Loading branch information
boesing committed Mar 30, 2023
1 parent 0fe2d78 commit 7bd2668
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"zendframework/zend-code": "<3.3.1"
},
"suggest": {
"laminas/laminas-cli": "To consume CLI commands provided by this component",
"ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services"
},
"autoload": {
Expand Down
12 changes: 4 additions & 8 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,14 @@
</InvalidThrow>
<InternalClass>
<errorLevel type="suppress">
<referencedClass name="Laminas\ServiceManager\Tool\FactoryCreator"/>
<referencedClass name="Laminas\ServiceManager\Tool\ConfigDumper"/>
<!-- Tests are allowed to work with internal classes -->
<directory name="test"/>
</errorLevel>
</InternalClass>
<InternalMethod>
<errorLevel type="suppress">
<referencedMethod name="Laminas\ServiceManager\Tool\FactoryCreator::createFactory"/>
<referencedMethod name="Laminas\ServiceManager\Tool\ConfigDumper::createDependencyConfig"/>
<referencedMethod name="Laminas\ServiceManager\Tool\ConfigDumper::dumpConfigFile"/>
<referencedMethod name="Laminas\ServiceManager\Tool\ConfigDumper::createFactoryMappingsFromConfig"/>
<referencedMethod name="Laminas\ServiceManager\Tool\ConfigDumper::createFactoryMappings"/>
<referencedMethod name="Laminas\ServiceManager\Tool\ConfigDumper::__construct"/>
<!-- Tests are allowed to work with internal classes -->
<directory name="test"/>
</errorLevel>
</InternalMethod>
</issueHandlers>
Expand Down
3 changes: 3 additions & 0 deletions src/Command/ConfigDumperCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
use function is_writable;
use function sprintf;

/**
* @internal CLI commands are not meant to be used in any upstream projects other than via `laminas-cli`.
*/
final class ConfigDumperCommand extends Command
{
public const NAME = 'servicemanager:generate-deps-for-config-factory';
Expand Down
3 changes: 3 additions & 0 deletions src/Command/FactoryCreatorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use function is_string;
use function sprintf;

/**
* @internal CLI commands are not meant to be used in any upstream projects other than via `laminas-cli`.
*/
final class FactoryCreatorCommand extends Command
{
public const NAME = 'servicemanager:generate-factory-for-class';
Expand Down

0 comments on commit 7bd2668

Please sign in to comment.