Skip to content

Commit 0f14046

Browse files
committed
Prevent auto execute of generate constant class
1 parent 004ff71 commit 0f14046

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

GenerateConstantClass.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,6 @@ private static function writeFile($className, $valueCallback, $varComment = 'Gly
8484
}
8585
}
8686

87-
GenerateConstantClass::execute();
87+
if (isset($argv[1]) && $argv[1] === 'exec') {
88+
GenerateConstantClass::execute();
89+
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"post-update-cmd": [
6767
"@generate-constant-class"
6868
],
69-
"generate-constant-class": "php GenerateConstantClass.php",
69+
"generate-constant-class": "php GenerateConstantClass.php exec",
7070
"serve": "php -S localhost:5040 -t ."
7171
}
7272
}

0 commit comments

Comments
 (0)