Closed
Description
If I use the below PHP class structure, then parsing the annotations will always return an empty class level annotation. The current HEAD of https://www.drupal.org/project/migrate_source_csv is broken right now using this pattern. It is a sneaky breakage, because Unit tests pass. It is only when I run integration tests that is breaks.
See https://www.drupal.org/node/2818891
/**
* Source for CSV.
*
* @MigrateSource(
* id = "csv"
* )
*/
class CSV extends SourcePluginBase {
protected $fileClass = '';
/**
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration) {
$this->fileClass = empty($configuration['file_class']) ? CSVFileObject::class : $configuration['file_class'];
}