doctrine / migrations

Doctrine Database Migrations Library
https://www.doctrine-project.org/projects/migrations.html
MIT License
4.68k stars 385 forks source link

/docs and some pipeline tools are shipped in the prod package #1355

Closed dkarlovi closed 1 year ago

dkarlovi commented 1 year ago

Bug Report

Q A
BC Break no
Version 3.6.0

Summary

Non-production files are shipped in the final release, increasing the archive and installed size.

Current behavior

/docs and some dev-only files are shipped:

vendor/doctrine/migrations/build-phar.sh
vendor/doctrine/migrations/composer.json
vendor/doctrine/migrations/download-box.sh
vendor/doctrine/migrations/phpstan.neon.dist
vendor/doctrine/migrations/docs

How to reproduce

Install the package, check the files shipped.

Expected behavior

Only production-related files are shipped in the release.

stof commented 1 year ago

Most of those have already been added in the gitattributes file (but those changes are not released yet)

greg0ire commented 1 year ago

See https://github.com/doctrine/migrations/pull/1346 :slightly_smiling_face:

dkarlovi commented 1 year ago

Docs are not ignored by anything yet, "most of those" are not "all of those".

greg0ire commented 1 year ago

Shipping docs as part of the archive, I'm not sure it can be considered a bug. I recall a discussion with @Ocramius where he regarded it as a feature. The TL;DR of the discussion is that there was no way for composer to provide different archives for dev and prod.

stof commented 1 year ago

To me, there is no reason to ship docs in the archive. We don't really expect users to read the source files of the docs in their vendor folder. We provide rendered documentation on the website (for which the build process clones the repo and so does not rely on having docs in the archive). If someone really want to have the docs source files in their vendor folder, they can still configure composer to install from source.

dkarlovi commented 1 year ago

Not to mention other Doctrine repos omit it.

Ocramius commented 1 year ago

Indeed, docs shipped on vendor/ is not needed: a source installation provodes them anyway

greg0ire commented 1 year ago

Ok then, @dkarlovi , feel free to send a PR 👍