Quién, dónde, cuándo: sistema de componentes para separar las áreas de responsabilidad del equipo

, PHP- Badoo Bumble. 200 -, . . 2006 , . , : , , . « » — , . 





, . 





: , . , ?





, . (DocBlock) :





  • @team — , ;





  • @maintainer — , ( ).





/**
 * @team Team name <team@example.com>
 * @maintainer John Smith <john.smith@example.com>
 * @maintainer ....
 */
      
      



. , PhpStorm — . Git hook, , .





. , - — . , Zabbix. — , . , .





. , . 





.





: — , . , , () . 





— , . , .





:





  • ;





  • ( );





  • , — — ;





  • ;





  • (alias).





. :





Ejemplo de una página de intranet de componentes

, :





  • ;





  • email;





  • , ;





  • , , Jira;





  • , , ;





  • : , ( , , );





/**
 * @component component_alias
 */
      
      



Git hook, . , , , @component . 





remote: ERROR in SomeClass.php:        
remote: * Unknown @component: UnknownComponent. You have to create component before using it in the code   
      
      



, , . , .





, , . , .





$componentManager = new \Components\ComponentManager();
$component = $componentManager->getComponent('component_alias');

$recipients = [];
foreach ($component->getMaintainers() as maintainer) {
    $recipients[] = $maintainer->getEmail();
}
      
      



:





$componentManager = new \Components\ComponentManager();
$component = $componentManager->getComponent('component_alias');

foreach ($component->getMaintainers() as $maintainer) {
    if ($maintainer->isDuty()) {
        return $maintainer;
    }
}
      
      



PhpStorm

PhpStorm, . , , .





IDE . (Slack).





, . , . — , (). - , - .





, . , . , .





, . - , . 80% , , 80% , , .





, , bus factor.





, . .





PHP-

PHP- , Sentry Splunk, . . 





— . , - . 





:





  • ;





  • .





, , . -: 





Badoo Bumble , . MySQL.  





: , - . :





  1. , .





  2. ( , phpMyAdmin, Sequel Pro, IDE . .).





  3. .





  4. .





? 





, — . — . , .





: , . , .





, DBRegistry. , INFORMATION_SCHEMA.





, .





, - (, CPU) . DBRegistry, , , .





, . . « ?». — .





, , .





. !








All Articles