Skip to content

Commit

Permalink
Merge pull request #35 from smartbooster/remove_unused_bundle_files
Browse files Browse the repository at this point in the history
Remove unused bundle that comes with sf new --webapp + docs directory
  • Loading branch information
mathieu-ducrot committed Jan 18, 2024
2 parents b4b5ceb + 3ae30d3 commit 7f770a5
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 15 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CHANGELOG for 1.x
===================

## v1.0.4 - (2024-01-18)
### Changed
- Refactor `bundle.mk` to a more targetted use case of our bundles.

### Fixed
- Create the directory config/serialization on install-symfony which is needed for our platform bundle

### Removed
- Remove unused bundle that comes with the symfony new --webapp
- Remove the `AppFixtures.php` auto generated by the doctrine/doctrine-fixtures-bundle recipes
- Mention to remove the `docs` directory on the [Setup the docker stack from an empty repository](#setup-the-docker-stack-from-an-empty-repository) README.md

## v1.0.3 - (2024-01-05)
### Added
- Add a makefile command to generate the symfony-docker.lock and mention it on the first two setup cases in the README.

### Fixed
- Remove the .github directory on the staged list files on docker-post-fetch

## v1.0.2 - (2024-01-04)
### Fixed
- Remove echo for git fetching data as it produce weird behavior while generating the symfony-docker.lock

## v1.0.1 - (2024-01-04)
### Fixed
- Fix the docker-fetch command that was too fast to properly generate the symfony-docker.lock and not fetching the tag properly
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ git remote add docker git@github.com:smartbooster/symfony-docker.git
git fetch docker
git checkout docker/main .
mv .env.skeleton .env
rm -r .github docs
rm CHANGELOG.md
# Generate the lock file and remove the remote
make docker-generate-lock
git remote remove docker
Expand Down
38 changes: 24 additions & 14 deletions make/bundle.mk
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
##
## Bundle
## ------
.PHONY: bundle-push-assets bpa
bundle-push-assets: ## Push project assets into smartbooster/platform-core-bundle stubs/assets
sh ./vendor/smartbooster/platform-core-bundle/scripts/push_assets.sh
bpa: bundle-push-assets ## Alias for bundle-push-assets
PLATFORM_CORE_SCRIPTS=vendor/smartbooster/platform-core-bundle/scripts

.PHONY: bp
bp: bpa

.PHONY: bundle-fetch-assets bfa
bundle-fetch-assets: ## Fetch smartbooster/platform-core-bundle stub/assets into project assets
sh vendor/smartbooster/platform-core-bundle/scripts/fetch_assets.sh
bfa: bundle-fetch-assets ## Alias for bundle-fetch-assets

.PHONY: bf
bf: bfa
.PHONY: platform-core-bundle-install pcbi
platform-core-bundle-install: ## Post platform-core-bundle require command to run to complete his install process
sh $(PLATFORM_CORE_SCRIPTS)/fetch_assets.sh
sh $(PLATFORM_CORE_SCRIPTS)/fetch_config.sh
sh $(PLATFORM_CORE_SCRIPTS)/fetch_fixtures.sh
sh $(PLATFORM_CORE_SCRIPTS)/fetch_src.sh
sh $(PLATFORM_CORE_SCRIPTS)/fetch_templates.sh
sh $(PLATFORM_CORE_SCRIPTS)/fetch_tests.sh
# Redéfinition du cache:clear en 2 temps
composer config --unset scripts.auto-scripts.'assets:install %PUBLIC_DIR%'
composer config --unset scripts.auto-scripts.cache:clear
composer config scripts.auto-scripts.'cache:clear --no-warmup' symfony-cmd
composer config scripts.auto-scripts.cache:warmup symfony-cmd
composer config scripts.auto-scripts.'assets:install %PUBLIC_DIR%' symfony-cmd
# Set the composer autoloader config to avoid conflict between phpunit and symfony/phpunit-bridge when launching tests
composer config optimize-autoloader true
composer config prepend-autoloader false
composer dump-autoload
yarn install
make assets-dev
make orm-install
echo Bundle install complete!
pcbi: platform-core-bundle-install ## Alias for platform-core-bundle-install
2 changes: 2 additions & 0 deletions make/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ docker-generate-lock: ## Generate the symfony-docker.lock to track which version
docker-post-fetch: ## Post smartbooster/symfony-docker fetch process to clean unwanted files to be sync
git restore --staged .env.skeleton
rm -f .env.skeleton
git restore --staged CHANGELOG.md
rm -f CHANGELOG.md
git restore --staged package.json
git restore package.json
git restore --staged README.md
Expand Down
4 changes: 3 additions & 1 deletion make/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ install-symfony: ## Install a new fresh version of symfony
sed '3,4c\ url: "%env(resolve:MYSQL_ADDON_URI)%"\n server_version: "%env(resolve:MYSQL_ADDON_VERSION)%"' -i config/packages/doctrine.yaml
sed '5,8d' -i config/packages/doctrine.yaml
rm config/packages/messenger.yaml
docker compose exec --user=dev php composer remove symfony/doctrine-messenger symfony/asset-mapper
docker compose exec --user=dev php composer remove symfony/doctrine-messenger symfony/notifier symfony/asset-mapper symfony/stimulus-bundle symfony/ux-turbo
docker compose exec --user=dev php composer remove --dev phpunit/phpunit
rm -r assets
# Add SmartBooster bundles
docker compose exec --user=dev php composer config --json extra.symfony.endpoint '["https://api.github.com/repos/smartbooster/standard-bundle/contents/recipes.json", "flex://defaults"]'
docker compose exec --user=dev php composer require --dev --no-interaction smartbooster/standard-bundle
docker compose exec --user=dev php composer require --no-interaction smartbooster/core-bundle
git restore package.json
rm src/DataFixtures/AppFixtures.php
mkdir -p config/serialization
# Run Tests and database status to check that everything works fine
docker compose exec --user=dev php make phpunit
docker compose exec --user=dev php make orm-status
Expand Down

0 comments on commit 7f770a5

Please sign in to comment.