Skip to content

Commit 8200969

Browse files
committed
docs: update integration guide and troubleshooting sections for clarity and organization
1 parent e6e9859 commit 8200969

File tree

4 files changed

+143
-128
lines changed

4 files changed

+143
-128
lines changed

docs/.data/content/contents.sqlite

0 Bytes
Binary file not shown.

docs/content/1.integration_guide/integration_guide.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ Follow these steps to integrate the PHP Development Booster into your existing P
3737

3838
::tip
3939
The integration script includes an **Interactive Mode** (`-I`) that guides you through the setup process with a wizard. This is useful for customizing the integration (selecting specific tools, configuring ticket IDs, etc.).
40-
::
41-
42-
### Usage
4340

4441
```bash [Terminal]
4542
curl -sSL https://raw.githubusercontent.com/TerrorSquad/php-booster/main/booster/integrate_booster.sh | bash -s -- -I
4643
```
44+
::
4745

4846
### Configuration Steps
4947

docs/content/3.tools/8.github_actions.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ We include GitHub Actions that automatically apply code style fixes (ECS) and re
5252
To skip auto-fix for specific commits, include `[skip auto-fix]` in your commit message.
5353
::
5454

55+
### Security & Safety
5556

5657
- Uses `GITHUB_TOKEN` with minimal required permissions
5758
- Only processes files changed in the current commit/PR
@@ -95,20 +96,25 @@ This creates a comprehensive code quality pipeline from development to productio
9596

9697
## Troubleshooting
9798

