Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
67bc3ce
Fix IF condition regression
jakejackson1 Nov 12, 2024
b9ca0d1
Update changelog
jakejackson1 Nov 12, 2024
cefcc93
Update WP tested version
jakejackson1 Apr 14, 2025
48f4d94
Fix GitHub Actions error due to missing svg command
jakejackson1 Apr 28, 2025
ba2dec0
Update copyright notice
jakejackson1 May 19, 2025
067e17d
Remove PHP7.3 from automated tests
jakejackson1 Apr 28, 2025
dc772da
Update Background Processing Queue
jakejackson1 Apr 28, 2025
8a7914d
Update PDF Background Processing to be compatible with updated backgr…
jakejackson1 May 19, 2025
f90eb55
Update PHP unit test and only alias GF_Background_Process class if it…
jakejackson1 May 19, 2025
a3961c1
Version bump
jakejackson1 May 19, 2025
532773a
SVN fix in deployment
jakejackson1 May 19, 2025
902fec1
Update readme.txt version number
jakejackson1 May 20, 2025
171c7ed
Include changelog group name in the 6.12.5.1 release notes
jakejackson1 May 20, 2025
ffdc5de
Extra checks for valid data processing File Upload fields
jakejackson1 Jun 17, 2025
389ae6c
Add queue cleanup when Background Processing toggled
jakejackson1 Jun 18, 2025
14d7684
Reset the list array keys after filtering
jakejackson1 Jun 18, 2025
2fb85f7
Improve System Status Display
jakejackson1 Jun 18, 2025
f63ba62
Prevent Fatal Error when file system log location is readonly
jakejackson1 Jun 18, 2025
27fc66e
Fix memory issue with lots of classes on Rich Text Field
jakejackson1 Jun 18, 2025
2f74ac6
Fix notice about translations loading too early
jakejackson1 Jun 18, 2025
d0137c0
Standardize Products Empty Check
jakejackson1 Jun 18, 2025
80d704a
Version bump
jakejackson1 Jun 18, 2025
6f9aa6d
Update stable tag in readme.txt file
jakejackson1 Jun 20, 2025
ea92af7
Mpdf Improvements
jakejackson1 Jul 15, 2025
cfcbc39
Use wp_remote_get() when retrieving remote PDF assets
jakejackson1 Jul 15, 2025
bdf6287
Let Gravity PDF handle cleanup of Mpdf temp directory
jakejackson1 Jul 17, 2025
d0d8b22
Merge pull request #1617 from GravityPDF/mpdf-enhancements
jakejackson1 Jul 17, 2025
502e96c
Ignore deprecated notices during unit tests
jakejackson1 Jul 17, 2025
7541ab7
Security Hardening - limit filesystem folders that can be deleted
jakejackson1 Jul 17, 2025
a5caf49
Use new Mpdf cache class when validating custom fonts
jakejackson1 Jul 17, 2025
e470e28
Fix PHP notices due to missing array keys
jakejackson1 Jul 17, 2025
3fb1dfd
Merge pull request #1618 from GravityPDF/hot-patch-6.13.0-rmdir
jakejackson1 Jul 17, 2025
9290428
Extra checks for GP Populate Anything classes/methods
jakejackson1 Jun 18, 2025
9b11fcc
Version bump
jakejackson1 Jul 17, 2025
6085863
Only enable debug mode if both WP_DEBUG and WP_DEBUG_DISPLAY are set …
jakejackson1 Aug 4, 2025
b77eeeb
Version bump
jakejackson1 Aug 4, 2025
dcfbf00
Bug: Mpdf Cache override
jakejackson1 Aug 27, 2025
f9d2b76
Housekeeping: Temp folder permission upgrade routine
jakejackson1 Aug 28, 2025
531a432
Merge pull request #1626 from GravityPDF/hot-patch-6.13.2-permission-…
jakejackson1 Aug 28, 2025
1faa27c
Version bump
jakejackson1 Aug 28, 2025
51d8535
Fix edge-case error in upgrade routine
jakejackson1 Sep 2, 2025
8a8c77c
Merge pull request #1627 from GravityPDF/permission-upgrade-routine-e…
jakejackson1 Sep 2, 2025
2627ab0
Remove version number from PDF meta
jakejackson1 Sep 2, 2025
bac53a9
Merge pull request #1628 from GravityPDF/dont-expose-versions-in-pdf
jakejackson1 Sep 3, 2025
60c9206
Fix PHP Array to String Conversion Error
jakejackson1 Sep 3, 2025
a15795f
Merge pull request #1629 from GravityPDF/is-pdf-admin-page-array-guard
jakejackson1 Sep 3, 2025
dd4ca17
Version bump
jakejackson1 Sep 3, 2025
c0933c0
Resolve conflict with Event Expresso plugin
jakejackson1 Sep 23, 2025
264168b
Merge pull request #1631 from GravityPDF/event-expresso-conflict
jakejackson1 Sep 23, 2025
7576480
Version bump
jakejackson1 Sep 23, 2025
3fe1c1e
Ensure background queue uses correct entry when resending notifications
jakejackson1 Oct 16, 2025
e1342ce
Merge pull request #1633 from GravityPDF/resend-notification
jakejackson1 Oct 17, 2025
af4a82b
Remove WP.org from deployment
jakejackson1 Oct 17, 2025
6304fdb
Close open buffers before streaming PDF
jakejackson1 Oct 2, 2025
8a4ed85
Version bump
jakejackson1 Oct 17, 2025
d966209
Add support for PSR Log v1/v2/v3
jakejackson1 Oct 28, 2025
cff34ca
Merge pull request #1634 from GravityPDF/psr-logger
jakejackson1 Oct 28, 2025
263d679
Version bump
jakejackson1 Oct 28, 2025
4ab07a9
Use the field type (and not the input type) in the container CSS clas…
jakejackson1 Nov 18, 2025
3fe0571
Version bump
jakejackson1 Nov 18, 2025
6a0dee6
Use the field type (and not the input type) in the container CSS clas…
jakejackson1 Nov 18, 2025
21373f3
Version bump
jakejackson1 Nov 18, 2025
b06235e
Exclude LoggerAwareInterface from typehint removal
jakejackson1 Jan 7, 2026
e494513
Merge pull request #1636 from GravityPDF/hot-patch-6.14.1-psr-log
jakejackson1 Jan 7, 2026
12cf4a6
Fix deprecation notice for multisite unit tests
jakejackson1 Jan 7, 2026
8b768a6
Restore original LogInterface typehint
jakejackson1 Jan 7, 2026
6846b8c
Merge pull request #1637 from GravityPDF/hot-patch-6.14.1-psr-log-compat
jakejackson1 Jan 7, 2026
5be2b3f
Update composer dependencies
jakejackson1 Jan 7, 2026
74c19dd
Update link to Gravity Forms
jakejackson1 Feb 16, 2026
168a0ca
Fix PHP error due to breaking change to GFCommon::get_lead_field_disp…
jakejackson1 Mar 11, 2026
5b08578
Fix Chinese language file
jakejackson1 Oct 16, 2025
9137e34
Remove wp-org deployment
jakejackson1 Oct 16, 2025
188cb02
Speed up deployment be disabling coverage
jakejackson1 Oct 16, 2025
da5ee88
Fix changelog levels
jakejackson1 Aug 28, 2025
d00676c
Fix issue reinitializing merge tags
jakejackson1 Aug 26, 2025
f6060c2
Update packages
jakejackson1 Apr 8, 2026
d7a15c7
Tweak unit tests
jakejackson1 Mar 23, 2026
c06486f
Fix syncing issue with Font selector
jakejackson1 Aug 27, 2025
848449c
Improve Template List Management
jakejackson1 Apr 9, 2026
890c053
Replace superagent with native fetch API
jakejackson1 Apr 9, 2026
d8f1392
Add check for GFCache in Template manager
jakejackson1 Mar 20, 2025
f656635
Disable asset version if SCRIPT_DEBUG enabled
jakejackson1 Apr 9, 2026
0eaf656
Disable GF Dom Parser in PHPUnit tests
jakejackson1 Apr 9, 2026
489ffb6
Improve settings markup
jakejackson1 Apr 9, 2026
3be31ed
Update E2E test selectors
jakejackson1 Apr 9, 2026
6fc5ca7
Update copyright notice for 26
jakejackson1 Apr 9, 2026
9d224af
Version bump
jakejackson1 Apr 9, 2026
807cb91
Add minor delay so the new field gets added to the page
jakejackson1 Apr 10, 2026
71bf214
Run PHPunit up to PHP8.5
jakejackson1 Apr 10, 2026
06e0d92
Fix syntax error
jakejackson1 Apr 10, 2026
9c7f1e3
Improve URL Signing
jakejackson1 Apr 10, 2026
7ecd7ee
Let E2E run all the way through
jakejackson1 Apr 12, 2026
315b5bc
Merge pull request #1642 from GravityPDF/url-signing-exceptions
jakejackson1 Apr 13, 2026
394694d
Update documentation links to match new format
jakejackson1 Apr 13, 2026
368c623
Update support page links
jakejackson1 Apr 13, 2026
cc10d47
Add 6.14.2 changelog
jakejackson1 Apr 13, 2026
a7b782e
Remove new dev file during build
jakejackson1 Apr 13, 2026
138bb76
chore(deps): modernize build toolchain and dependencies
jakejackson1 May 17, 2026
901d6e8
ci: refresh GitHub Actions workflows
jakejackson1 May 17, 2026
28bce35
test(e2e): migrate end-to-end suite from TestCafe to Playwright
jakejackson1 May 17, 2026
b0acb12
test: overhaul PHPUnit and Jest test infrastructure
jakejackson1 May 17, 2026
151026c
feat(license): overhaul license system (EPIC)
jakejackson1 May 17, 2026
7c157b9
feat(log): add redaction processor to Monolog pipeline
jakejackson1 May 17, 2026
3347971
feat(uninstall): improve uninstaller and extension cleanup
jakejackson1 May 17, 2026
7831d6f
feat(system-status): refactor system status display and temp director…
jakejackson1 May 17, 2026
834f778
fix(mpdf): cache handling, font validation, and security hardening
jakejackson1 May 17, 2026
f556f71
refactor(admin): modernize React app and admin JS
jakejackson1 May 17, 2026
0b45979
chore(i18n): refresh translation pipeline and language files
jakejackson1 May 17, 2026
03be1d4
fix: settings, field, view, and SCSS tweaks for WP 7.0 / PHP 8.5
jakejackson1 May 17, 2026
af80dfe
chore: wire up new structure and bump version to 6.15.0
jakejackson1 May 17, 2026
337c68d
Tweak copy
jakejackson1 May 17, 2026
607337e
Merge branch 'hot-patch-6.15' into development
jakejackson1 May 17, 2026
d2baece
style: apply prettier formatting to surviving dev 7.0 JS files
jakejackson1 May 17, 2026
92fbe65
fix(bootstrap): restore Rest API wiring lost in the Phase 1 merge
jakejackson1 May 18, 2026
6dafd4a
fix(tests): restore dev test methods + fix obsolete data paths
jakejackson1 May 18, 2026
6ff9584
fix: align tests/lint with the merged cleanup_tmp_dir + close dev lin…
jakejackson1 May 18, 2026
0987a7b
ci: trigger phpunit + coding-standards workflows on label add
jakejackson1 May 18, 2026
bd8c246
fix(phpcs): clear coding-standards errors after merge
jakejackson1 May 18, 2026
7327cb4
fix(tests): align test_failed_queue_tasks expectation with actual ret…
jakejackson1 May 18, 2026
3583530
fix(phpcs+tests): clear remaining SpaceAfterFunction errors + Test_Sl…
jakejackson1 May 18, 2026
ff4988e
fix(phpcs): suppress remaining warnings flagged by CI
jakejackson1 May 18, 2026
b6c38ab
chore(phpcs+tests): suppress UnusedFunctionParameter ruleset-wide, dr…
jakejackson1 May 18, 2026
a88359f
chore(simplify): tighten verbose comments and JSDoc added in fix-up c…
jakejackson1 May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 0 additions & 25 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults and fully supports es6-module
200 changes: 200 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# CLAUDE.md

