Open matiasr2503 opened 2 years ago
Similar issue after update up to 3.0.3.
Downgrade to 3.0.2 helps.
composer require light/yii2-swagger 3.0.2 -W
Check out the migration process to version 4. https://zircote.github.io/swagger-php/guide/migrating-to-v4.html
Annotations now must be associated with a structural element (class, trait, interface), a method, property or const.
@lichunqiang perhaps the package version should have been upgraded to 4.0.0. #30 zircote/swagger-php v4 is fine and much more convenient, but it breaks backward compatibility :-(
I ran into a similar issue and it turned out to be a naming issue for the underlying class.
The file name and the class name inside must match, otherwise it would return "Skipping unknown namespace/to/class".
Basicly class_exists('Namespace/To/Class') will be false if the class isn't autoloaded. This is what ReflectionAnalyzer->analyzeFqdn() checks.
Fail to open swagger app: PHP version: 7.4.30 Yii version 2.0.45 light/yii2-swagger v3.0.3