88use bizley \migration \table \BlueprintInterface ;
99use bizley \migration \table \ForeignKeyInterface ;
1010use bizley \migration \TableMissingException ;
11+ use ErrorException ;
12+ use Exception ;
1113use Yii ;
1214use yii \base \Action ;
13- use yii \base \Exception ;
15+ use yii \base \Exception as BaseException ;
1416use yii \base \InvalidConfigException ;
1517use yii \base \NotSupportedException ;
1618use yii \console \ExitCode ;
@@ -163,8 +165,8 @@ public function optionAliases(): array
163165 * Sets the workingPath and workingNamespace and makes sure DB connection is prepared.
164166 * @param Action<self> $action the action to be executed.
165167 * @return bool whether the action should continue to be executed.
168+ * @throws BaseException
166169 * @throws InvalidConfigException
167- * @throws Exception
168170 */
169171 public function beforeAction ($ action ): bool // BC declaration
170172 {
@@ -586,7 +588,11 @@ public function actionUpdate(string $inputTable): int
586588 return ExitCode::OK ;
587589 }
588590
589- /** @since 4.4.0 */
591+ /**
592+ * @since 4.4.0
593+ * @throws ErrorException
594+ * @throws InvalidConfigException
595+ */
590596 public function actionSql (string $ migrationName , string $ method = 'up ' ): int
591597 {
592598 $ method = \strtolower ($ method );
@@ -615,7 +621,7 @@ public function actionSql(string $migrationName, string $method = 'up'): int
615621
616622 /**
617623 * Prepares path directory. If directory doesn't exist it's being created.
618- * @throws Exception
624+ * @throws BaseException
619625 */
620626 private function preparePathDirectory (string $ path ): string
621627 {
@@ -632,7 +638,7 @@ private function preparePathDirectory(string $path): string
632638 /**
633639 * Stores the content in a file under the given path.
634640 * @param mixed $content
635- * @throws \Throwable
641+ * @throws BaseException
636642 */
637643 public function storeFile (string $ path , $ content ): void
638644 {
@@ -662,6 +668,7 @@ private function fixHistory(string $migrationClassName): void
662668 /**
663669 * Generates migration for postponed foreign keys.
664670 * @param array<ForeignKeyInterface> $postponedForeignKeys
671+ * @throws BaseException
665672 * @throws DbException
666673 * @throws InvalidConfigException
667674 * @throws NotSupportedException
@@ -692,6 +699,7 @@ private function generateMigrationForForeignKeys(array $postponedForeignKeys, st
692699
693700 /**
694701 * Generates updating migration based on a blueprint.
702+ * @throws BaseException
695703 * @throws DbException
696704 * @throws InvalidConfigException
697705 * @throws NotSupportedException
@@ -721,6 +729,7 @@ private function generateMigrationWithBlueprint(BlueprintInterface $blueprint, s
721729 /**
722730 * Generates creating migration based on a table structure.
723731 * @param array<string> $referencesToPostpone
732+ * @throws BaseException
724733 * @throws DbException
725734 * @throws InvalidConfigException
726735 * @throws NotSupportedException
@@ -897,7 +906,8 @@ private function getAllTableNames(Connection $db): array
897906 * via the server's filesystem.
898907 * Note: On Windows, this function fails silently when applied on a regular file.
899908 * @param string $path the path to the file or directory.
900- * @throws \Exception
909+ * @throws BaseException
910+ * @throws Exception
901911 */
902912 private function setFileModeAndOwnership (string $ path ): void
903913 {
0 commit comments