## Core Principles

### Skills-First Workflow

**EVERY user request follows this sequence:**

Request → Load Skills → Gather Context → Execute

Skills contain critical workflows and protocols not in base context.
Loading them first prevents missing key instructions.

### Planning

When creating plans, always save them to: ./claude/plans/YYYY-MM-DD-<topic>.md
Never use the default plan location. Use the ./claude/plans/ directory.

### Context Management Strategy

**Central AI should conserve context to extend pre-compaction capacity**:

- Delegate file explorations and low-lift tasks to sub-agents
- Reserve context for coordination, user communication, and strategic decisions
- For straightforward tasks with clear scope: skip heavy orchestration, execute directly

**Sub-agents should maximize context collection**:

- Sub-agent context windows are temporary
- After execution, unused capacity = wasted opportunity
- Instruct sub-agents to read all relevant files, load skills, and gather examples

### Routing Decision

**Direct Execution**:

- Simple/bounded task with clear scope
- Single-component changes
- Quick fixes and trivial modifications

**Sub-Agent Delegation**:

- Complex/multi-phase implementations
- Tasks requiring specialized domain expertise
- Work that benefits from isolated context

**Master Orchestrator**:

- Ambiguous requirements needing research
- Architectural decisions with wide impact
- Multi-day features requiring session management

