Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Clean up Symfony-related stuff after creating the project #103

Closed

Conversation

javiereguiluz
Copy link
Member

This Pull Request "cleans" the installed project making the following changes:

  • Remove Symfony's README.md file and create a generic empty README.md
  • Remove all the Symfony's UPGRADE*.md files.
  • Remove the Symfony's LICENSE.md file.
  • Add the .gitignore file (and sort its entries)
  • Remove Symfony's branch-alias from composer.json file
  • Remove the description property from composer.json file
  • Put proprietary as the license in the composer.json file

@stof
Copy link
Member

stof commented Feb 10, 2015

couldn't this been done when generating the archives ?

@javiereguiluz
Copy link
Member Author

@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 README.md file with the name of the project being created.

$this->projectDir.'/UPGRADE-2.5.md',
$this->projectDir.'/UPGRADE-2.6.md',
$this->projectDir.'/UPGRADE-2.7.md',
$this->projectDir.'/UPGRADE-3.0.md',
Copy link
Member

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.

@javiereguiluz
Copy link
Member Author

I've refactored the code to use glob() to detect the UPGRADE and CHANGELOG files to remove.

@mykiwi
Copy link

mykiwi commented Feb 10, 2015

👍

@@ -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');
Copy link
Member

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?

@javiereguiluz
Copy link
Member Author

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');
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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).

@weaverryan
Copy link
Member

@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 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants