-
Notifications
You must be signed in to change notification settings - Fork 114
Clean up Symfony-related stuff after creating the project #103
Conversation
couldn't this been done when generating the archives ? |
@stof at first that was the idea, but I think it's easier and more convenient to do it with the installer. For example, this allows us to easily create a |
$this->projectDir.'/UPGRADE-2.5.md', | ||
$this->projectDir.'/UPGRADE-2.6.md', | ||
$this->projectDir.'/UPGRADE-2.7.md', | ||
$this->projectDir.'/UPGRADE-3.0.md', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list should be build dynamically with a glob, to remove any UPGRADE-*.md
file. This would avoid having to update the installer for each minor version to add a new file.
I've refactored the code to use |
👍 |
@@ -356,6 +358,22 @@ private function cleanUp() | |||
{ | |||
$this->fs->remove(dirname($this->compressedFilePath)); | |||
|
|||
try { | |||
$commonFiles = array($this->projectDir.'/LICENSE', $this->projectDir.'/UPGRADE.md'); | |||
$upgradeFiles = glob($this->projectDir.'/UPGRADE-*.*.md'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you use UPGRADE*.md
?
I made some minor changes to address your comments. This PR is ready for the final review before merging it. Thanks. |
try { | ||
$licenseFile = array($this->projectDir.'/LICENSE'); | ||
$upgradeFiles = glob($this->projectDir.'/UPGRADE*.md'); | ||
$changelogFiles = glob($this->projectDir.'/CHANGELOG*.md'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javiereguiluz What do you think about *.md
then? You will probably not want to keep any markdown files from the SE at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to maintain for example the README.md
file (but changing its contents). Removing all the .md
files seems too farsighted for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If present, a readme would we overriden at all right now, wouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I'm not comfortable removing any *.md
file as suggested. I prefer to be careful and remove the files we know for certain that should be removed (CHANGELOG, UPGRADE, LICENSE).
@javiereguiluz Great idea! So now, the user is basically downloading the SE (with vendors already) and then we're operating on it inside the installer. It means that pretty much every part is OS'ed and can be improved. Thanks :) |
This Pull Request "cleans" the installed project making the following changes:
README.md
file and create a generic empty README.mdUPGRADE*.md
files.LICENSE.md
file..gitignore
file (and sort its entries)branch-alias
fromcomposer.json
filedescription
property fromcomposer.json
fileproprietary
as thelicense
in thecomposer.json
file