### Operational Protocols

#### Agent Coordination

**Parallel** (REQUIRED when applicable):

- Multiple Task tool invocations in single message
- Independent tasks execute simultaneously
- Bash commands run in parallel

**Sequential** (ENFORCE for dependencies):

- Database → API → Frontend
- Research → Planning → Implementation
- Implementation → Testing → Security

#### Quality Self-Checks

Before finalizing code, verify:

- All inputs have validation
- Authentication/authorization checks exist
- All external calls have error handling
- Import paths verified against existing codebase examples

### Coding Best Practices

**Priority Order** (when trade-offs arise):
Correctness > Maintainability > Performance > Brevity

#### Task Complexity Assessment

Before starting, classify:

- **Trivial** (single file, obvious fix) → execute directly
- **Moderate** (2-5 files, clear scope) → brief planning then execute
- **Complex** (architectural impact, ambiguous requirements) → full research first

Match effort to complexity. Don't over-engineer trivial tasks or under-plan complex ones.

## Project Overview

Gravity PDF is a WordPress plugin that generates PDF documents from Gravity Forms submissions. It has a PHP MVC backend and a React/Redux frontend for the admin UI.

## Commands

### JavaScript

```bash
yarn dev # Start webpack dev server with hot reload
yarn dev:build # One-shot webpack build without watching
yarn build # Production webpack build
yarn test:js # Run Jest unit tests
yarn test:js:watch # Run Jest in watch mode
yarn test:js -- tests/js-unit/react/sagas/fontManager.test.js # Run single test file
yarn test:js -- --testNamePattern="test name" # Run single test by name
yarn lint:js # ESLint check
yarn lint:js --fix # Auto-fix ESLint errors (e.g. JSDoc alignment)
yarn lint:css # Sass/CSS lint check
yarn format # Auto-fix JS/CSS/PHP formatting
```

