From ca6848b8538e352cf30d5a8d69b8e03df91d2b35 Mon Sep 17 00:00:00 2001 From: Vesna Date: Mon, 28 Oct 2024 14:40:20 +0100 Subject: [PATCH 1/6] NGSTACK-886 add symfony skeleton recipe --- .github/workflows/callable-flex-update.yml | 8 +- .github/workflows/flex-update-test.yml | 14 +++ netgen/symfony-skeleton/1.0/config/.nvmrc | 1 + .../1.0/config/.php-cs-fixer.php | 54 +++++++++++ netgen/symfony-skeleton/1.0/config/Makefile | 87 ++++++++++++++++++ .../1.0/config/captainhook.json | 92 +++++++++++++++++++ netgen/symfony-skeleton/1.0/manifest.json | 12 +++ 7 files changed, 264 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/flex-update-test.yml create mode 100644 netgen/symfony-skeleton/1.0/config/.nvmrc create mode 100644 netgen/symfony-skeleton/1.0/config/.php-cs-fixer.php create mode 100644 netgen/symfony-skeleton/1.0/config/Makefile create mode 100644 netgen/symfony-skeleton/1.0/config/captainhook.json create mode 100644 netgen/symfony-skeleton/1.0/manifest.json diff --git a/.github/workflows/callable-flex-update.yml b/.github/workflows/callable-flex-update.yml index 4676826..437dd8c 100644 --- a/.github/workflows/callable-flex-update.yml +++ b/.github/workflows/callable-flex-update.yml @@ -4,7 +4,7 @@ on: workflow_call: inputs: branch: - default: master + default: symfony-skeleton-test required: false type: string @@ -35,10 +35,10 @@ jobs: name: Update Flex endpoint run: | mkdir .github/flex-endpoint - git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} master flex .github/flex-endpoint - git switch flex + git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} symfony-skeleton-test flex-test .github/flex-endpoint + git switch flex-test git rm -q *.json mv .github/flex-endpoint/*.json . git add *.json git commit -m 'Update Flex endpoint' || true - git push origin -f flex + git push origin -f flex-test diff --git a/.github/workflows/flex-update-test.yml b/.github/workflows/flex-update-test.yml new file mode 100644 index 0000000..7dd70eb --- /dev/null +++ b/.github/workflows/flex-update-test.yml @@ -0,0 +1,14 @@ +name: Update Flex endpoint - test + +on: + push: + branches: + - symfony-skeleton-test + +defaults: + run: + shell: bash + +jobs: + call-flex-update: + uses: netgen/recipes/.github/workflows/callable-flex-update.yml@symfony-skeleton-test diff --git a/netgen/symfony-skeleton/1.0/config/.nvmrc b/netgen/symfony-skeleton/1.0/config/.nvmrc new file mode 100644 index 0000000..216dbec --- /dev/null +++ b/netgen/symfony-skeleton/1.0/config/.nvmrc @@ -0,0 +1 @@ +v21 \ No newline at end of file diff --git a/netgen/symfony-skeleton/1.0/config/.php-cs-fixer.php b/netgen/symfony-skeleton/1.0/config/.php-cs-fixer.php new file mode 100644 index 0000000..a1809c0 --- /dev/null +++ b/netgen/symfony-skeleton/1.0/config/.php-cs-fixer.php @@ -0,0 +1,54 @@ +setRiskyAllowed(true) + ->setRules([ + '@PER' => true, + '@PER:risky' => true, + '@PhpCsFixer' => true, + '@PhpCsFixer:risky' => true, + + // Overrides for rules included in PhpCsFixer rule sets + 'concat_space' => ['spacing' => 'one'], + 'fully_qualified_strict_types' => ['phpdoc_tags' => []], + 'method_chaining_indentation' => false, + 'multiline_whitespace_before_semicolons' => false, + 'native_function_invocation' => ['include' => ['@all']], + 'no_superfluous_phpdoc_tags' => false, + 'no_unset_on_property' => false, + 'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'], + 'ordered_types' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'alpha'], + 'php_unit_internal_class' => false, + 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], + 'php_unit_test_class_requires_covers' => false, + 'phpdoc_align' => false, + 'phpdoc_order' => ['order' => ['param', 'throws', 'return']], + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], + 'single_line_comment_style' => false, + 'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'match', 'parameters']], + 'yoda_style' => false, + + // Additional rules + 'date_time_immutable' => true, + 'declare_strict_types' => true, + 'global_namespace_import' => [ + 'import_classes' => null, + 'import_constants' => true, + 'import_functions' => true, + ], + 'heredoc_indentation' => ['indentation' => 'same_as_start'], + 'mb_str_functions' => true, + 'native_constant_invocation' => true, + 'nullable_type_declaration_for_default_null_value' => true, + 'static_lambda' => true, + 'ternary_to_null_coalescing' => true, + 'use_arrow_functions' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(['src', 'tests']) + ->notPath(['Kernel.php', 'bootstrap.php']), + ) + ; diff --git a/netgen/symfony-skeleton/1.0/config/Makefile b/netgen/symfony-skeleton/1.0/config/Makefile new file mode 100644 index 0000000..02dcf41 --- /dev/null +++ b/netgen/symfony-skeleton/1.0/config/Makefile @@ -0,0 +1,87 @@ +APP_ENV = dev +PHP_VERSION = php8.2 +PHP_RUN = /usr/bin/env $(PHP_VERSION) +COMPOSER_PATH = /usr/local/bin/composer2 +ifeq ("$(wildcard $(COMPOSER_PATH))","") + COMPOSER_PATH = /usr/local/bin/composer +endif +COMPOSER_RUN = $(PHP_RUN) $(COMPOSER_PATH) +CACHE_POOL = cache.redis +STASH_HASH := $(shell git stash create) + +.PHONY: help +help: ## List of all available commands + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +.DEFAULT_GOAL := help + +.PHONY: php-version +php-version: ## See PHP version needed for this project + @echo $(PHP_VERSION) + +COMPOSER_INSTALL_PARAMETERS = +ifeq ($(APP_ENV), prod) + COMPOSER_INSTALL_PARAMETERS = --no-dev -o +endif + +.PHONY: vendor +vendor: ## Run composer install + $(COMPOSER_RUN) install $(COMPOSER_INSTALL_PARAMETERS) + +.PHONY: assets +.ONESHELL: +assets: ## Build frontend assets for DEV environment + . ${NVM_DIR}/nvm.sh && nvm use || nvm install $(cat .nvmrc) + yarn install + yarn build:dev + +.PHONY: assets-prod +.ONESHELL: +assets-prod: ## Build frontend assets for PROD environment + . ${NVM_DIR}/nvm.sh && nvm use || nvm install $(cat .nvmrc) + yarn install + yarn build:prod + +.PHONY: assets-watch +.ONESHELL: +assets-watch: ## Watch frontend assets (during development) + . ${NVM_DIR}/nvm.sh && nvm use || nvm install $(cat .nvmrc) + yarn install + yarn watch + +.PHONY: clear-cache +clear-cache: ## Clear caches for specified environment (default: APP_ENV=dev) + $(PHP_RUN) bin/console cache:clear --env=$(APP_ENV) + +.PHONY: clear-all-cache +clear-all-cache: ## Clear all caches for specified environment (including eg. Redis) (default: APP_ENV=dev) + @$(MAKE) -s clear-cache + $(PHP_RUN) bin/console cache:pool:clear $(CACHE_POOL) --env=$(APP_ENV) + +.PHONY: migrations +migrations: ## Run Doctrine migrations for specified environment (default: APP_ENV=dev) + $(PHP_RUN) bin/console doctrine:migration:migrate --allow-no-migration --env=$(APP_ENV) + +.PHONY: build +build: ## Build the project (install vendor, migrations, build assets, clear cache) for specified environment (default: APP_ENV=dev) + @$(MAKE) -s vendor + @$(MAKE) -s migrations +ifeq ($(APP_ENV), prod) + $(MAKE) -s assets-prod +else + $(MAKE) -s assets +endif + @$(MAKE) -s clear-cache + +.PHONY: update-code +update-code: ## Pull the latest code from the repository (on the current branch) +ifeq ($(STASH_HASH),) + git pull --rebase +else + git stash && git pull --rebase && git stash pop +endif + +.PHONY: refresh +refresh: ## Fetch latest changes and build the project for specified environment (default: APP_ENV=dev) + @$(MAKE) -s update-code + @$(MAKE) -s build \ No newline at end of file diff --git a/netgen/symfony-skeleton/1.0/config/captainhook.json b/netgen/symfony-skeleton/1.0/config/captainhook.json new file mode 100644 index 0000000..30f5cfe --- /dev/null +++ b/netgen/symfony-skeleton/1.0/config/captainhook.json @@ -0,0 +1,92 @@ +{ + "commit-msg": { + "enabled": true, + "actions": [ + { + "action": "\\Netgen\\GitHooks\\Action\\Regex", + "options": { + "regex": "/^[A-Z0-9]+-\\d+:?\\s/", + "error": "Your commit message MUST start with a ticket ID" + } + } + ] + }, + "pre-push": { + "enabled": false, + "actions": [] + }, + "pre-commit": { + "enabled": true, + "actions": [ + { + "action": "\\Netgen\\GitHooks\\Action\\CheckForBlockedWords", + "options": { + "extensions": ["php"], + "keyword_blocklist": ["var_dump", "dump", "dd"], + "excluded_files": [] + } + }, + { + "action": "\\Netgen\\GitHooks\\Action\\CheckForBlockedWords", + "options": { + "extensions": ["twig"], + "keyword_blocklist": ["dump"], + "excluded_files": [] + } + }, + { + "action": "\\CaptainHook\\App\\Hook\\Composer\\Action\\CheckLockFile" + }, + { + "action": "\\Netgen\\GitHooks\\Action\\PHPCSFixer", + "options": { + "excluded_files": ["deploy.php", "/^deploy.*/", "config/bundles.php"], + "fixer_path": "vendor/bin/php-cs-fixer" + } + }, + { + "action": "\\Netgen\\GitHooks\\Action\\PHPStan", + "options": { + "excluded_files": ["/^deploy.*/"] + } + }, + { + "action": "\\Netgen\\GitHooks\\Action\\JSLinter", + "options": { + "excluded_files": [] + } + }, + { + "action": "\\Netgen\\GitHooks\\Action\\JSPrettier", + "options": { + "excluded_files": [] + } + }, + { + "action": "\\Netgen\\GitHooks\\Action\\CheckLockFileCommitted", + "options": { + "enabled": true + } + } + ] + }, + "prepare-commit-msg": { + "enabled": false, + "actions": [] + }, + "post-commit": { + "enabled": false, + "actions": [] + }, + "post-merge": { + "enabled": false, + "actions": [] + }, + "post-checkout": { + "enabled": false, + "actions": [] + }, + "config": { + "php-path": "/usr/bin/env php8.2" + } +} diff --git a/netgen/symfony-skeleton/1.0/manifest.json b/netgen/symfony-skeleton/1.0/manifest.json new file mode 100644 index 0000000..25b5263 --- /dev/null +++ b/netgen/symfony-skeleton/1.0/manifest.json @@ -0,0 +1,12 @@ +{ + "copy-from-recipe": { + "config/captainhook.json": "captainhook.json", + "config/Makefile": "Makefile", + "config/.nvmrc": ".nvmrc", + "config/.php-cs-fixer.php": ".php-cs-fixer.php", + "public/": "%PUBLIC_DIR%/" + }, + "env": { + "CACHE_DSN": "redis://localhost" + } +} \ No newline at end of file From 947c6d216ce98fcce07b74f81e6ae252316d49b7 Mon Sep 17 00:00:00 2001 From: Vesna Date: Mon, 28 Oct 2024 15:25:56 +0100 Subject: [PATCH 2/6] NGSTACK-886 update checkout action version --- .../workflows/callable-flex-update-test.yml | 44 +++++++++++++++++++ .github/workflows/callable-flex-update.yml | 10 ++--- .github/workflows/flex-update-test.yml | 2 +- 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/callable-flex-update-test.yml diff --git a/.github/workflows/callable-flex-update-test.yml b/.github/workflows/callable-flex-update-test.yml new file mode 100644 index 0000000..ad20f8f --- /dev/null +++ b/.github/workflows/callable-flex-update-test.yml @@ -0,0 +1,44 @@ +name: Update Flex endpoint + +on: + workflow_call: + inputs: + branch: + default: symfony-skeleton-test + required: false + type: string + +jobs: + flex-update: + name: Update Flex endpoint + runs-on: Ubuntu-20.04 + + steps: + - + name: Checkout + uses: actions/checkout@v4 + id: checkout + with: + fetch-depth: 0 + + - + name: Install tools + run: | + git config --global user.email "info@netgen.io" + git config --global user.name "Netgen Bot" + cd .github + wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main + unzip recipes-checker.zip + cd recipes-checker-main + composer install --ansi --no-dev + - + name: Update Flex endpoint + run: | + mkdir .github/flex-endpoint + git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} symfony-skeleton-test flex-test .github/flex-endpoint + git switch flex-test + git rm -q *.json + mv .github/flex-endpoint/*.json . + git add *.json + git commit -m 'Update Flex endpoint' || true + git push origin -f flex-test diff --git a/.github/workflows/callable-flex-update.yml b/.github/workflows/callable-flex-update.yml index 437dd8c..04465da 100644 --- a/.github/workflows/callable-flex-update.yml +++ b/.github/workflows/callable-flex-update.yml @@ -4,7 +4,7 @@ on: workflow_call: inputs: branch: - default: symfony-skeleton-test + default: master required: false type: string @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 id: checkout with: fetch-depth: 0 @@ -35,10 +35,10 @@ jobs: name: Update Flex endpoint run: | mkdir .github/flex-endpoint - git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} symfony-skeleton-test flex-test .github/flex-endpoint - git switch flex-test + git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} master flex .github/flex-endpoint + git switch flex git rm -q *.json mv .github/flex-endpoint/*.json . git add *.json git commit -m 'Update Flex endpoint' || true - git push origin -f flex-test + git push origin -f flex diff --git a/.github/workflows/flex-update-test.yml b/.github/workflows/flex-update-test.yml index 7dd70eb..58c580c 100644 --- a/.github/workflows/flex-update-test.yml +++ b/.github/workflows/flex-update-test.yml @@ -11,4 +11,4 @@ defaults: jobs: call-flex-update: - uses: netgen/recipes/.github/workflows/callable-flex-update.yml@symfony-skeleton-test + uses: netgen/recipes/.github/workflows/callable-flex-update-test.yml@symfony-skeleton-test From 1b0cab3f89f0c1d0987ebd8587fca551211fd43e Mon Sep 17 00:00:00 2001 From: Vesna Date: Mon, 28 Oct 2024 15:32:45 +0100 Subject: [PATCH 3/6] NGSTACK-886 add newlines at the end of files --- netgen/symfony-skeleton/1.0/config/.nvmrc | 2 +- netgen/symfony-skeleton/1.0/config/Makefile | 2 +- netgen/symfony-skeleton/1.0/manifest.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/netgen/symfony-skeleton/1.0/config/.nvmrc b/netgen/symfony-skeleton/1.0/config/.nvmrc index 216dbec..1689437 100644 --- a/netgen/symfony-skeleton/1.0/config/.nvmrc +++ b/netgen/symfony-skeleton/1.0/config/.nvmrc @@ -1 +1 @@ -v21 \ No newline at end of file +v21 diff --git a/netgen/symfony-skeleton/1.0/config/Makefile b/netgen/symfony-skeleton/1.0/config/Makefile index 02dcf41..5a46ad3 100644 --- a/netgen/symfony-skeleton/1.0/config/Makefile +++ b/netgen/symfony-skeleton/1.0/config/Makefile @@ -84,4 +84,4 @@ endif .PHONY: refresh refresh: ## Fetch latest changes and build the project for specified environment (default: APP_ENV=dev) @$(MAKE) -s update-code - @$(MAKE) -s build \ No newline at end of file + @$(MAKE) -s build diff --git a/netgen/symfony-skeleton/1.0/manifest.json b/netgen/symfony-skeleton/1.0/manifest.json index 25b5263..b0ad1ba 100644 --- a/netgen/symfony-skeleton/1.0/manifest.json +++ b/netgen/symfony-skeleton/1.0/manifest.json @@ -9,4 +9,4 @@ "env": { "CACHE_DSN": "redis://localhost" } -} \ No newline at end of file +} From 5c85c2ee644ffb320e8910fa1f98289b07d2b8ed Mon Sep 17 00:00:00 2001 From: Vesna Date: Tue, 29 Oct 2024 14:54:30 +0100 Subject: [PATCH 4/6] NGSTACK-886 remove a line added by mistake --- netgen/symfony-skeleton/1.0/manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/netgen/symfony-skeleton/1.0/manifest.json b/netgen/symfony-skeleton/1.0/manifest.json index b0ad1ba..67ec62f 100644 --- a/netgen/symfony-skeleton/1.0/manifest.json +++ b/netgen/symfony-skeleton/1.0/manifest.json @@ -3,8 +3,7 @@ "config/captainhook.json": "captainhook.json", "config/Makefile": "Makefile", "config/.nvmrc": ".nvmrc", - "config/.php-cs-fixer.php": ".php-cs-fixer.php", - "public/": "%PUBLIC_DIR%/" + "config/.php-cs-fixer.php": ".php-cs-fixer.php" }, "env": { "CACHE_DSN": "redis://localhost" From 6e5c16be8e13594ffc82dbf6225989d0678a1c9f Mon Sep 17 00:00:00 2001 From: Vesna Date: Tue, 5 Nov 2024 15:48:14 +0100 Subject: [PATCH 5/6] NGSTACK-886 add .htaccess file to symfony-skeleton recipe --- .../symfony-skeleton/1.0/config/.htaccess_dev | 68 +++++++++++++++++++ netgen/symfony-skeleton/1.0/manifest.json | 3 +- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 netgen/symfony-skeleton/1.0/config/.htaccess_dev diff --git a/netgen/symfony-skeleton/1.0/config/.htaccess_dev b/netgen/symfony-skeleton/1.0/config/.htaccess_dev new file mode 100644 index 0000000..b0efeec --- /dev/null +++ b/netgen/symfony-skeleton/1.0/config/.htaccess_dev @@ -0,0 +1,68 @@ +# Use the front controller as index file. It serves as a fallback solution when +# every other rewrite/redirect fails (e.g. in an aliased environment without +# mod_rewrite). Additionally, this reduces the matching process for the +# start page (path "/") because otherwise Apache will apply the rewriting rules +# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). +DirectoryIndex index.php + +# By default, Apache does not evaluate symbolic links if you did not enable this +# feature in your server configuration. Uncomment the following line if you +# install assets as symlinks or if you experience problems related to symlinks +# when compiling LESS/Sass/CoffeScript assets. +# Options FollowSymlinks + +# Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve +# to the front controller "/app.php" but be rewritten to "/app.php/app". + + Options -MultiViews + + + + RewriteEngine On + + # Determine the RewriteBase automatically and set it as environment variable. + # If you are using Apache aliases to do mass virtual hosting or installed the + # project in a subdirectory, the base path will be prepended to allow proper + # resolution of the app.php file and to redirect to the correct URI. It will + # work in environments without path prefix as well, providing a safe, one-size + # fits all solution. But as you do not need it in this case, you can comment + # the following 2 lines to eliminate the overhead. + RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ + RewriteRule ^(.*) - [E=BASE:%1] + + # Sets the HTTP_AUTHORIZATION header removed by Apache + RewriteCond %{HTTP:Authorization} . + RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Redirect to URI without front controller to prevent duplicate content + # (with and without `/app.php`). Only do this redirect on the initial + # rewrite by Apache and not on subsequent cycles. Otherwise we would get an + # endless redirect loop (request -> rewrite to front controller -> + # redirect -> request -> ...). + # So in case you get a "too many redirects" error or you always get redirected + # to the start page because your Apache does not expose the REDIRECT_STATUS + # environment variable, you have 2 choices: + # - disable this feature by commenting the following 2 lines or + # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the + # following RewriteCond (best solution) + RewriteCond %{ENV:REDIRECT_STATUS} ^$ + RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L] + + # If the requested filename exists, simply serve it. + # We only want to let Apache serve files and not directories. + RewriteCond %{REQUEST_FILENAME} -f + RewriteRule ^ - [L] + + # Rewrite all other queries to the front controller. + RewriteRule ^ %{ENV:BASE}/index.php [L] + + + + + # When mod_rewrite is not available, we instruct a temporary redirect of + # the start page to the front controller explicitly so that the website + # and the generated links can still be used. + RedirectMatch 302 ^/$ /index.php/ + # RedirectTemp cannot be used instead + + \ No newline at end of file diff --git a/netgen/symfony-skeleton/1.0/manifest.json b/netgen/symfony-skeleton/1.0/manifest.json index 67ec62f..c9ee8c9 100644 --- a/netgen/symfony-skeleton/1.0/manifest.json +++ b/netgen/symfony-skeleton/1.0/manifest.json @@ -3,7 +3,8 @@ "config/captainhook.json": "captainhook.json", "config/Makefile": "Makefile", "config/.nvmrc": ".nvmrc", - "config/.php-cs-fixer.php": ".php-cs-fixer.php" + "config/.php-cs-fixer.php": ".php-cs-fixer.php", + "config/.htaccess_dev": "public/.htaccess_dev" }, "env": { "CACHE_DSN": "redis://localhost" From 11887339ecc6f704eee046f792861aec1b36d5b1 Mon Sep 17 00:00:00 2001 From: Vesna Date: Fri, 8 Nov 2024 15:22:18 +0100 Subject: [PATCH 6/6] NGSTACK-886 revert .github folder test changes and reindent manifest.json --- .../workflows/callable-flex-update-test.yml | 44 ------------------- .github/workflows/flex-update-test.yml | 14 ------ netgen/symfony-skeleton/1.0/manifest.json | 20 ++++----- 3 files changed, 10 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/callable-flex-update-test.yml delete mode 100644 .github/workflows/flex-update-test.yml diff --git a/.github/workflows/callable-flex-update-test.yml b/.github/workflows/callable-flex-update-test.yml deleted file mode 100644 index ad20f8f..0000000 --- a/.github/workflows/callable-flex-update-test.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Update Flex endpoint - -on: - workflow_call: - inputs: - branch: - default: symfony-skeleton-test - required: false - type: string - -jobs: - flex-update: - name: Update Flex endpoint - runs-on: Ubuntu-20.04 - - steps: - - - name: Checkout - uses: actions/checkout@v4 - id: checkout - with: - fetch-depth: 0 - - - - name: Install tools - run: | - git config --global user.email "info@netgen.io" - git config --global user.name "Netgen Bot" - cd .github - wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main - unzip recipes-checker.zip - cd recipes-checker-main - composer install --ansi --no-dev - - - name: Update Flex endpoint - run: | - mkdir .github/flex-endpoint - git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} symfony-skeleton-test flex-test .github/flex-endpoint - git switch flex-test - git rm -q *.json - mv .github/flex-endpoint/*.json . - git add *.json - git commit -m 'Update Flex endpoint' || true - git push origin -f flex-test diff --git a/.github/workflows/flex-update-test.yml b/.github/workflows/flex-update-test.yml deleted file mode 100644 index 58c580c..0000000 --- a/.github/workflows/flex-update-test.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Update Flex endpoint - test - -on: - push: - branches: - - symfony-skeleton-test - -defaults: - run: - shell: bash - -jobs: - call-flex-update: - uses: netgen/recipes/.github/workflows/callable-flex-update-test.yml@symfony-skeleton-test diff --git a/netgen/symfony-skeleton/1.0/manifest.json b/netgen/symfony-skeleton/1.0/manifest.json index c9ee8c9..e2548be 100644 --- a/netgen/symfony-skeleton/1.0/manifest.json +++ b/netgen/symfony-skeleton/1.0/manifest.json @@ -1,12 +1,12 @@ { - "copy-from-recipe": { - "config/captainhook.json": "captainhook.json", - "config/Makefile": "Makefile", - "config/.nvmrc": ".nvmrc", - "config/.php-cs-fixer.php": ".php-cs-fixer.php", - "config/.htaccess_dev": "public/.htaccess_dev" - }, - "env": { - "CACHE_DSN": "redis://localhost" - } + "copy-from-recipe": { + "config/captainhook.json": "captainhook.json", + "config/Makefile": "Makefile", + "config/.nvmrc": ".nvmrc", + "config/.php-cs-fixer.php": ".php-cs-fixer.php", + "config/.htaccess_dev": "public/.htaccess_dev" + }, + "env": { + "CACHE_DSN": "redis://localhost" + } }