98-
### Action Not Running
99-
- Verify PHP files were actually changed
100-
- Check workflow triggers match your branch names
101-
- Ensure [rector.php](https://github.com/TerrorSquad/php-booster/blob/main/booster/rector.php) and [ecs.php](https://github.com/TerrorSquad/php-booster/blob/main/booster/ecs.php) exist
99+
::accordion
100+
::item{label="Action Not Running"}
101+
- Verify PHP files were actually changed
102+
- Check workflow triggers match your branch names
103+
- Ensure [rector.php](https://github.com/TerrorSquad/php-booster/blob/main/booster/rector.php) and [ecs.php](https://github.com/TerrorSquad/php-booster/blob/main/booster/ecs.php) exist
104+
::
102105

103-
### No Changes Applied
104-
- Confirm Rector and ECS are installed via Composer
105-
- Validate configuration files are correct
106-
- Check action logs for specific error messages
106+
::item{label="No Changes Applied"}
107+
- Confirm Rector and ECS are installed via Composer
108+
- Validate configuration files are correct
109+
- Check action logs for specific error messages
110+
::
107111

108-
### Permission Issues
109-
- Ensure repository has Actions enabled
110-
- Verify `GITHUB_TOKEN` has write permissions
111-
- For protected branches, consider using a personal access token
112+
::item{label="Permission Issues"}
113+
- Ensure repository has Actions enabled
114+
- Verify `GITHUB_TOKEN` has write permissions
115+
- For protected branches, consider using a personal access token
116+
::
117+
::
112118

113119
## Examples
114120

docs/content/4.troubleshooting/1.troubleshooting.md

Lines changed: 124 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -7,150 +7,161 @@ navigation:
77

88
## Integration Issues
99

10-
### Script Fails
11-
* **Missing Dependencies**: Ensure `curl` is installed and DDEV is running (`ddev status`).
12-
* **Verbose Mode**: Run the script with `-v` for details.
13-
14-
### Files Not Created
15-
* Run from project root.
16-
* Check write permissions.
17-
18-
### Permission Errors
19-
```bash [Terminal]
20-
chmod +x .husky/shared/runner.sh
21-
ddev restart
22-
```
23-
24-
## Git Hooks Issues
25-
26-
### `pre-commit` Hook Fails
27-
**"Could not open input file"**: Usually a DDEV path issue.
10+
::accordion
11+
::item{label="Script Fails"}
12+
* **Missing Dependencies**: Ensure `curl` is installed and DDEV is running (`ddev status`).
13+
* **Verbose Mode**: Run the script with `-v` for details.
14+
::
2815

29-
::steps
30-
### Check Paths
31-
Check `.husky/pre-commit` paths.
16+
::item{label="Files Not Created"}
17+
* Run from project root.
18+
* Check write permissions.
19+
::
3220

33-
### Restart DDEV
34-
Restart DDEV: `ddev restart`.
21+
::item{label="Permission Errors"}
22+
If you encounter permission errors with the hooks:
23+
```bash [Terminal]
24+
chmod +x .husky/shared/runner.sh
25+
ddev restart
26+
```
27+
::
3528
::
3629

30+
## Git Hooks Issues
3731

38-
### Branch Name Validation Fails
39-
* Check config: [validate-branch-name.config.cjs](https://github.com/TerrorSquad/php-booster/blob/main/booster/validate-branch-name.config.cjs).
40-
* Test manually: `node_modules/.bin/validate-branch-name -t "feature/PRJ-123-test"`.
41-
42-
### Commit Message Rejected
43-
* Use Conventional Commits: `type(scope): description`.
44-
* Example: `feat: add login`.
45-
46-
## Tool Integration Issues
32+
::accordion
33+
::item{label="pre-commit Hook Fails"}
34+
**"Could not open input file"**: Usually a DDEV path issue.
4735

48-
### Composer Scripts Fail
49-
* Verify installation: `composer show`.
50-
* Use DDEV prefix: `ddev composer ecs`.
51-
* Check `composer.json` scripts.
36+
1. **Check Paths**: Check `.husky/pre-commit` paths.
37+
2. **Restart DDEV**: `ddev restart`.
38+
::
5239

53-
### Path Issues (ECS/PHPStan)
40+
::item{label="Branch Name Validation Fails"}
41+
* Check config: [validate-branch-name.config.cjs](https://github.com/TerrorSquad/php-booster/blob/main/booster/validate-branch-name.config.cjs).
42+
* Test manually: `node_modules/.bin/validate-branch-name -t "feature/PRJ-123-test"`.
43+
::
5444

55-
::note
56-
**DDEV**: Ensure paths in [ecs.php](https://github.com/TerrorSquad/php-booster/blob/main/booster/ecs.php) or `phpstan.neon` are relative to project root, not absolute host paths.
45+
::item{label="Commit Message Rejected"}
46+
* Use Conventional Commits: `type(scope): description`.
47+
* Example: `feat: add login`.
48+
::
5749
::
5850

59-
::steps
60-
### Use the runner script
61-
62-
::code-group
63-
```bash [Recommended]
64-
# Use composer scripts
65-
ddev composer ecs
66-
```
51+
## Tool Integration Issues
6752

68-
```bash [Manual]
69-
# Instead of direct tool calls
70-
bash tools/runner.sh vendor/bin/ecs check src/
71-
```
53+
::accordion
54+
::item{label="Composer Scripts Fail"}
55+
* Verify installation: `composer show`.
56+
* Use DDEV prefix: `ddev composer ecs`.
57+
* Check `composer.json` scripts.
7258
::
7359

74-
### Check tool configurations have correct paths
75-
```bash [Terminal]
76-
# Check ECS config
77-
cat ecs.php
78-
79-
# Check PHPStan config
80-
cat [phpstan.neon.dist](https://github.com/TerrorSquad/php-booster/blob/main/booster/phpstan.neon.dist)
81-
```
60+
::item{label="Path Issues (ECS/PHPStan)"}
61+
:::note
62+
**DDEV**: Ensure paths in [ecs.php](https://github.com/TerrorSquad/php-booster/blob/main/booster/ecs.php) or `phpstan.neon` are relative to project root, not absolute host paths.
63+
:::
64+
65+
1. **Use the runner script**
66+
::code-group
67+
```bash [Recommended]
68+
# Use composer scripts
69+
ddev composer ecs
70+
```
71+
72+
```bash [Manual]
73+
# Instead of direct tool calls
74+
bash tools/runner.sh vendor/bin/ecs check src/
75+
```
76+
::
77+
78+
2. **Check tool configurations have correct paths**
79+
```bash [Terminal]
80+
# Check ECS config
81+
cat ecs.php
82+
83+
# Check PHPStan config
84+
cat [phpstan.neon.dist](https://github.com/TerrorSquad/php-booster/blob/main/booster/phpstan.neon.dist)
85+
```
86+
::
8287
::
8388

8489
## DDEV Issues
8590

86-
### Container Not Starting
87-
88-
**Problem**: DDEV containers fail to start or show errors.
91+
::accordion
92+
::item{label="Container Not Starting"}
93+
**Problem**: DDEV containers fail to start or show errors.
8994

90-
**Solution**:
95+
**Solution**:
9196

92-
::steps
93-
### Check DDEV status and logs
94-
```bash [Terminal]
95-
ddev status
96-
ddev logs
97-
```
98-
99-
### Restart DDEV
100-
```bash [Terminal]
101-
ddev restart
102-
```
103-
104-
### If containers are corrupted, recreate
105-
```bash [Terminal]
106-
ddev delete -y
107-
ddev start
108-
```
109-
::
110-
111-
### Performance Issues
112-
113-
**Problem**: DDEV is slow or unresponsive.
97+
1. **Check DDEV status and logs**
98+
```bash [Terminal]
99+
ddev status
100+
ddev logs
101+
```
114102

115-
**Solution**:
103+
2. **Restart DDEV**
104+
```bash [Terminal]
105+
ddev restart
106+
```
116107

117-
::steps
118-
### Configure Mutagen
119-
Configure Mutagen for better file sync performance (especially on macOS):
120-
```bash [Terminal]
121-
ddev config --mutagen-enabled
122-
ddev restart
123-
```
108+
3. **If containers are corrupted, recreate**
109+
```bash [Terminal]
110+
ddev delete -y
111+
ddev start
112+
```
113+
::
124114

125-
### Exclude Directories
126-
Exclude unnecessary directories from sync:
127-
```yaml
128-
# In .ddev/config.yaml
129-
upload_dirs:
130-
- storage/app/uploads
131-
```
115+
::item{label="Performance Issues"}
116+
**Problem**: DDEV is slow or unresponsive.
117+
118+
**Solution**:
119+
120+
1. **Configure Mutagen**
121+
Configure Mutagen for better file sync performance (especially on macOS):
122+
```bash [Terminal]
123+
ddev config --mutagen-enabled
124+
ddev restart
125+
```
126+
127+
2. **Exclude Directories**
128+
Exclude unnecessary directories from sync:
129+
```yaml
130+
# In .ddev/config.yaml
131+
upload_dirs:
132+
- storage/app/uploads
133+
```
134+
::
132135
::
133136

134137
## Testing Issues
135138

136-
### Integration Tests Fail
137-
* **Check Env**: `./tools/internal-test/test-integration.py env-check`
138-
* **Clean**: `./tools/internal-test/test-integration.py clean`
139-
* **Isolate**: Run `setup` or `integrate` steps individually.
139+
::accordion
140+
::item{label="Integration Tests Fail"}
141+
* **Check Env**: `./tools/internal-test/test-integration.py env-check`
142+
* **Clean**: `./tools/internal-test/test-integration.py clean`
143+
* **Isolate**: Run `setup` or `integrate` steps individually.
144+
::
140145

141-
### Cleanup
142-
* **Manual**: `ddev delete -y` inside test project folders.
143-
* **Docker**: `docker system prune -f`.
146+
::item{label="Cleanup"}
147+
* **Manual**: `ddev delete -y` inside test project folders.
148+
* **Docker**: `docker system prune -f`.
149+
::
150+
::
144151

145152
## IDE Issues
146153

147-
### VS Code
148-
* **Extensions**: Ensure recommended extensions are installed (`code --list-extensions`).
149-
* **Settings**: Check `.vscode/settings.json`.
154+
::accordion
155+
::item{label="VS Code"}
156+
* **Extensions**: Ensure recommended extensions are installed (`code --list-extensions`).
157+
* **Settings**: Check `.vscode/settings.json`.
158+
::
150159

151-
### PHPStorm
152-
* **Plugin**: Install DDEV Integration plugin.
153-
* **Interpreter**: Configure PHP interpreter to use DDEV.
160+
::item{label="PHPStorm"}
161+
* **Plugin**: Install DDEV Integration plugin.
162+
* **Interpreter**: Configure PHP interpreter to use DDEV.
163+
::
164+
::
154165

155166
## Getting Help
156167

0 commit comments

Comments
 (0)