Skip to content

Commit 5bf9688

Browse files
authored
Merge branch 'develop' into 1214-fix-nested-run-commands
2 parents 6486520 + 236d3b5 commit 5bf9688

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1313
### Deprecated
1414
### Removed
1515
### Fixed
16+
- Regex for namespace extraction from custom command classes.
1617
- Nested and user-triggered `Telegram::runCommands`.
1718
### Security
1819

src/Telegram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public function getCommandObject(string $command, string $filepath = ''): ?Comma
393393
protected function getFileNamespace(string $src): ?string
394394
{
395395
$content = file_get_contents($src);
396-
if (preg_match('#^\s+namespace\s+(.+?);#m', $content, $m)) {
396+
if (preg_match('#^\s*namespace\s+(.+?);#m', $content, $m)) {
397397
return $m[1];
398398
}
399399

0 commit comments

Comments
 (0)