### PHP

```bash
yarn test:php # Run PHPUnit in Docker (`yarn wp-env:integration start` required)
yarn test:php -- --filter TestClassName # Run single test class
yarn test:php -- --filter testMethod # Run single test method
yarn test:php:multisite # Run multisite PHPUnit tests
composer lint # PHPCS check
composer lint:fix # PHPCS auto-fix
```

PHP tests run inside a Docker container via `wp-env` — you cannot run PHPUnit directly. Start the environment first with `yarn wp-env:integration start`.

### E2E Tests (Playwright)

```bash
yarn wp-env:e2e start # Start dedicated E2E environment (port 8702)
yarn test:e2e # Run all Playwright tests (headless)
yarn test:e2e:debug # Open Playwright UI for interactive debugging
```

E2E tests live in `tests/playwright/` and run against a single wp-env instance on port 8702. Permalink mode is flipped per Playwright project group via `tools/playwright/global-setup.ts` (which shells out to `wp-env run cli wp option update permalink_structure`):
- `core` project — runs `core/*` and `permalinks/*` tests under plain permalinks.
- `core-with-permalinks` project — re-runs `permalinks/*` tests under `/%postname%/` permalinks. Depends on `core` so it runs serially after the plain-permalink pass completes.

In CI, Playwright is sharded 4-ways via `--shard=N/4` (see `.github/workflows/playwright-e2e.yml`); each shard runs all setup projects against its own wp-env instance and executes its slice of the consumer projects' tests.

