ScriptEvents.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Script;
  12. /**
  13. * The Script Events.
  14. *
  15. * @author François Pluchino <francois.pluchino@opendisplay.com>
  16. * @author Jordi Boggiano <j.boggiano@seld.be>
  17. */
  18. class ScriptEvents
  19. {
  20. /**
  21. * The PRE_INSTALL_CMD event occurs before the install command is executed.
  22. *
  23. * The event listener method receives a Composer\Script\CommandEvent instance.
  24. *
  25. * @var string
  26. */
  27. const PRE_INSTALL_CMD = 'pre-install-cmd';
  28. /**
  29. * The POST_INSTALL_CMD event occurs after the install command is executed.
  30. *
  31. * The event listener method receives a Composer\Script\CommandEvent instance.
  32. *
  33. * @var string
  34. */
  35. const POST_INSTALL_CMD = 'post-install-cmd';
  36. /**
  37. * The PRE_UPDATE_CMD event occurs before the update command is executed.
  38. *
  39. * The event listener method receives a Composer\Script\CommandEvent instance.
  40. *
  41. * @var string
  42. */
  43. const PRE_UPDATE_CMD = 'pre-update-cmd';
  44. /**
  45. * The POST_UPDATE_CMD event occurs after the update command is executed.
  46. *
  47. * The event listener method receives a Composer\Script\CommandEvent instance.
  48. *
  49. * @var string
  50. */
  51. const POST_UPDATE_CMD = 'post-update-cmd';
  52. /**
  53. * The PRE_PACKAGE_INSTALL event occurs before a package is installed.
  54. *
  55. * The event listener method receives a Composer\Script\PackageEvent instance.
  56. *
  57. * @var string
  58. */
  59. const PRE_PACKAGE_INSTALL = 'pre-package-install';
  60. /**
  61. * The POST_PACKAGE_INSTALL event occurs after a package is installed.
  62. *
  63. * The event listener method receives a Composer\Script\PackageEvent instance.
  64. *
  65. * @var string
  66. */
  67. const POST_PACKAGE_INSTALL = 'post-package-install';
  68. /**
  69. * The PRE_PACKAGE_UPDATE event occurs before a package is updated.
  70. *
  71. * The event listener method receives a Composer\Script\PackageEvent instance.
  72. *
  73. * @var string
  74. */
  75. const PRE_PACKAGE_UPDATE = 'pre-package-update';
  76. /**
  77. * The POST_PACKAGE_UPDATE event occurs after a package is updated.
  78. *
  79. * The event listener method receives a Composer\Script\PackageEvent instance.
  80. *
  81. * @var string
  82. */
  83. const POST_PACKAGE_UPDATE = 'post-package-update';
  84. /**
  85. * The PRE_PACKAGE_UNINSTALL event occurs before a package has been uninstalled.
  86. *
  87. * The event listener method receives a Composer\Script\PackageEvent instance.
  88. *
  89. * @var string
  90. */
  91. const PRE_PACKAGE_UNINSTALL = 'pre-package-uninstall';
  92. /**
  93. * The POST_PACKAGE_UNINSTALL event occurs after a package has been uninstalled.
  94. *
  95. * The event listener method receives a Composer\Script\PackageEvent instance.
  96. *
  97. * @var string
  98. */
  99. const POST_PACKAGE_UNINSTALL = 'post-package-uninstall';
  100. /**
  101. * The PRE_AUTOLOAD_DUMP event occurs before the autoload file is generated.
  102. *
  103. * The event listener method receives a Composer\Script\Event instance.
  104. *
  105. * @var string
  106. */
  107. const PRE_AUTOLOAD_DUMP = 'pre-autoload-dump';
  108. /**
  109. * The POST_AUTOLOAD_DUMP event occurs after the autoload file has been generated.
  110. *
  111. * The event listener method receives a Composer\Script\Event instance.
  112. *
  113. * @var string
  114. */
  115. const POST_AUTOLOAD_DUMP = 'post-autoload-dump';
  116. /**
  117. * The POST_ROOT_PACKAGE_INSTALL event occurs after the root package has been installed.
  118. *
  119. * The event listener method receives a Composer\Script\PackageEvent instance.
  120. *
  121. * @var string
  122. */
  123. const POST_ROOT_PACKAGE_INSTALL = 'post-root-package-install';
  124. /**
  125. * The POST_CREATE_PROJECT event occurs after the create-project command has been executed.
  126. * Note: Event occurs after POST_INSTALL_CMD
  127. *
  128. * The event listener method receives a Composer\Script\PackageEvent instance.
  129. *
  130. * @var string
  131. */
  132. const POST_CREATE_PROJECT_CMD = 'post-create-project-cmd';
  133. }