├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ └── tests.yml ├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── docs └── img │ └── screen-err-phpstan.png ├── extension.neon ├── src ├── DebugHelpers.php ├── ModuliteCheckRules.php ├── ModuliteConfiguration.php ├── ModuliteErrFormatter.php ├── ModuliteFromReflectionDetector.php ├── ModulitePHPStanError.php ├── ModuliteRules │ ├── ModuliteRuleBase.php │ ├── RuleAssignVar.php │ ├── RuleCallConstruct.php │ ├── RuleCallGlobalFunc.php │ ├── RuleCallStaticMethod.php │ ├── RuleDeclareClass.php │ ├── RuleDeclareGlobalFunc.php │ ├── RuleDeclareMethod.php │ ├── RuleDeclareProperty.php │ ├── RuleInstanceof.php │ ├── RuleUseClassConst.php │ ├── RuleUseGlobalConst.php │ ├── RuleUseGlobalVar.php │ └── RuleUseStaticField.php ├── ModuliteService.php ├── ModuliteYaml │ ├── ComposerJsonData.php │ ├── ModuliteData.php │ ├── ModuliteSymbol.php │ ├── ModuliteYamlError.php │ └── ModuliteYamlParser.php └── SrcDir.php └── tests ├── Folders ├── Folder_000_Test.php ├── Folder_001_Test.php ├── Folder_002_Test.php ├── Folder_003_Test.php ├── Folder_004_Test.php ├── Folder_005_Test.php ├── Folder_006_Test.php ├── Folder_007_Test.php ├── Folder_008_Test.php ├── Folder_009_Test.php ├── Folder_010_Test.php ├── Folder_011_Test.php ├── Folder_012_Test.php ├── Folder_013_Test.php ├── Folder_100_Test.php ├── Folder_101_Test.php ├── Folder_102_Test.php ├── Folder_103_Test.php ├── Folder_104_Test.php ├── Folder_105_Test.php ├── Folder_106_Test.php ├── Folder_110_Test.php ├── Folder_111_Test.php ├── Folder_112_Test.php ├── Folder_113_Test.php ├── Folder_114_Test.php ├── Folder_115_Test.php ├── Folder_120_Test.php ├── Folder_121_Test.php ├── Folder_122_Test.php ├── Folder_123_Test.php ├── Folder_124_Test.php ├── Folder_125_Test.php └── Folder_130_Test.php ├── RunAllRulesForFolderTestCase.php ├── bootstrap.php ├── php ├── 000_strange_php_code │ ├── 000_strange_php_code.php │ └── Utils000 │ │ ├── .modulite.yaml │ │ └── Strings000.php ├── 001_simple_yaml_project │ ├── 001_simple_yaml_project.php │ ├── GlobalA001.php │ ├── GlobalB001.php │ ├── GlobalCl001.php │ ├── GlobalEnum001.php │ └── Utils001 │ │ ├── .modulite.yaml │ │ └── Strings001.php ├── 002_ok_require_submod │ ├── 002_ok_require_submod.php │ ├── API002 │ │ ├── .modulite.yaml │ │ ├── ApiCall.php │ │ └── Impl │ │ │ ├── .modulite.yaml │ │ │ └── ApiInternals.php │ ├── Glob002.php │ ├── Messages002 │ │ ├── .modulite.yaml │ │ ├── Channels002 │ │ │ ├── .modulite.yaml │ │ │ ├── Channels002.php │ │ │ └── Infra002 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── Infra002.php │ │ ├── Core002 │ │ │ ├── .modulite.yaml │ │ │ └── Core002.php │ │ └── Messages002.php │ └── parent │ │ ├── .modulite.yaml │ │ ├── ParentFuncs_002.php │ │ └── child1 │ │ ├── .modulite.yaml │ │ ├── child2 │ │ ├── .modulite.yaml │ │ ├── child3 │ │ │ ├── .modulite.yaml │ │ │ └── Child3_002.php │ │ └── child3my │ │ │ ├── .modulite.yaml │ │ │ └── Child3My_002.php │ │ └── child2my │ │ ├── .modulite.yaml │ │ └── Child2My_002.php ├── 003_allow_internal │ ├── 003_allow_internal.php │ ├── Feed003 │ │ ├── .modulite.yaml │ │ └── Post003.php │ ├── Messages003 │ │ ├── .modulite.yaml │ │ ├── Core003 │ │ │ ├── .modulite.yaml │ │ │ └── Core003.php │ │ └── User003.php │ ├── Utils003 │ │ ├── .modulite.yaml │ │ ├── Hidden003.php │ │ ├── Impl003 │ │ │ ├── .modulite.yaml │ │ │ └── Hasher003.php │ │ └── Strings003.php │ ├── parent │ │ ├── .modulite.yaml │ │ └── child1 │ │ │ ├── .modulite.yaml │ │ │ └── child2 │ │ │ ├── .modulite.yaml │ │ │ └── child3 │ │ │ ├── .modulite.yaml │ │ │ └── Child3_003.php │ └── plain │ │ ├── .modulite.yaml │ │ └── plain.php ├── 004_instance_methods │ ├── 004_instance_methods.php │ ├── Messages004 │ │ ├── .modulite.yaml │ │ ├── Hidden004.php │ │ └── Messages004.php │ └── Utils004 │ │ ├── .modulite.yaml │ │ └── Strings004.php ├── 005_inheritance │ ├── 005_inheritance.php │ ├── Common005 │ │ ├── .modulite.yaml │ │ ├── CallOthers005.php │ │ └── ErrBase005.php │ ├── Feed005 │ │ ├── .modulite.yaml │ │ ├── ErrFeed005.php │ │ ├── Rank005 │ │ │ ├── PubTrait.php │ │ │ ├── RankAlgoBase.php │ │ │ ├── RankImpl1.php │ │ │ ├── RankImpl2.php │ │ │ └── WithCopy.php │ │ ├── Send005 │ │ │ ├── ISender.php │ │ │ ├── SenderBaseImpl.php │ │ │ ├── SenderEMail.php │ │ │ └── SenderSms.php │ │ └── SenderFactory.php │ ├── GImportTrait.php │ ├── GloBase005.php │ ├── GloDer005.php │ └── Messages005 │ │ ├── .modulite.yaml │ │ ├── AMessage005.php │ │ ├── IMessage005.php │ │ └── Message005.php ├── 006_known_bugs │ ├── 006_known_bugs.php │ └── Feed006 │ │ ├── .modulite.yaml │ │ ├── PrivClass.php │ │ ├── PrivTrait.php │ │ └── PubFeed.php ├── 007_composer_ok │ ├── 007_composer_ok.php │ ├── Utils007 │ │ ├── .modulite.yaml │ │ └── utils007.php │ ├── composer.json │ ├── packages │ │ ├── engines-all │ │ │ ├── .modulite.yaml │ │ │ ├── composer.json │ │ │ ├── eng-ping.php │ │ │ └── src │ │ │ │ └── Messages │ │ │ │ ├── .modulite.yaml │ │ │ │ ├── Channels │ │ │ │ ├── .modulite.yaml │ │ │ │ └── ChannelsRep.php │ │ │ │ ├── Core │ │ │ │ ├── .modulite.yaml │ │ │ │ ├── ClusterConnection.php │ │ │ │ └── MsgLogger.php │ │ │ │ ├── Folders │ │ │ │ ├── .modulite.yaml │ │ │ │ └── FoldersRep.php │ │ │ │ └── MessagesLayer.php │ │ ├── vk-rpc │ │ │ ├── composer.json │ │ │ └── src │ │ │ │ ├── Layer007 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── QueryBuilder007.php │ │ │ │ ├── RpcErr007.php │ │ │ │ ├── RpcLogger007.php │ │ │ │ ├── RpcQuery007.php │ │ │ │ ├── Utils007 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── Hasher007.php │ │ │ │ └── rpc_global.php │ │ └── vk-strings │ │ │ ├── .modulite.yaml │ │ │ ├── composer.json │ │ │ └── src │ │ │ ├── StringBuilder007.php │ │ │ ├── StringErrBase007.php │ │ │ └── Utils007 │ │ │ ├── .modulite.yaml │ │ │ ├── Append007.php │ │ │ └── Str007 │ │ │ ├── .modulite.yaml │ │ │ └── StrSlice007.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_files.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ ├── installed.php │ │ └── platform_check.php │ │ └── vk │ │ ├── engines │ │ ├── .modulite.yaml │ │ ├── composer.json │ │ ├── eng-ping.php │ │ └── src │ │ │ └── Messages │ │ │ ├── .modulite.yaml │ │ │ ├── Channels │ │ │ ├── .modulite.yaml │ │ │ └── ChannelsRep.php │ │ │ ├── Core │ │ │ ├── .modulite.yaml │ │ │ ├── ClusterConnection.php │ │ │ └── MsgLogger.php │ │ │ ├── Folders │ │ │ ├── .modulite.yaml │ │ │ └── FoldersRep.php │ │ │ └── MessagesLayer.php │ │ ├── rpc │ │ ├── composer.json │ │ └── src │ │ │ ├── Layer007 │ │ │ ├── .modulite.yaml │ │ │ └── QueryBuilder007.php │ │ │ ├── RpcErr007.php │ │ │ ├── RpcLogger007.php │ │ │ ├── RpcQuery007.php │ │ │ ├── Utils007 │ │ │ ├── .modulite.yaml │ │ │ └── Hasher007.php │ │ │ └── rpc_global.php │ │ └── strings │ │ ├── .modulite.yaml │ │ ├── composer.json │ │ └── src │ │ ├── StringBuilder007.php │ │ ├── StringErrBase007.php │ │ └── Utils007 │ │ ├── .modulite.yaml │ │ ├── Append007.php │ │ └── Str007 │ │ ├── .modulite.yaml │ │ └── StrSlice007.php ├── 008_mod_generics │ ├── 008_mod_generics.php │ ├── Either008.php │ ├── Logic008 │ │ ├── .modulite.yaml │ │ └── TestLogic008.php │ └── WithGen008 │ │ ├── .modulite.yaml │ │ └── gen_f_008.php ├── 009_mod_magic_m │ ├── 009_mod_magic_m.php │ ├── GlobWithClone009.php │ ├── GlobWithCtor009.php │ ├── Logic009 │ │ ├── .modulite.yaml │ │ └── TestMagic009.php │ └── WithMagic009 │ │ ├── .modulite.yaml │ │ └── WithToString009.php ├── 010_mod_unreachable │ ├── 010_mod_unreachable.php │ └── Utils010 │ │ ├── .modulite.yaml │ │ ├── Strings010.php │ │ ├── UnreachableClass010.php │ │ └── UnreachableNs │ │ └── AnotherUn010.php ├── 011_late_static_bindings │ ├── 011_late_static_bindings.php │ ├── Logs011 │ │ └── BaseLog011.php │ └── Messages011 │ │ ├── .modulite.yaml │ │ └── MessagesLogger011.php ├── 012_package_not_required_in_derived_class │ ├── 012_package_not_required_in_derived_class.php │ ├── BasePrinter012 │ │ └── BasePrinter012.php │ ├── Printer012 │ │ ├── .modulite.yaml │ │ └── Printer012.php │ ├── composer.json │ ├── packages │ │ └── vk-strings │ │ │ ├── composer.json │ │ │ └── src │ │ │ └── SomeStr.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ └── installed.php │ │ └── vk │ │ └── strings │ │ ├── composer.json │ │ └── src │ │ └── SomeStr.php ├── 013_inheritance_calling_class_inside_parent │ ├── 013_inheritance_calling_class_inside_parent.php │ ├── BasePrinter013 │ │ ├── AppendStr013.php │ │ └── BasePrinter013.php │ └── Printer013 │ │ ├── .modulite.yaml │ │ └── Printer013.php ├── 100_empty_yaml_file │ ├── .modulite.yaml │ └── 100_empty_yaml_file.php ├── 101_corrupted_yaml_file │ ├── 101_corrupted_yaml_file.php │ ├── Algo101 │ │ ├── .modulite.yaml │ │ └── Sort101.php │ └── Utils101 │ │ ├── .modulite.yaml │ │ └── Strings101.php ├── 102_unknown_symbols │ ├── 102_unknown_symbols.php │ └── Utils102 │ │ ├── .modulite.yaml │ │ └── Strings102.php ├── 103_unknown_refs │ ├── 103_unknown_refs.php │ └── Utils103 │ │ ├── .modulite.yaml │ │ └── Strings103.php ├── 104_invalid_export │ ├── 104_invalid_export.php │ ├── Algo104 │ │ ├── .modulite.yaml │ │ └── Sort104.php │ └── Utils104 │ │ ├── .modulite.yaml │ │ ├── Strings104.php │ │ └── UtilsInner │ │ ├── .modulite.yaml │ │ └── UtilsVeryInner │ │ ├── .modulite.yaml │ │ └── UtilsVeryInnerFuncs.php ├── 105_inconsistent_nesting │ ├── 105_inconsistent_nesting.php │ ├── Messages105 │ │ ├── .modulite.yaml │ │ ├── Feed105 │ │ │ ├── .modulite.yaml │ │ │ └── Feed105.php │ │ ├── Infra105 │ │ │ ├── .modulite.yaml │ │ │ └── Infra105.php │ │ ├── Messages105.php │ │ └── Sub105 │ │ │ └── Channels105 │ │ │ ├── .modulite.yaml │ │ │ └── Channels105.php │ └── Utils105 │ │ ├── .modulite.yaml │ │ └── Strings105.php ├── 106_internal_submod │ ├── 106_internal_submod.php │ ├── API106 │ │ ├── .modulite.yaml │ │ ├── ApiCall.php │ │ └── Impl │ │ │ ├── .modulite.yaml │ │ │ └── ApiInternals.php │ ├── Messages106 │ │ ├── .modulite.yaml │ │ ├── Channels106 │ │ │ ├── .modulite.yaml │ │ │ ├── Channels106.php │ │ │ └── Infra106 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── Infra106.php │ │ ├── Core106 │ │ │ ├── .modulite.yaml │ │ │ └── Core106.php │ │ └── Messages106.php │ └── parent │ │ ├── .modulite.yaml │ │ ├── ParentFuncs_106.php │ │ ├── child1 │ │ ├── .modulite.yaml │ │ ├── child2 │ │ │ ├── .modulite.yaml │ │ │ ├── child3 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── Child3_106.php │ │ │ └── child3my │ │ │ │ ├── .modulite.yaml │ │ │ │ └── Child3My_106.php │ │ └── child2my │ │ │ ├── .modulite.yaml │ │ │ └── Child2My_106.php │ │ └── morechild1 │ │ ├── .modulite.yaml │ │ └── MoreChild1.php ├── 110_check_extends │ ├── 110_check_extends.php │ ├── Feed110 │ │ ├── .modulite.yaml │ │ ├── IRank110.php │ │ └── Post110.php │ └── Utils110 │ │ ├── .modulite.yaml │ │ ├── More110.php │ │ └── Strings110.php ├── 111_check_calls │ ├── 111_check_calls.php │ ├── Feed111 │ │ ├── .modulite.yaml │ │ └── Post111.php │ ├── GlobalCl111.php │ ├── Messages111 │ │ ├── .modulite.yaml │ │ ├── Core111 │ │ │ ├── .modulite.yaml │ │ │ └── Core111.php │ │ └── User111.php │ ├── Utils111 │ │ ├── .modulite.yaml │ │ ├── Hidden111.php │ │ ├── Impl111 │ │ │ ├── .modulite.yaml │ │ │ └── Hasher111.php │ │ └── Strings111.php │ ├── parent │ │ ├── .modulite.yaml │ │ └── child1 │ │ │ ├── .modulite.yaml │ │ │ └── child2 │ │ │ ├── .modulite.yaml │ │ │ └── child3 │ │ │ ├── .modulite.yaml │ │ │ └── Child3_111.php │ └── plain │ │ ├── .modulite.yaml │ │ └── plain.php ├── 112_check_constants │ ├── 112_check_constants.php │ ├── Feed112 │ │ ├── .modulite.yaml │ │ ├── Infra112 │ │ │ ├── .modulite.yaml │ │ │ ├── Hidden112.php │ │ │ └── Strings112.php │ │ └── Post112.php │ └── Other112 │ │ ├── .modulite.yaml │ │ └── other112.php ├── 113_check_fields │ ├── 113_check_fields.php │ ├── Feed113 │ │ ├── .modulite.yaml │ │ ├── Impl113 │ │ │ ├── .modulite.yaml │ │ │ ├── Impl113.php │ │ │ └── Inner113 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── Inner113.php │ │ ├── Infra113 │ │ │ ├── .modulite.yaml │ │ │ ├── Hidden113.php │ │ │ └── Strings113.php │ │ └── Post113.php │ └── Other113 │ │ ├── .modulite.yaml │ │ └── other113.php ├── 114_check_classes │ ├── 114_check_classes.php │ ├── Feed114 │ │ ├── .modulite.yaml │ │ ├── Infra114 │ │ │ ├── .modulite.yaml │ │ │ ├── Hidden114.php │ │ │ └── Strings114.php │ │ ├── More114.php │ │ └── Post114.php │ ├── Glob114.php │ ├── GlobalA114.php │ ├── GlobalB114.php │ └── Other114 │ │ ├── .modulite.yaml │ │ └── other114.php ├── 115_check_globals │ ├── 115_check_globals.php │ ├── Feed115 │ │ ├── .modulite.yaml │ │ ├── Infra115 │ │ │ ├── .modulite.yaml │ │ │ └── Strings115.php │ │ └── Post115.php │ └── plain │ │ ├── .modulite.yaml │ │ ├── plain-details │ │ └── plain-internal.php │ │ └── plain.php ├── 120_composer_uses_outer │ ├── 120_composer_uses_outer.php │ ├── composer.json │ └── packages │ │ ├── vk-rpc │ │ ├── RpcQuery120.php │ │ └── composer.json │ │ └── vk-strings │ │ ├── composer.json │ │ └── src │ │ └── StringBuilder120.php ├── 121_composer_called_no_req │ ├── 121_composer_called_no_req.php │ ├── Messages121 │ │ ├── .modulite.yaml │ │ └── messages121.php │ ├── composer.json │ ├── packages │ │ ├── vk-rpc │ │ │ ├── composer.json │ │ │ └── rpc121.php │ │ └── vk-strings │ │ │ ├── composer.json │ │ │ └── strings121.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_files.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ └── installed.php │ │ └── vk │ │ ├── rpc │ │ ├── composer.json │ │ └── rpc121.php │ │ └── strings │ │ ├── composer.json │ │ └── strings121.php ├── 122_composer_req_symbol │ ├── 122_composer_req_symbol.php │ ├── Messages122 │ │ ├── .modulite.yaml │ │ └── Messages122.php │ ├── composer.json │ ├── packages │ │ └── vk-strings │ │ │ ├── composer.json │ │ │ └── src │ │ │ ├── StringImpl122 │ │ │ ├── .modulite.yaml │ │ │ └── StringImpl122.php │ │ │ └── Strings122.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ └── installed.php │ │ └── vk │ │ └── strings │ │ ├── composer.json │ │ └── src │ │ ├── StringImpl122 │ │ ├── .modulite.yaml │ │ └── StringImpl122.php │ │ └── Strings122.php ├── 123_call_composer_submod │ ├── 123_call_composer_submod.php │ ├── composer.json │ ├── packages │ │ ├── vk-rpc │ │ │ ├── composer.json │ │ │ └── src │ │ │ │ ├── Rpc123.php │ │ │ │ ├── RpcLogger123.php │ │ │ │ └── Utils123 │ │ │ │ ├── .modulite.yaml │ │ │ │ ├── Hasher123.php │ │ │ │ └── Impl123 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── HasherImpl123.php │ │ └── vk-strings │ │ │ ├── composer.json │ │ │ └── src │ │ │ ├── Internals123 │ │ │ ├── .modulite.yaml │ │ │ ├── Append123.php │ │ │ └── Str123 │ │ │ │ ├── .modulite.yaml │ │ │ │ └── StrSlice123.php │ │ │ └── Strings123.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ └── installed.php │ │ └── vk │ │ ├── rpc │ │ ├── composer.json │ │ └── src │ │ │ ├── Rpc123.php │ │ │ ├── RpcLogger123.php │ │ │ └── Utils123 │ │ │ ├── .modulite.yaml │ │ │ ├── Hasher123.php │ │ │ └── Impl123 │ │ │ ├── .modulite.yaml │ │ │ └── HasherImpl123.php │ │ └── strings │ │ ├── composer.json │ │ └── src │ │ ├── Internals123 │ │ ├── .modulite.yaml │ │ ├── Append123.php │ │ └── Str123 │ │ │ ├── .modulite.yaml │ │ │ └── StrSlice123.php │ │ └── Strings123.php ├── 124_root_composer_fields │ ├── .modulite.yaml │ ├── 124_root_composer_fields.php │ ├── composer.json │ ├── packages │ │ ├── vk-rpc │ │ │ ├── .modulite.yaml │ │ │ ├── composer.json │ │ │ └── src │ │ │ │ ├── Rpc124.php │ │ │ │ └── RpcLogger124.php │ │ └── vk-strings │ │ │ ├── .modulite.yaml │ │ │ ├── composer.json │ │ │ └── src │ │ │ ├── Impl124 │ │ │ ├── .modulite.yaml │ │ │ ├── Append124.php │ │ │ └── Hidden124.php │ │ │ └── Strings124.php │ └── vendor │ │ ├── autoload.php │ │ ├── composer │ │ ├── ClassLoader.php │ │ ├── InstalledVersions.php │ │ ├── LICENSE │ │ ├── autoload_classmap.php │ │ ├── autoload_namespaces.php │ │ ├── autoload_psr4.php │ │ ├── autoload_real.php │ │ ├── autoload_static.php │ │ ├── installed.json │ │ └── installed.php │ │ └── vk │ │ ├── rpc │ │ ├── .modulite.yaml │ │ ├── composer.json │ │ └── src │ │ │ ├── Rpc124.php │ │ │ └── RpcLogger124.php │ │ └── strings │ │ ├── .modulite.yaml │ │ ├── composer.json │ │ └── src │ │ ├── Impl124 │ │ ├── .modulite.yaml │ │ ├── Append124.php │ │ └── Hidden124.php │ │ └── Strings124.php ├── 125_wrong_static_bindings │ ├── 125_wrong_static_bindings.php │ ├── Logs125 │ │ └── BaseLog125.php │ └── Messages125 │ │ ├── .modulite.yaml │ │ └── MessagesLogger125.php └── 130_kphp_unsupported │ ├── 130_kphp_unsupported.php │ └── Utils130 │ ├── .modulite.yaml │ ├── Eraseable.php │ └── Strings130.php └── phpunit.xml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @VKCOM/kphp-developers 2 | .github/ @VKCOM/vk-sec 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "composer" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | allow: 8 | - dependency-type: "direct" 9 | reviewers: 10 | - "VKCOM/vk-sec" 11 | - "VKCOM/kphp-developers" 12 | - package-ecosystem: "github-actions" 13 | # Workflow files stored in the 14 | # default location of `.github/workflows` 15 | directory: "/" 16 | schedule: 17 | interval: "daily" 18 | reviewers: 19 | - "VKCOM/vk-sec" 20 | - "VKCOM/kphp-developers" 21 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | tests: 8 | name: Tests (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}) 9 | runs-on: ${{ matrix.operating-system }} 10 | timeout-minutes: 60 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | operating-system: [ ubuntu-latest, macos-latest ] 15 | php-versions: [ 7.4, 8.0, 8.1, 8.2 ] 16 | 17 | steps: 18 | - name: Fetch Sources 19 | uses: actions/checkout@v3 20 | 21 | - name: Install PHP 22 | uses: shivammathur/setup-php@v2 23 | with: 24 | coverage: none 25 | php-version: ${{ matrix.php-versions }} 26 | tools: composer:v2 27 | 28 | - name: Install dependencies 29 | run: composer install --no-progress 30 | 31 | - name: Execute tests 32 | run: composer run test:unit 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /.build 3 | /vendor 4 | /composer.lock 5 | .DS_Store 6 | kphp_out 7 | .phpunit.result.cache 8 | .env 9 | 10 | /tests/php/**/testrun.neon 11 | /phpstan.neon 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 VK.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vkcom/modulite-phpstan", 3 | "description": "A PHPStan plugin providing Modulite support for plain PHP (not KPHP) projects", 4 | "license": "MIT", 5 | "type": "phpstan-extension", 6 | "require": { 7 | "php": "^7.4 || ^8.0", 8 | "phpstan/phpstan": "^1.8", 9 | "symfony/polyfill-php80": "^v1.27.0", 10 | "symfony/yaml": "^5.4 || ^6.0" 11 | }, 12 | "require-dev": { 13 | "phpstan/phpstan-phpunit": "^1.2", 14 | "phpunit/phpunit": "^9.5" 15 | }, 16 | "minimum-stability": "dev", 17 | "prefer-stable": true, 18 | "autoload": { 19 | "psr-4": { 20 | "ModulitePHPStan\\": "src/" 21 | } 22 | }, 23 | "autoload-dev": { 24 | "psr-4": { 25 | "ModuliteTests\\": "tests/" 26 | }, 27 | "classmap": [ 28 | "tests/" 29 | ] 30 | }, 31 | "config": { 32 | "sort-packages": true 33 | }, 34 | "extra": { 35 | "phpstan": { 36 | "includes": [ 37 | "extension.neon" 38 | ] 39 | } 40 | }, 41 | "scripts": { 42 | "test:unit": "vendor/bin/phpunit --configuration tests/phpunit.xml" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /docs/img/screen-err-phpstan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VKCOM/modulite-phpstan/7cad66f77d41a1384bd485b9e9b3fd115e366c29/docs/img/screen-err-phpstan.png -------------------------------------------------------------------------------- /src/ModulitePHPStanError.php: -------------------------------------------------------------------------------- 1 | message = $message; 19 | $this->file = $file; 20 | $this->fileDescription = $fileDescription; 21 | $this->line = $line; 22 | } 23 | 24 | public function getFile(): string { 25 | return $this->file; 26 | } 27 | 28 | public function getIdentifier(): string { 29 | return self::IDENTIFIER; 30 | } 31 | 32 | public function getLine(): int { 33 | return $this->line; 34 | } 35 | 36 | public function getMessage(): string { 37 | return $this->message; 38 | } 39 | 40 | public function getFileDescription(): string { 41 | return $this->fileDescription; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/ModuliteYaml/ModuliteYamlError.php: -------------------------------------------------------------------------------- 1 | message = str_ends_with($yaml_filename, '.yaml') ? "Failed loading $rel_filename: $message" : $message; 13 | $this->yaml_filename = $yaml_filename; 14 | $this->line = $line; 15 | } 16 | 17 | public function getMessage(): string { 18 | return $this->message; 19 | } 20 | 21 | public function getYamlFilename(): string { 22 | return $this->yaml_filename; 23 | } 24 | 25 | public function getLine(): int { 26 | return $this->line; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/Folders/Folder_000_Test.php: -------------------------------------------------------------------------------- 1 | doSmth(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/php/002_ok_require_submod/API002/Impl/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@api/impl" 2 | namespace: "API002\\Impl" 3 | 4 | export: 5 | - "ApiInternals" 6 | 7 | force-internal: 8 | 9 | require: 10 | - "@msg" 11 | - "@msg/channels" 12 | - "@api" 13 | 14 | -------------------------------------------------------------------------------- /tests/php/002_ok_require_submod/API002/Impl/ApiInternals.php: -------------------------------------------------------------------------------- 1 | printHidConst(); 35 | } 36 | 37 | private function printHidConst() { 38 | echo \Child3_003::HID, ' ', \Child3_003::$HID, "\n"; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/php/003_allow_internal/Messages003/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg" 2 | namespace: "\\Messages003" 3 | 4 | export: 5 | - "User003" 6 | 7 | force-internal: 8 | 9 | require: 10 | - "@feed" 11 | - "@utils" 12 | - "@plain" 13 | - "@msg/core" 14 | 15 | allow-internal-access: 16 | "@feed": 17 | - "@msg/core" 18 | -------------------------------------------------------------------------------- /tests/php/003_allow_internal/Messages003/Core003/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg/core" 2 | namespace: "\\Messages003\\Core003" 3 | 4 | export: 5 | - "Core003" 6 | 7 | force-internal: 8 | 9 | require: 10 | 11 | -------------------------------------------------------------------------------- /tests/php/003_allow_internal/Messages003/Core003/Core003.php: -------------------------------------------------------------------------------- 1 | id++; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/php/004_instance_methods/Messages004/Messages004.php: -------------------------------------------------------------------------------- 1 | incId(); 22 | echo $hidden->id, "\n"; 23 | 24 | // that's also ok, we don't check instance methods 25 | $msg = new \Messages004\Messages004; 26 | $msg->instanceFnMarkedForceInternal(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/php/005_inheritance/005_inheritance.php: -------------------------------------------------------------------------------- 1 | @ok 2 | KPHP_ENABLE_MODULITE=1 3 | pubInstanceFn(); 15 | echo $mmm->i, ' ', GImportTrait::$count, "\n"; 16 | 17 | function callSend(Feed005\Send005\ISender $sender) { 18 | $sender->send(); 19 | } 20 | 21 | function printCurDescInherit() { 22 | \Common005\ErrBase005::printCurDesc(); 23 | \Feed005\ErrFeed005::printCurDesc(); 24 | } 25 | 26 | RankImpl1::rank(); 27 | RankImpl2::rank(); 28 | RankImpl1::copyMe(); 29 | RankImpl2::copyMe(); 30 | 31 | callSend(SenderFactory::createSender('email')); 32 | callSend(SenderFactory::createSender('sms')); 33 | 34 | printCurDescInherit(); 35 | 36 | Common005\CallOthers005::accessGloDer(); 37 | Common005\CallOthers005::accessMessage(); 38 | -------------------------------------------------------------------------------- /tests/php/005_inheritance/Common005/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@common" 2 | namespace: "Common005" 3 | 4 | export: 5 | - ErrBase005 6 | - CallOthers005 7 | 8 | force-internal: 9 | 10 | require: 11 | - "@messages" 12 | - \GloDer005::STR 13 | - \GloDer005::$COUNT 14 | - \GloDer005::stF() 15 | - \GloDer005::inF() 16 | -------------------------------------------------------------------------------- /tests/php/005_inheritance/Common005/CallOthers005.php: -------------------------------------------------------------------------------- 1 | getDest(), "\n"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/php/005_inheritance/Feed005/Send005/SenderEMail.php: -------------------------------------------------------------------------------- 1 | printLocation(); 8 | } 9 | 10 | function getDest(): string { 11 | return "email"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/005_inheritance/Feed005/Send005/SenderSms.php: -------------------------------------------------------------------------------- 1 | printLocation(); 8 | } 9 | 10 | function getDest(): string { 11 | return "sms"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/005_inheritance/Feed005/SenderFactory.php: -------------------------------------------------------------------------------- 1 | showThisClass(); 13 | 14 | // here $impl is auto-deduced as PrivClass because of typed callable 15 | // so, we can call its instance methods, since we don't analyze instance methods 16 | // but we can't write a type hint or extract this callback into another var, as we can't use that internal class in phpdoc 17 | Feed006\PubFeed::accessToPrivClass(function($impl) { // function(PrivClass $impl) is erroneous 18 | $impl->myMethod(); 19 | }); 20 | -------------------------------------------------------------------------------- /tests/php/006_known_bugs/Feed006/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@feed" 2 | namespace: "\\Feed006" 3 | 4 | export: 5 | - "PubFeed" 6 | 7 | force-internal: 8 | 9 | require: 10 | 11 | -------------------------------------------------------------------------------- /tests/php/006_known_bugs/Feed006/PrivClass.php: -------------------------------------------------------------------------------- 1 | logWith('global'); 21 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/Utils007/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@utils" 2 | namespace: "" 3 | 4 | export: 5 | - "utilsSummarize()" 6 | 7 | require: 8 | - "#vk/strings" 9 | - "#vk/engines" 10 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/Utils007/utils007.php: -------------------------------------------------------------------------------- 1 | append('world'); 6 | echo $b->get(), "\n"; 7 | 8 | echo \VK\Strings\Utils007\Append007::concatStr('utils', 'concat'), "\n"; 9 | 10 | pingAllEngines(); 11 | \Engines\Messages\MessagesLayer::pingRepChannels(); 12 | \Engines\Messages\Channels\ChannelsRep::createChannelsRep()->logWith('utilsSummarize'); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phpt/007", 3 | "require": { 4 | "vk/rpc": "*", 5 | "vk/engines": "*" 6 | }, 7 | "repositories": [{ 8 | "type": "path", 9 | "url": "./packages/vk-rpc" 10 | }, { 11 | "type": "path", 12 | "url": "./packages/vk-strings" 13 | }, { 14 | "type": "path", 15 | "url": "./packages/engines-all" 16 | }] 17 | } 18 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "" 2 | namespace: "VK\\Messages\\" 3 | 4 | export: 5 | - "@msg" 6 | - "\\START_MODE" 7 | - "\\pingAllEngines()" 8 | 9 | require: 10 | - "\\MONOLITH_CONST_007" 11 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/engines", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "Engines\\": "src/" 8 | }, 9 | "files": [ 10 | "eng-ping.php" 11 | ] 12 | }, 13 | "require": { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/eng-ping.php: -------------------------------------------------------------------------------- 1 | log(); 10 | 11 | if (0) echo MONOLITH_CONST_007; 12 | } 13 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg" 2 | namespace: "Engines\\Messages\\" 3 | 4 | export: 5 | - "@msg/channels" 6 | - "@msg/folders" 7 | - "MessagesLayer" 8 | 9 | require: 10 | - "@msg/channels" 11 | - "@msg/core" 12 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/Channels/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg/channels" 2 | namespace: "Engines\\Messages\\Channels" 3 | 4 | export: 5 | - "ChannelsRep" 6 | 7 | require: 8 | - "@msg/core" 9 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/Channels/ChannelsRep.php: -------------------------------------------------------------------------------- 1 | conn = new ClusterConnection(); 17 | return $this; 18 | } 19 | 20 | public function log(): self { 21 | MsgLogger::logMessageInternal($this->conn); 22 | return $this; 23 | } 24 | 25 | public function logWith(string $postfix): self { 26 | MsgLogger::logMessageInternal($this->conn, $postfix); 27 | return $this; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/Core/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg/core" 2 | namespace: "Engines\\Messages\\Core" 3 | 4 | export: 5 | - "ClusterConnection" 6 | - "MsgLogger::logMessage()" 7 | 8 | require: 9 | 10 | allow-internal-access: 11 | "\\Engines\\Messages\\Channels\\ChannelsRep": 12 | - "MsgLogger::logMessageInternal()" 13 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/Core/ClusterConnection.php: -------------------------------------------------------------------------------- 1 | id = ++self::$count; 12 | } 13 | 14 | static public function checkValid() {} 15 | } 16 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/Core/MsgLogger.php: -------------------------------------------------------------------------------- 1 | id : "null"), ($postfix ?? ''), "\n"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/Folders/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg/folders" 2 | namespace: "Engines\\Messages\\Folders" 3 | 4 | export: 5 | - "FoldersRep" 6 | 7 | require: 8 | - "@msg/core" 9 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/Folders/FoldersRep.php: -------------------------------------------------------------------------------- 1 | conn = new ClusterConnection(); 17 | return $this; 18 | } 19 | 20 | public function log(): self { 21 | MsgLogger::logMessage($this->conn); 22 | return $this; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/engines-all/src/Messages/MessagesLayer.php: -------------------------------------------------------------------------------- 1 | makeConnection()->logWith('MessagesLayer'); 9 | 10 | Core\ClusterConnection::checkValid(); 11 | 12 | // allow using built-in constants, classes, etc. 13 | if (0) echo PHP_INT_MAX; 14 | if (0) \JsonEncoder::getLastError(); 15 | if (0) echo \JsonEncoder::rename_policy; 16 | if (0) new \ArrayIterator([]); 17 | if (0) instance_cache_delete(''); 18 | $f = function(\Exception $ex) {}; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-rpc/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/rpc", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\RPC\\": "src/" 8 | }, 9 | "files": [ 10 | "src/rpc_global.php" 11 | ] 12 | }, 13 | "require": { 14 | "php": "^7 || ^8", 15 | "vk/strings": "*" 16 | }, 17 | "repositories": [{ 18 | "type": "path", 19 | "url": "../vk-strings" 20 | }] 21 | } 22 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-rpc/src/Layer007/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@layer" 2 | namespace: VK\RPC\Layer007 3 | 4 | export: 5 | - QueryBuilder007 6 | 7 | require: 8 | - "#vk/strings" 9 | - \VK\RPC\RpcQuery007 10 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-rpc/src/Layer007/QueryBuilder007.php: -------------------------------------------------------------------------------- 1 | append(\VK\Strings\Utils007\Str007\StrSlice007::slice1('...')); 10 | $b->append(\VK\RPC\RpcQuery007::CLUSTER_NAME); 11 | return $b->get(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-rpc/src/RpcErr007.php: -------------------------------------------------------------------------------- 1 | append('.'); 12 | $b->append(self::CLUSTER_NAME); 13 | $q = $b->get(); 14 | echo "make query ", $q, "\n"; 15 | 16 | $q2 = Layer007\QueryBuilder007::alsoMakeQuery($prefix); 17 | var_dump($q === $q2); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-rpc/src/Utils007/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@utils" 2 | namespace: "VK\\RPC\\Utils007" 3 | 4 | export: 5 | - "Hasher007" 6 | 7 | require: 8 | - "\\VK\\RPC\\RpcLogger007::logWithHash()" 9 | - "\\globalFunctionInVkRpc()" 10 | - "\\GLOBAL_DEF_IN_RPC_007" 11 | - "\\MONOLITH_CONST_007" 12 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-rpc/src/Utils007/Hasher007.php: -------------------------------------------------------------------------------- 1 | " 2 | namespace: "VK\\Strings\\" 3 | 4 | export: 5 | # empty for composer packages means "by default" (e.g. all public symbols) 6 | # (but if any element is set, it means a manually provided export list) 7 | require: 8 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-strings/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/strings", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\Strings\\": "src/" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-strings/src/StringBuilder007.php: -------------------------------------------------------------------------------- 1 | s = $s; 12 | } 13 | 14 | public function append(string $s) { 15 | $this->s = Utils007\Append007::concatStr($this->s, $s); 16 | } 17 | 18 | public function get(): string { 19 | return $this->s; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/packages/vk-strings/src/StringErrBase007.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/composer/autoload_files.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/vk/engines/eng-ping.php', 10 | '4d7f506b61087534f627c85c16ad8eb6' => $vendorDir . '/vk/rpc/src/rpc_global.php', 11 | ); 12 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/vk/strings/src'), 10 | 'VK\\RPC\\' => array($vendorDir . '/vk/rpc/src'), 11 | 'Engines\\' => array($vendorDir . '/vk/engines/src'), 12 | ); 13 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/composer/platform_check.php: -------------------------------------------------------------------------------- 1 | = 70000)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.0.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "" 2 | namespace: "VK\\Messages\\" 3 | 4 | export: 5 | - "@msg" 6 | - "\\START_MODE" 7 | - "\\pingAllEngines()" 8 | 9 | require: 10 | - "\\MONOLITH_CONST_007" 11 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/engines", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "Engines\\": "src/" 8 | }, 9 | "files": [ 10 | "eng-ping.php" 11 | ] 12 | }, 13 | "require": { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/eng-ping.php: -------------------------------------------------------------------------------- 1 | log(); 10 | 11 | if (0) echo MONOLITH_CONST_007; 12 | } 13 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg" 2 | namespace: "Engines\\Messages\\" 3 | 4 | export: 5 | - "@msg/channels" 6 | - "@msg/folders" 7 | - "MessagesLayer" 8 | 9 | require: 10 | - "@msg/channels" 11 | - "@msg/core" 12 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/Channels/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg/channels" 2 | namespace: "Engines\\Messages\\Channels" 3 | 4 | export: 5 | - "ChannelsRep" 6 | 7 | require: 8 | - "@msg/core" 9 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/Channels/ChannelsRep.php: -------------------------------------------------------------------------------- 1 | conn = new ClusterConnection(); 17 | return $this; 18 | } 19 | 20 | public function log(): self { 21 | MsgLogger::logMessageInternal($this->conn); 22 | return $this; 23 | } 24 | 25 | public function logWith(string $postfix): self { 26 | MsgLogger::logMessageInternal($this->conn, $postfix); 27 | return $this; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/Core/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg/core" 2 | namespace: "Engines\\Messages\\Core" 3 | 4 | export: 5 | - "ClusterConnection" 6 | - "MsgLogger::logMessage()" 7 | 8 | require: 9 | 10 | allow-internal-access: 11 | "\\Engines\\Messages\\Channels\\ChannelsRep": 12 | - "MsgLogger::logMessageInternal()" 13 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/Core/ClusterConnection.php: -------------------------------------------------------------------------------- 1 | id = ++self::$count; 12 | } 13 | 14 | static public function checkValid() {} 15 | } 16 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/Core/MsgLogger.php: -------------------------------------------------------------------------------- 1 | id : "null"), ($postfix ?? ''), "\n"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/Folders/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@msg/folders" 2 | namespace: "Engines\\Messages\\Folders" 3 | 4 | export: 5 | - "FoldersRep" 6 | 7 | require: 8 | - "@msg/core" 9 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/Folders/FoldersRep.php: -------------------------------------------------------------------------------- 1 | conn = new ClusterConnection(); 17 | return $this; 18 | } 19 | 20 | public function log(): self { 21 | MsgLogger::logMessage($this->conn); 22 | return $this; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/engines/src/Messages/MessagesLayer.php: -------------------------------------------------------------------------------- 1 | makeConnection()->logWith('MessagesLayer'); 9 | 10 | Core\ClusterConnection::checkValid(); 11 | 12 | // allow using built-in constants, classes, etc. 13 | if (0) echo PHP_INT_MAX; 14 | if (0) \JsonEncoder::getLastError(); 15 | if (0) echo \JsonEncoder::rename_policy; 16 | if (0) new \ArrayIterator([]); 17 | if (0) instance_cache_delete(''); 18 | $f = function(\Exception $ex) {}; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/rpc/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/rpc", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\RPC\\": "src/" 8 | }, 9 | "files": [ 10 | "src/rpc_global.php" 11 | ] 12 | }, 13 | "require": { 14 | "php": "^7 || ^8", 15 | "vk/strings": "*" 16 | }, 17 | "repositories": [{ 18 | "type": "path", 19 | "url": "../vk-strings" 20 | }] 21 | } 22 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/rpc/src/Layer007/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@layer" 2 | namespace: VK\RPC\Layer007 3 | 4 | export: 5 | - QueryBuilder007 6 | 7 | require: 8 | - "#vk/strings" 9 | - \VK\RPC\RpcQuery007 10 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/rpc/src/Layer007/QueryBuilder007.php: -------------------------------------------------------------------------------- 1 | append(\VK\Strings\Utils007\Str007\StrSlice007::slice1('...')); 10 | $b->append(\VK\RPC\RpcQuery007::CLUSTER_NAME); 11 | return $b->get(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/rpc/src/RpcErr007.php: -------------------------------------------------------------------------------- 1 | append('.'); 12 | $b->append(self::CLUSTER_NAME); 13 | $q = $b->get(); 14 | echo "make query ", $q, "\n"; 15 | 16 | $q2 = Layer007\QueryBuilder007::alsoMakeQuery($prefix); 17 | var_dump($q === $q2); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/rpc/src/Utils007/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@utils" 2 | namespace: "VK\\RPC\\Utils007" 3 | 4 | export: 5 | - "Hasher007" 6 | 7 | require: 8 | - "\\VK\\RPC\\RpcLogger007::logWithHash()" 9 | - "\\globalFunctionInVkRpc()" 10 | - "\\GLOBAL_DEF_IN_RPC_007" 11 | - "\\MONOLITH_CONST_007" 12 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/rpc/src/Utils007/Hasher007.php: -------------------------------------------------------------------------------- 1 | " 2 | namespace: "VK\\Strings\\" 3 | 4 | export: 5 | # empty for composer packages means "by default" (e.g. all public symbols) 6 | # (but if any element is set, it means a manually provided export list) 7 | require: 8 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/strings/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/strings", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\Strings\\": "src/" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/strings/src/StringBuilder007.php: -------------------------------------------------------------------------------- 1 | s = $s; 12 | } 13 | 14 | public function append(string $s) { 15 | $this->s = Utils007\Append007::concatStr($this->s, $s); 16 | } 17 | 18 | public function get(): string { 19 | return $this->s; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/php/007_composer_ok/vendor/vk/strings/src/StringErrBase007.php: -------------------------------------------------------------------------------- 1 | fb(); 28 | 29 | $e2 = Either008::error/**/(new Either008_Bs, 'nulled', null); 30 | TestLogic008::printEitherIsError('e2', $e2); 31 | -------------------------------------------------------------------------------- /tests/php/008_mod_generics/Either008.php: -------------------------------------------------------------------------------- 1 | errors) > 0; 11 | } 12 | 13 | /** 14 | * @kphp-generic TEither, TData 15 | * @param TEither $either 16 | * @param TData $data 17 | * @return TEither 18 | */ 19 | public static function data($either, $data) { 20 | $either->data = $data; 21 | $either->errors = []; 22 | return $either; 23 | } 24 | 25 | /** 26 | * @kphp-generic TEither, TDef 27 | * @param TEither $either 28 | * @param mixed $error 29 | * @param TDef $default_value 30 | * @return TEither 31 | */ 32 | public static function error($either, $error, $default_value) { 33 | $either->data = $default_value; 34 | $either->errors = [$error]; 35 | return $either; 36 | } 37 | 38 | /** 39 | * @kphp-generic T 40 | * @param T $either 41 | * @return T::data 42 | */ 43 | public static function getData($either) { 44 | return $either->data; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /tests/php/008_mod_generics/Logic008/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@logic" 2 | namespace: Logic008\ 3 | 4 | export: 5 | - TestLogic008 6 | 7 | force-internal: 8 | 9 | require: 10 | - "@withgen" 11 | - \Either008::isError() 12 | -------------------------------------------------------------------------------- /tests/php/008_mod_generics/Logic008/TestLogic008.php: -------------------------------------------------------------------------------- 1 | clone $a); 13 | foreach ($out as $a) 14 | $a->fa(); 15 | } 16 | 17 | static function printEitherIsError(string $prefix, object $either) { 18 | if (\Either008::isError($either)) 19 | echo "$prefix: is error\n"; 20 | else 21 | echo "$prefix: not error\n"; 22 | 23 | \internal_f_non_generic('t1'); 24 | \internal_f_generic('t2', $either); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/php/008_mod_generics/WithGen008/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@withgen" 2 | namespace: "" 3 | 4 | export: 5 | - \my_map() 6 | - test_either_creation() 7 | 8 | force-internal: 9 | 10 | require: 11 | - "@logic" 12 | - Either008::data() 13 | - Either008::getData() 14 | 15 | allow-internal-access: 16 | Logic008\TestLogic008::printEitherIsError(): 17 | - internal_f_non_generic() 18 | - internal_f_generic() 19 | -------------------------------------------------------------------------------- /tests/php/008_mod_generics/WithGen008/gen_f_008.php: -------------------------------------------------------------------------------- 1 | $v) 21 | $result[$k] = $mapper($v); 22 | return $result; 23 | } 24 | 25 | function test_either_creation() { 26 | $either = Either008::data(new Either008_ints, [1,2,3]); 27 | var_dump(Either008::getData($either)); 28 | \Logic008\TestLogic008::printEitherIsError('test_either_creation', $either); 29 | } 30 | 31 | function internal_f_non_generic(string $prefix) { 32 | echo "(internal $prefix)\n"; 33 | } 34 | 35 | function internal_f_generic(string $prefix, object $obj) { 36 | echo "(internal gen $prefix)\n"; 37 | } 38 | -------------------------------------------------------------------------------- /tests/php/009_mod_magic_m/009_mod_magic_m.php: -------------------------------------------------------------------------------- 1 | @ok 2 | KPHP_ENABLE_MODULITE=1 3 | was_cloned = true; 8 | } 9 | 10 | public function printInfo() { 11 | echo "WithClone009 ", ($this->was_cloned ? "cloned" : "orig"), "\n"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/009_mod_magic_m/GlobWithCtor009.php: -------------------------------------------------------------------------------- 1 | printInfo(); 20 | $o2->printInfo(); 21 | } 22 | 23 | static function doSmth() { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/php/009_mod_magic_m/WithMagic009/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@withmagic" 2 | namespace: WithMagic009 3 | 4 | export: 5 | - WithToString009 6 | 7 | force-internal: 8 | 9 | require: 10 | - "\\Stringable" 11 | - "@logic" 12 | 13 | allow-internal-access: 14 | -------------------------------------------------------------------------------- /tests/php/009_mod_magic_m/WithMagic009/WithToString009.php: -------------------------------------------------------------------------------- 1 | n = $n; 10 | } 11 | 12 | public function __toString() { 13 | \Logic009\TestMagic009::doSmth(); 14 | return "n=$this->n"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/php/010_mod_unreachable/010_mod_unreachable.php: -------------------------------------------------------------------------------- 1 | @ok 2 | KPHP_ENABLE_MODULITE=1 3 | x; } 9 | } 10 | -------------------------------------------------------------------------------- /tests/php/010_mod_unreachable/Utils010/UnreachableNs/AnotherUn010.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /tests/php/012_package_not_required_in_derived_class/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/vk/strings/src'), 10 | 'Printer012\\' => array($baseDir . '/Printer012'), 11 | 'BasePrinter012\\' => array($baseDir . '/BasePrinter012'), 12 | ); 13 | -------------------------------------------------------------------------------- /tests/php/012_package_not_required_in_derived_class/vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | { 4 | "name": "vk/strings", 5 | "version": "0.0.1", 6 | "version_normalized": "0.0.1.0", 7 | "dist": { 8 | "type": "path", 9 | "url": "./packages/vk-strings", 10 | "reference": "0bbbd1fe63f5142d8c529bb2d8d6651418afe292" 11 | }, 12 | "type": "library", 13 | "installation-source": "dist", 14 | "autoload": { 15 | "psr-4": { 16 | "Vk\\TestSrt\\": "src/" 17 | } 18 | }, 19 | "transport-options": { 20 | "relative": true 21 | }, 22 | "install-path": "../vk/strings" 23 | } 24 | ], 25 | "dev": true, 26 | "dev-package-names": [] 27 | } 28 | -------------------------------------------------------------------------------- /tests/php/012_package_not_required_in_derived_class/vendor/vk/strings/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/strings", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "Vk\\TestSrt\\": "src/" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/php/012_package_not_required_in_derived_class/vendor/vk/strings/src/SomeStr.php: -------------------------------------------------------------------------------- 1 | get(); 15 | } 16 | } 17 | 18 | class Hidden114_2 {} 19 | -------------------------------------------------------------------------------- /tests/php/114_check_classes/Feed114/Infra114/Strings114.php: -------------------------------------------------------------------------------- 1 | demo(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/php/114_check_classes/Feed114/More114.php: -------------------------------------------------------------------------------- 1 | doSmth('printed'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/php/115_check_globals/115_check_globals.php: -------------------------------------------------------------------------------- 1 | @kphp_should_fail 2 | KPHP_ENABLE_MODULITE=1 3 | /in global scope/ 4 | /restricted to use global \$in_plain_115, it's not required by @plain/ 5 | /in Post115::demo/ 6 | /restricted to use global \$somehow, it's not required by @feed/ 7 | /in a lambda inside internal/ 8 | /global \$gg;/ 9 | /restricted to use global \$gg, it's not required by @plain/ 10 | /global \$g115, \$somehow;/ 11 | /restricted to use global \$g115, it's not required by @feed\/infra/ 12 | /restricted to use global \$somehow, it's not required by @feed\/infra/ 13 | useSymbolsFromMonolith(); 13 | -------------------------------------------------------------------------------- /tests/php/120_composer_uses_outer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phpt/120", 3 | "require": { 4 | "vk/strings": "*", 5 | "vk/rpc": "*" 6 | }, 7 | "repositories": [{ 8 | "type": "path", 9 | "url": "./packages/vk-strings" 10 | }, { 11 | "type": "path", 12 | "url": "./packages/vk-rpc" 13 | }] 14 | } 15 | -------------------------------------------------------------------------------- /tests/php/120_composer_uses_outer/packages/vk-rpc/RpcQuery120.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /tests/php/121_composer_called_no_req/vendor/composer/autoload_files.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/vk/rpc/rpc121.php', 10 | 'c23824722e5b5e3f0dc8519896d38952' => $vendorDir . '/vk/strings/strings121.php', 11 | ); 12 | -------------------------------------------------------------------------------- /tests/php/121_composer_called_no_req/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/..' . '/vk/rpc/rpc121.php', 11 | 'c23824722e5b5e3f0dc8519896d38952' => __DIR__ . '/..' . '/vk/strings/strings121.php', 12 | ); 13 | 14 | public static $classMap = array ( 15 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 16 | ); 17 | 18 | public static function getInitializer(ClassLoader $loader) 19 | { 20 | return \Closure::bind(function () use ($loader) { 21 | $loader->classMap = ComposerStaticInita3c42f44640e06fb676c0805a84b0949::$classMap; 22 | 23 | }, null, ClassLoader::class); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/php/121_composer_called_no_req/vendor/vk/rpc/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/rpc", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "files": ["rpc121.php"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/php/121_composer_called_no_req/vendor/vk/rpc/rpc121.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /tests/php/122_composer_req_symbol/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/vk/strings/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /tests/php/122_composer_req_symbol/vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | { 4 | "name": "vk/strings", 5 | "version": "0.0.1", 6 | "version_normalized": "0.0.1.0", 7 | "dist": { 8 | "type": "path", 9 | "url": "./packages/vk-strings", 10 | "reference": "22909c8cfd3884ebd8a69dade25e99dc56fd4a75" 11 | }, 12 | "type": "library", 13 | "installation-source": "dist", 14 | "autoload": { 15 | "psr-4": { 16 | "VK\\Strings\\": "src/" 17 | } 18 | }, 19 | "transport-options": { 20 | "relative": true 21 | }, 22 | "install-path": "../vk/strings" 23 | } 24 | ], 25 | "dev": true, 26 | "dev-package-names": [] 27 | } 28 | -------------------------------------------------------------------------------- /tests/php/122_composer_req_symbol/vendor/vk/strings/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/strings", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\Strings\\": "src/" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/php/122_composer_req_symbol/vendor/vk/strings/src/StringImpl122/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@impl" 2 | namespace: "VK\\Strings\\StringImpl122\\" 3 | 4 | export: 5 | - "StringImpl122" 6 | 7 | require: 8 | - "\\VK\\Strings\\Strings122" 9 | 10 | -------------------------------------------------------------------------------- /tests/php/122_composer_req_symbol/vendor/vk/strings/src/StringImpl122/StringImpl122.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /tests/php/123_call_composer_submod/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/vk/strings/src'), 10 | 'VK\\RPC\\' => array($vendorDir . '/vk/rpc/src'), 11 | ); 12 | -------------------------------------------------------------------------------- /tests/php/123_call_composer_submod/vendor/vk/rpc/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/rpc", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\RPC\\": "src/" 8 | } 9 | }, 10 | "require": { 11 | "vk/strings": "*" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/123_call_composer_submod/vendor/vk/rpc/src/Rpc123.php: -------------------------------------------------------------------------------- 1 | " 2 | namespace: "\\" 3 | 4 | export: 5 | 6 | require: 7 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/124_root_composer_fields.php: -------------------------------------------------------------------------------- 1 | @kphp_should_fail 2 | KPHP_ENABLE_MODULITE=1 3 | KPHP_COMPOSER_ROOT={dir} 4 | /restricted to use VK\\RPC\\RpcLogger124, it's internal in #vk\/rpc/ 5 | /restricted to use VK\\Strings\\Strings124, it's internal in #vk\/strings/ 6 | /restricted to use VK\\Strings\\Impl124\\Hidden124, it's internal in #vk\/strings\/@impl/ 7 | /restricted to use VK\\Strings\\Impl124\\Hidden124, it's internal in #vk\/strings\/@impl/ 8 | /restricted to use VK\\Strings\\Impl124\\Append124, #vk\/strings\/@impl is internal in #vk\/strings/ 9 | /restricted to use VK\\Strings\\Impl124\\Append124, #vk\/strings\/@impl is internal in #vk\/strings/ 10 | " 2 | namespace: "VK\\RPC\\" 3 | 4 | export: 5 | - "Rpc124" 6 | 7 | require: 8 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/packages/vk-rpc/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/rpc", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\RPC\\": "src/" 8 | } 9 | }, 10 | "require": { 11 | "vk/strings": "*" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/packages/vk-rpc/src/Rpc124.php: -------------------------------------------------------------------------------- 1 | " 2 | namespace: "VK\\Strings" 3 | 4 | export: 5 | - "Strings124" 6 | 7 | force-internal: 8 | - "Strings124::$count" 9 | 10 | require: 11 | 12 | allow-internal-access: 13 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/packages/vk-strings/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/strings", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\Strings\\": "src/" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/packages/vk-strings/src/Impl124/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@impl" 2 | namespace: "VK\\Strings\\Impl124" 3 | 4 | export: 5 | - "Append124" 6 | 7 | require: 8 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/packages/vk-strings/src/Impl124/Append124.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/vk/strings/src'), 10 | 'VK\\RPC\\' => array($vendorDir . '/vk/rpc/src'), 11 | ); 12 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/vendor/vk/rpc/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "" 2 | namespace: "VK\\RPC\\" 3 | 4 | export: 5 | - "Rpc124" 6 | 7 | require: 8 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/vendor/vk/rpc/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/rpc", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\RPC\\": "src/" 8 | } 9 | }, 10 | "require": { 11 | "vk/strings": "*" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/vendor/vk/rpc/src/Rpc124.php: -------------------------------------------------------------------------------- 1 | " 2 | namespace: "VK\\Strings" 3 | 4 | export: 5 | - "Strings124" 6 | 7 | force-internal: 8 | - "Strings124::$count" 9 | 10 | require: 11 | 12 | allow-internal-access: 13 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/vendor/vk/strings/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vk/strings", 3 | "version": "0.0.1", 4 | "type": "library", 5 | "autoload": { 6 | "psr-4": { 7 | "VK\\Strings\\": "src/" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/vendor/vk/strings/src/Impl124/.modulite.yaml: -------------------------------------------------------------------------------- 1 | name: "@impl" 2 | namespace: "VK\\Strings\\Impl124" 3 | 4 | export: 5 | - "Append124" 6 | 7 | require: 8 | -------------------------------------------------------------------------------- /tests/php/124_root_composer_fields/vendor/vk/strings/src/Impl124/Append124.php: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | ../src 19 | 20 | 21 | 22 | 23 | Folders 24 | 25 | 26 | 27 | --------------------------------------------------------------------------------