Artifacts (screenshots, traces) are written to `tmp/artifacts/`.

### Environment

```bash
yarn wp-env start # Start dev environment (port 8700)
yarn wp-env:integration start # Start PHP test environment (port 8701)
yarn wp-env:e2e start # Start E2E test environment (port 8702)
yarn wp-env stop # Stop the default dev environment
yarn start # Start dev environment + hot reload dev server
```

## Architecture

### PHP Backend

The plugin follows an MVC pattern bootstrapped by the `Router` class in `src/bootstrap.php`, which acts as the dependency injection container. Entry point is `pdf.php` → `src/bootstrap.php`.

- **`src/Controller/`** — Request handlers (18+ controllers: forms, PDF generation, settings, fonts, templates, activation, etc.)
- **`src/Model/`** — Business logic (PDF rendering via mPDF, settings management, merge tags, templates)
- **`src/View/`** — Admin UI rendering; HTML templates live in `src/templates/`
- **`src/Helper/`** — 47+ helpers including abstract base classes for options, fields, forms, logging, and fonts
- **`vendor_prefixed/`** — Composer dependencies namespaced via `php-scoper` to avoid conflicts with other plugins

Namespacing: all plugin code is under the `GFPDF\` namespace with PSR-4 autoloading.

### JavaScript Frontend

Three webpack bundles built from distinct entry points:

| Bundle | Entry | Purpose |
|--------|-------|---------|
| `app.bundle.min.js` | `src/assets/js/react/gfpdf-main.js` | React app: font manager, template manager, core fonts UI |
| `gfpdf-entries.min.js` | `src/assets/js/legacy/gfpdf-entries.js` | Legacy jQuery entry page UI |
| `admin.min.js` | `src/assets/js/admin/bootstrap.js` | Admin settings page handlers |

The React app uses Redux for state with Redux-Saga for all async side effects. Each feature area has its own reducers, sagas, actions, and API module under `src/assets/js/react/`.

Legacy jQuery code coexists with the React app; they are separate bundles and do not share state.

### Data Flow

- **PDF generation**: Form submission → WordPress hooks → `Model_PDF` → mPDF → output file
- **Admin settings**: Options stored in WP options table → REST API → React/Redux store → UI
- **Sagas**: React components dispatch actions → sagas intercept → call `src/assets/js/react/api/` modules → WordPress REST endpoints → update Redux store

### Testing

- **PHP tests**: `tests/phpunit/` mirrors `src/` structure. Extends `WP_UnitTestCase`. Mock data in `tests/phpunit/unit-tests/Mocks/`.
- **JS tests**: `tests/js-unit/` mirrors React source structure. Uses Jest + Enzyme. Coverage threshold: 75%.
- **E2E tests (Playwright)**: `yarn test:e2e` — config at `tools/playwright/config.ts`. Use `yarn test:e2e:playwright` for the interactive UI mode.

### Key Constraints

- PRs must target the `development` branch (not `main`)
- Each PR should contain a single commit
- Minimum PHP 7.3 compatibility required
- jQuery is an external (provided by WordPress); never bundle it
- Run `composer prefix` after adding new Composer dependencies to namespace them via php-scoper
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add a valid Gravity Forms license key. To run PHPUnit locally you will need an Elite License.
GF_LICENSE=00000000000000000000000000000000
WP_BASE_URL=http://localhost
WP_ENV_TESTS_PORT=8889
# Enable AI Translations
# Usage:
# composer run translate
POTOMATIC_OPENAI_API_KEY=
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.cache
build
node_modules
vendor
27 changes: 0 additions & 27 deletions .eslintrc

This file was deleted.

47 changes: 47 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
root: true,
extends: [
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:jest/recommended',
],
globals: {
GFPDF: 'readonly',
Backbone: 'readonly',
jQuery: 'readonly',
gfpdf_migration_multisite_ids: 'readonly',
gf_vars: 'readonly',
tinyMCE: 'readonly',
gform: 'readonly',
ConditionalLogic: 'readonly',
GetFirstRuleField: 'readonly',
ToggleConditionalLogic: 'readonly',
GetRuleValuesDropDown: 'readonly',
QTags: 'readonly',
switchEditors: 'readonly',
getUserSetting: 'readonly',
wp: 'readonly',
gfMergeTagsObj: 'readonly',
form: 'readonly',
gform_initialize_tooltips: 'readonly',
_: 'readonly',
ClipboardJS: 'readonly',
},
rules: {
'no-alert': 'off',
'jest/no-done-callback': 'off',
'camelcase': 'off',
'jsdoc/empty-tags': ['off', { tags: ['package'] }],
'@typescript-eslint/no-unused-vars': 'off'
},
settings: {
jsdoc: {
mode: 'closure',
},
"import/resolver": {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
"typescript": {}
}
},
};
14 changes: 1 addition & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
/.coveralls.yml export-ignore
/.eslintrc export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.github export-ignore
/.docker export-ignore
/jest.config.js export-ignore
/node_modules export-ignore
/phpcs.xml.dist export-ignore
/phpcompat.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/.env.example export-ignore
/tests export-ignore
/tmp export-ignore

*.sh eol=lf
*.sh eol=lf
29 changes: 12 additions & 17 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Gravity PDF

[![codecov](https://codecov.io/gh/GravityPDF/gravity-pdf/branch/development/graph/badge.svg)](https://codecov.io/gh/GravityPDF/gravity-pdf)

Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using the popular form-builder plugin, [Gravity Forms](https://rocketgenius.pxf.io/c/1211356/445235/7938) (affiliate link). Find out more about Gravity PDF at [https://gravitypdf.com](https://gravitypdf.com/).
Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using the popular form-builder plugin, [Gravity Forms](https://gpdf.us/gf) (affiliate link). Find out more about Gravity PDF at [https://gravitypdf.com](https://gravitypdf.com/).

# About

Expand All @@ -25,11 +25,11 @@ The Docker setup will create a fully functional development environment preconfi

1. Clone the repository using `git clone https://github.com/GravityPDF/gravity-pdf/` from the terminal
2. Copy and rename `.env.example` to `.env`, then replace `00000000000000000000000000000000` with a valid Gravity Forms license key
3. Run `yarn && yarn build:production`
4. Start Docker and then run `yarn env:install` to setup the local development environment
3. Run `composer install`
3. Run `yarn && yarn start`
5. Access a local development site at `http://localhost:8888` with the login `admin` and `password`.

