Is there a way to use .md files in package-builder setPackageAttributes?

Is it possible to use .md files in package-builder setPackageAttributes?

This doesn’t work:

$builder->setPackageAttributes([
    'license'   => file_get_contents($sources['root'] . 'LICENSE.md'),
    'readme'    => file_get_contents($sources['root'] . 'README.md'),
    'changelog' => file_get_contents($sources['root'] . 'CHANGELOG.md'),
    'copy_exclude_patterns' => ['/^__/'],
    'setup-options' => [
        'source' => $sources['build'] . 'setup.options.php',
    ],
]);

The installer shows blank fields for readme, license and changelog.

If you are testing this on MODX 3.0.3: There is a bug in this MODX version, that prevents these files from being shown:

1 Like

Yep - testing on MODX 3.0.3 (MODX Cloud).
Thanks for your hint!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.