From c0e1e83f744a9a5f61a62e341ecf205ed66be24f Mon Sep 17 00:00:00 2001 From: Mathieu Ducrot Date: Tue, 16 Jan 2024 10:06:00 +0100 Subject: [PATCH 1/2] Remove unused bundle that comes with sf new --webapp + docs directory --- CHANGELOG.md | 23 +++++++++++++++++++++++ README.md | 2 ++ make/docker.mk | 2 ++ make/install.mk | 4 +++- 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..46e2a35 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,23 @@ +CHANGELOG for 1.x +=================== + +## v1.0.4 - (2024-01-16) +### Removed +- Remove the `symfony/notifier` 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 diff --git a/README.md b/README.md index 72808b7..cabd8cb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/make/docker.mk b/make/docker.mk index 57f1c2a..d85d887 100644 --- a/make/docker.mk +++ b/make/docker.mk @@ -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 diff --git a/make/install.mk b/make/install.mk index 5e498c7..03451a1 100644 --- a/make/install.mk +++ b/make/install.mk @@ -35,7 +35,7 @@ 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 @@ -43,6 +43,8 @@ install-symfony: ## Install a new fresh version of symfony 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 From 3ae30d35f3aeefeb0068a2dc703bf3e10f9b5916 Mon Sep 17 00:00:00 2001 From: Mathieu Ducrot Date: Thu, 18 Jan 2024 17:30:22 +0100 Subject: [PATCH 2/2] Refactor `bundle.mk` to a more targetted use case of our bundles. --- CHANGELOG.md | 10 ++++++++-- make/bundle.mk | 38 ++++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46e2a35..84f5f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,15 @@ CHANGELOG for 1.x =================== -## v1.0.4 - (2024-01-16) +## 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 the `symfony/notifier` that comes with the symfony new --webapp +- 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 diff --git a/make/bundle.mk b/make/bundle.mk index 466f7ec..c064b88 100644 --- a/make/bundle.mk +++ b/make/bundle.mk @@ -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