Skip to content

Commit

Permalink
[MOOSE-80]: Merge branch 'main' into feature/MOOSE-80/social-sharing-…
Browse files Browse the repository at this point in the history
…block

# Conflicts:
#	composer.json
#	composer.lock
  • Loading branch information
Vinsanity committed May 7, 2024
2 parents 6a380a4 + 4de8fe8 commit 862ecab
Show file tree
Hide file tree
Showing 31 changed files with 2,693 additions and 2,743 deletions.
7 changes: 0 additions & 7 deletions .env.sample

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ jobs:
- name: Install composer dependencies
working-directory: ${{ env.BUILD_FOLDER }}
run: |
echo "${{ secrets.COMPOSER_ENV }}" > .env
echo '${{ secrets.COMPOSER_AUTH_JSON }}' > auth.json
composer install --optimize-autoloader --ignore-platform-reqs --no-dev
rm .env auth.json
rm auth.json
# Set up node version
- name: Set up node
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ jobs:
- name: Install composer dependencies
working-directory: ${{ env.BUILD_FOLDER }}
run: |
echo "${{ secrets.COMPOSER_ENV }}" > .env
echo '${{ secrets.COMPOSER_AUTH_JSON }}' > auth.json
composer install --optimize-autoloader --ignore-platform-reqs --no-dev
rm .env auth.json
rm auth.json
# Set up node version
- name: Set up node
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ jobs:
- name: Install composer dependencies
working-directory: ${{ env.BUILD_FOLDER }}
run: |
echo "${{ secrets.COMPOSER_ENV }}" > .env
echo '${{ secrets.COMPOSER_AUTH_JSON }}' > auth.json
composer install --optimize-autoloader --ignore-platform-reqs --no-dev
rm .env auth.json
rm auth.json
# Set up node version
- name: Set up node
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: 'PHP Tests'
on:
workflow_call:
secrets:
COMPOSER_ENV:
required: true
description: COMPOSER_ENV Secret
COMPOSER_AUTH_JSON:
required: true
description: Composer auth.json
Expand Down Expand Up @@ -66,11 +63,6 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer
if: steps.changed-files.outputs.tests == 'true'
run: |
echo "${{ secrets.COMPOSER_ENV }}" >> ${GITHUB_WORKSPACE}/${{ env.build_folder }}/.env
- name: Set up slic env vars
if: steps.changed-files.outputs.tests == 'true'
run: |
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Coding Standards
on:
workflow_call:
secrets:
COMPOSER_ENV:
required: true
description: COMPOSER_ENV Secret
COMPOSER_AUTH_JSON:
required: true
description: Composer auth.json
Expand Down Expand Up @@ -54,10 +51,9 @@ jobs:
- name: Install Composer
if: steps.changed-files.outputs.phpcs == 'true'
run: |
echo "${{ secrets.COMPOSER_ENV }}" >> .env
echo '${{ secrets.COMPOSER_AUTH_JSON }}' > auth.json
composer install --ignore-platform-reqs --optimize-autoloader --no-progress
rm .env auth.json
rm auth.json
- name: Run PHPCS
if: steps.changed-files.outputs.phpcs == 'true'
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Static Analysis
on:
workflow_call:
secrets:
COMPOSER_ENV:
required: true
description: COMPOSER_ENV Secret
COMPOSER_AUTH_JSON:
required: true
description: Composer auth.json
Expand Down Expand Up @@ -58,10 +55,9 @@ jobs:
- name: Install Composer
if: steps.changed-files.outputs.phpstan == 'true'
run: |
echo "${{ secrets.COMPOSER_ENV }}" >> .env
echo '${{ secrets.COMPOSER_AUTH_JSON }}' > auth.json
composer install --ignore-platform-reqs --optimize-autoloader --no-progress
rm .env auth.json
rm auth.json
- name: Run PHPStan static analysis
if: steps.changed-files.outputs.phpstan == 'true'
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
name: 'Coding Standards'
uses: ./.github/workflows/phpcs.yml
secrets:
COMPOSER_ENV: ${{ secrets.COMPOSER_ENV }}
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}

linting:
Expand All @@ -28,13 +27,11 @@ jobs:
needs: [coding-standards, linting]
uses: ./.github/workflows/static-analysis.yml
secrets:
COMPOSER_ENV: ${{ secrets.COMPOSER_ENV }}
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}

