Skip to content

Commit

Permalink
Fixed class of command won't be loaded after gen:command. (#2089)
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Jul 10, 2020
1 parent e3d334f commit bcc60f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [#2059](https://github.com/hyperf/hyperf/pull/2059) Fixed redis reconnection bug in socket.io server.
- [#2067](https://github.com/hyperf/hyperf/pull/2067) Fixed bug that syntax parse error will cause worker exceptions for `hyperf/watcher`.
- [#2085](https://github.com/hyperf/hyperf/pull/2085) Fixed bug in RetryFalsy Annotation that leads to retrying truthy results.
- [#2089](https://github.com/hyperf/hyperf/pull/2089) Fixed class of command won't be loaded after `gen:command`.

## Added

Expand Down
2 changes: 1 addition & 1 deletion src/di/src/Annotation/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function scan(): array
$this->clearRemovedClasses($collectors, $classes);

foreach ($classes as $reflectionClass) {
if ($this->filesystem->lastModified($reflectionClass->getFileName()) > $lastCacheModified) {
if ($this->filesystem->lastModified($reflectionClass->getFileName()) >= $lastCacheModified) {
/** @var MetadataCollector $collector */
foreach ($collectors as $collector) {
$collector::clear($reflectionClass->getName());
Expand Down

0 comments on commit bcc60f5

Please sign in to comment.