/src/ -export-ignore разыгноривает только саму директорию src. Для файлов надо ещё добавить правило /src/** -export-ignore.В документации к gitattributes это есть (RTFM):
The rules by which the pattern matches paths are the same as in .gitignore files, with a few exceptions:
- negative patterns are forbidden
- patterns that match a directory do not recursively match paths inside that directory (so using the trailing-slashpath/syntax is pointless in an attributes file; usepath/**instead)
Итоговый рабочий вариант (проверено при помощи
git archive с директориями и файлами разной вложенности):
* export-ignore
/src/ -export-ignore
+/src/** -export-ignore
/composer.json -export-ignore
/README.md -export-ignore
/CHANGELOG.md -export-ignore
/LICENSE -export-ignore
Закинул исправляющий PR в yii-soft/package-template.