If you shut down Docker and want to fire up the environment later, use `yarn wp-env start`. You can reset the database back to its original state with `yarn wp-env clean all`. When all else fails, delete everything and start again with `yarn wp-env destroy`.
You can reset the database back to its original state with `yarn wp-env clean all`. When all else fails, delete everything and start again with `yarn wp-env destroy`.

[See the WordPress Developer Handbook for more details about managing the docker environment](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#wp-env-run-container-command).

Expand All @@ -39,26 +39,21 @@ X-Debug is enabled by default for step debugging and profiling. If you need to [

### Switch PHP Versions

The default version that will be configured is PHP8.0. If you want to change this you can adjust the `phpVersion` value in the `.wp-env.json` file and then stop and start the environment with `yarn wp-env start`.

## Setup without Docker

If you would rather use your own development environment, you can build Gravity PDF using the following commands.

1. Clone the repository using `git clone https://github.com/GravityPDF/gravity-pdf/`
1. Run `yarn && yarn build:production`
1. Run `composer install`
1. Run `composer run prefix`
The default version that will be configured is PHP8.3. If you want to change this you can adjust the `phpVersion` value in the `.wp-env.json` file and then stop and start the environment with `yarn wp-env start`.

## Building JavaScript

If you are making changes to any of the JavaScript or CSS, run `yarn build:dev` to ensure the files automatically gets built when you make changes on the file system.
If you are making changes to any of the JavaScript or CSS, run `yarn dev` to ensure the files automatically gets built when you make changes on the file system.

## Linting

To lint your JS code use `yarn lint:js`, and to try automatically fix it use `yarn lint:js:fix`.
To lint your:

1. JS code using `yarn lint:js`
2. CSS code using `yarn lint:css`
3. PHP code using `composer lint`

To lint your PHP code, use `composer lint`, and to try automatically fix it use `composer lint:fix`.
You can auto-fix many issues with `yarn format` and `composer lint:fix`.

## Automated Tests

Expand Down
Loading
Loading