slic:
name: 'PHP Tests'
needs: [coding-standards, phpstan, linting]
uses: ./.github/workflows/php-tests.yml
secrets:
COMPOSER_ENV: ${{ secrets.COMPOSER_ENV }}
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Each changelog entry gets prefixed with the category of the item (Added, Changed, Depreciated, Removed, Fixed, Security).

## [2024.04]
- Changed: Remove Gravity Forms as a composer dependency and the respective mtribe.site composer utility. Gravity Forms should be added directly to a project repo when required.
- Chore: Composer updates including plugins: advanced-custom-fields-pro:6.2.9, duracelltomi-google-tag-manager:1.20.2, limit-login-attempts-reloaded:2.26.8, safe-svg:2.2.4, seo-by-rank-math:1.0.216, user-switching:1.7.3
- Chore: Update NPM packages, including swapping browser-sync-webpack-plugin to browser-sync-v3-webpack-plugin for correct version support.

## [2024.03]
- Fixed: Fixed an issue with the Terms block where if a post ID wasn't provided it would error out. [Panopto Slack thread.](https://tribe.slack.com/archives/C061UC7B2F9/p1710250320818599)
- Added: Styling for editor title bar (http://p.tri.be/i/Dszjax). [[MOOSE-111]](https://moderntribe.atlassian.net/browse/MOOSE-111)
- Added: Allow `view.js` files for blocks. [[MOOSE-86]](https://moderntribe.atlassian.net/browse/MOOSE-86)
- Changed: `render_template` function for ACF blocks should now properly pass in all block variables. [[MOOSE-81]](https://moderntribe.atlassian.net/browse/MOOSE-81)
- Changed: Layout styles are now properly separated between FE & editor. [[MOOSE-84]](https://moderntribe.atlassian.net/browse/MOOSE-84)
- Changed: `theme.json` now contains static widths for content and wide widths. [[MOOSE-84]](https://moderntribe.atlassian.net/browse/MOOSE-84)
- Added: `theme.json` now contains a new static "grid" width. [[MOOSE-84]](https://moderntribe.atlassian.net/browse/MOOSE-84)

## [2024.02]
- Chore: WordPress 6.4.3 Update
- Chore: Plugin updates: advanced-custom-fields-pro:6.2.6, gravityforms:2.8.3, duracelltomi-google-tag-manager:1.20,, limit-login-attempts-reloaded:2.26.2,seo-by-rank-math:1.0.212

## [2023.12]

- Added: Xdebug support for WP Cli commands.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ It is recommended to create a blank blueprint in Local by Flywheel in order to m

### BE Setup

Run `composer run setup-project` to copy the `.env`, `auth.json`, and `local-config` files over. Once that has completed, update the `.env` file to include the required license for Gravity Forms and update the `auth.json` to include the [ACF License for the username](https://www.advancedcustomfields.com/resources/installing-acf-pro-with-composer/) and the site url (`https://moose.lndo.site`) in the password section. Once the keys are up to date, run `composer install` to pull in the required libraries. Then run `composer setup-wordpress` to install WordPress using WP Cli. Depending on your local environment you may need to update your `local-config.php` for the local environment you are working in.
Run `composer run setup-project` to copy the `auth.json`, and `local-config` files over. Once that has completed, update the `auth.json` to include the [ACF License for the username](https://www.advancedcustomfields.com/resources/installing-acf-pro-with-composer/) and the site url (`https://moose.lndo.site`) in the password section. Once the keys are up to date, run `composer install` to pull in the required libraries. Then run `composer setup-wordpress` to install WordPress using WP Cli. Depending on your local environment you may need to update your `local-config.php` for the local environment you are working in.

``` bash
composer setup-project
# ... update .env file if you need ACF Pro and Gravity Forms
# ... update auth.json file if you need ACF Pro
composer install
composer setup-wordpress
```
Expand Down
33 changes: 8 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
"phpcs": "./vendor/bin/phpcs",
"phpstan": "./vendor/bin/phpstan analyse --memory-limit=-1",
"setup-project": [
"@php -r \"file_exists('.env') || copy('.env.sample', '.env');\"",
"@php -r \"file_exists('auth.json') || copy('auth-sample.json', 'auth.json');\"",
"@php -r \"file_exists('local-config.php') || copy('local-config-sample.php', 'local-config.php');\"",
"@php -r \"file_exists('local-config.json') || copy('local-config-sample.json', 'local-config.json');\""
],
"setup-wordpress": "./vendor/bin/wp core download --version=6.4.2 --skip-content --force",
"setup-wordpress": "./vendor/bin/wp core download --version=6.5 --skip-content --force",
"update-db": "./vendor/bin/wp core update-db",
"post-root-package-install": [
"@setup-repo"
Expand All @@ -46,7 +45,7 @@
"phpcs": "Run PHPCS on the project.",
"phpcbf": "Run PHPCBF on the project.",
"phpstan": "Run PHPStan on the project.",
"setup-project": "Moves the .env, auth.json, local-config.php, and local-config.json files for setting up the project.",
"setup-project": "Moves the auth.json, local-config.php, and local-config.json files for setting up the project.",
"setup-wordpress": "Runs the wpcli command to download and install core WordPress. To change the WordPress version, update the --version value.",
"update-db": "Runs the wpcli command to update the WordPress database. This is sometimes required after a version update."
},
Expand All @@ -59,21 +58,6 @@
"type": "vcs",
"url": "https://github.com/moderntribe/tribe-glomar.git"
},
{
"type": "package",
"package": {
"name": "gravityforms/gravityforms",
"version": "2.8.0",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://composer.utility.mtribe.site/gravityforms/?key={%WP_PLUGIN_GF_KEY}&token={%WP_PLUGIN_GF_TOKEN}&t={%VERSION}"
},
"require": {
"ffraenz/private-composer-installer": "^5.0"
}
}
},
{
"type": "composer",
"url": "https://connect.advancedcustomfields.com"
Expand Down Expand Up @@ -115,7 +99,6 @@
"php": "^8.0|^8.1",
"block-editor-custom-alignments/block-editor-custom-alignments": "^1.0",
"composer/installers": "^2.2",
"gravityforms/gravityforms": "*",
"humanmade/s3-uploads": "^3.0",
"johnbillion/extended-cpts": "^5.0",
"moderntribe/square1-post-type": "^4.2",
Expand All @@ -128,14 +111,14 @@
"vlucas/phpdotenv": "^5.5",
"wp-cli/wp-cli-bundle": "^2.8",
"wpackagist-plugin/disable-emojis": "1.7.6",
"wpackagist-plugin/duracelltomi-google-tag-manager": "1.19.1",
"wpackagist-plugin/limit-login-attempts-reloaded": "2.25.29",
"wpackagist-plugin/safe-svg": "2.2.2",
"wpackagist-plugin/seo-by-rank-math": "1.0.210",
"wpackagist-plugin/duracelltomi-google-tag-manager": "1.20.2",
"wpackagist-plugin/limit-login-attempts-reloaded": "2.26.8",
"wpackagist-plugin/safe-svg": "2.2.4",
"wpackagist-plugin/seo-by-rank-math": "1.0.216",
"wpackagist-plugin/social-sharing-block": "^1.0",
"wpackagist-plugin/user-switching": "1.7.2",
"wpackagist-plugin/user-switching": "1.7.3",
"wpackagist-plugin/wp-tota11y": "^1.2",
"wpengine/advanced-custom-fields-pro": "6.2.4"
"wpengine/advanced-custom-fields-pro": "6.2.9"
},
"extra": {
"installer-paths": {
Expand Down
2 changes: 1 addition & 1 deletion docs/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The [Dokku](https://dokku.com/) deployments are for internal qa and development

### Production Deployment Workflows

We have 3 deployment workflows to interface with whatever hosting environment is needed (deploy-dev.yml, deploy-stage.yml, deploy-prod.yml). You will need to update the `[DEV|STAGE|PROD]_DEPLOY_REPO`, `DEPLOY_PRIVATE_SSH_KEY`, `COMPOSER_AUTH_JSON`, and `COMPOSER_ENV` secrets to use these deployments in your project. These are intended to be deploying to the hosting service where the site will live. Most hosting companies work with `git` making it the default push we currently use.
We have 3 deployment workflows to interface with whatever hosting environment is needed (deploy-dev.yml, deploy-stage.yml, deploy-prod.yml). You will need to update the `[DEV|STAGE|PROD]_DEPLOY_REPO`, `DEPLOY_PRIVATE_SSH_KEY`, and `COMPOSER_AUTH_JSON` secrets to use these deployments in your project. These are intended to be deploying to the hosting service where the site will live. Most hosting companies work with `git` making it the default push we currently use.

## Static Analysis and Testing

Expand Down
Loading

0 comments on commit 862ecab

Please sign in to comment.