Skip to content

Commit 195821c

Browse files
committed
feat: initial release
0 parents  commit 195821c

30 files changed

Lines changed: 2201 additions & 0 deletions

.env.dist

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
DB_HOST=
2+
DB_NAME=
3+
DB_USER=
4+
DB_PASSWORD=''
5+
DB_CHARSET=utf8mb4
6+
DB_COLLATE=
7+
DB_PREFIX=
8+
9+
WP_ENV=production
10+
11+
WP_DEBUG=false
12+
WP_DEBUG_LOG=false
13+
WP_DEBUG_DISPLAY=false
14+
SCRIPT_DEBUG=false
15+
16+
# NOTE: This will have a performance impact on your site, so make sure to turn this off when you aren’t debugging.
17+
SAVEQUERIES=false
18+
19+
# Generate your keys here: https://roots.io/salts.html
20+
AUTH_KEY=''
21+
SECURE_AUTH_KEY=''
22+
LOGGED_IN_KEY=''
23+
NONCE_KEY=''
24+
AUTH_SALT=''
25+
SECURE_AUTH_SALT=''
26+
LOGGED_IN_SALT=''
27+
NONCE_SALT=''
28+
29+
# disallows installation/updating of any theme or plugin
30+
DISALLOW_FILE_MODS=false
31+
DISALLOW_FILE_EDIT=true
32+
33+
DISABLE_WP_CRON=false
34+
35+
# false, true, minor
36+
WP_AUTO_UPDATE_CORE=true
37+
38+
# https://elementor.com/help/requirements/
39+
# WP Memory limit of 256 MB (Elementor and Elementor Pro only), 512 MB recommended, 768 MB for best performance.
40+
# default = 40M (single site), 64M (multisite)
41+
WP_MEMORY_LIMIT=512M
42+
43+
# default = 256M
44+
WP_MAX_MEMORY_LIMIT=512M
45+
46+
# https://wordpress.org/support/article/editing-wp-config-php/
47+
# 'direct', 'ssh2', 'ftpext', 'ftpsockets' or false
48+
FS_METHOD=false

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Exclude files from Composer package archives
2+
/.github export-ignore
3+
/.releaserc.json export-ignore
4+
/codecov.yml export-ignore
5+
/commitlint.config.mjs export-ignore

.github/CODE_OF_CONDUCT.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer using any of the [private contact addresses](https://github.com/frugan-dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
44+
45+
For answers to common questions about this code of conduct, see <https://www.contributor-covenant.org/faq>

.github/CONTRIBUTING.md

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
# Contributing
2+
3+
Thank you for considering contributing! This document outlines the process for contributing to this project.
4+
5+
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
6+
7+
Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.
8+
9+
## Development Workflow
10+
11+
We use [git-flow workflow](https://danielkummer.github.io/git-flow-cheatsheet/) and [conventional commits](https://www.conventionalcommits.org).
12+
13+
### Branch Structure
14+
- `main` - Production-ready code
15+
- `develop` - Development branch
16+
- `feature/*` - New features
17+
- `bugfix/*` - Bug fixes
18+
- `hotfix/*` - Critical production fixes
19+
20+
### Getting Started
21+
22+
1. Fork the repository
23+
2. Clone your fork: `git clone https://github.com/your-username/wp-boot.git`
24+
3. Create a feature branch: `git checkout -b feature/your-feature-name`
25+
4. Install dependencies: `composer install`
26+
5. Make your changes
27+
6. Run tests: `composer test`
28+
7. Run quality checks: `composer qa`
29+
8. Commit using conventional commits
30+
9. Push and create a pull request
31+
32+
## Development Setup
33+
34+
### Requirements
35+
- PHP 8.0 or higher
36+
- Composer
37+
- Git
38+
39+
### Installation
40+
```bash
41+
git clone https://github.com/wp-spaghetti/wp-boot.git
42+
cd wp-boot
43+
composer install
44+
```
45+
46+
### Running Tests
47+
```bash
48+
# Run all tests
49+
composer test
50+
51+
# Run specific test suite
52+
vendor/bin/phpunit tests/FooTest.php
53+
54+
# Run with coverage
55+
vendor/bin/phpunit --coverage-html coverage/
56+
```
57+
58+
### Code Quality
59+
```bash
60+
# Run all quality checks
61+
composer quality
62+
63+
# Individual tools
64+
composer lint # Linters
65+
composer analysis # Static analysis
66+
composer security # Security check
67+
composer quality # Code quality
68+
```
69+
70+
## Coding Standards
71+
72+
### PHP Standards
73+
- Follow PSR-12 coding standard
74+
- Use strict typing: `declare(strict_types=1);`
75+
- Document all public methods with PHPDoc
76+
- Use meaningful variable and method names
77+
78+
### Commit Messages
79+
We use [Conventional Commits](https://www.conventionalcommits.org/):
80+
81+
```
82+
type(scope): description
83+
84+
[optional body]
85+
86+
[optional footer]
87+
```
88+
89+
**Types:**
90+
- `feat:` New features
91+
- `fix:` Bug fixes
92+
- `docs:` Documentation changes
93+
- `style:` Code style changes (no logic changes)
94+
- `refactor:` Code refactoring
95+
- `test:` Adding or updating tests
96+
- `chore:` Maintenance tasks
97+
98+
**Examples:**
99+
```
100+
feat(environment): add support for custom environment detection
101+
fix(docker): improve container detection accuracy
102+
docs(readme): update installation instructions
103+
test(hooks): add comprehensive hook testing
104+
```
105+
106+
### Code Style
107+
```php
108+
<?php
109+
110+
declare(strict_types=1);
111+
112+
namespace WpSpaghetti\ExampleNamespace;
113+
114+
/**
115+
* Class documentation.
116+
*/
117+
class ExampleClass
118+
{
119+
/**
120+
* Method documentation.
121+
*/
122+
public function exampleMethod(string $param): bool
123+
{
124+
// Method implementation
125+
return true;
126+
}
127+
}
128+
```
129+
130+
## Testing Guidelines
131+
132+
### Test Structure
133+
- Unit tests in `tests/` directory
134+
- Test files should end with `Test.php`
135+
- Use descriptive test method names
136+
- Include both positive and negative test cases
137+
138+
### Test Example
139+
```php
140+
public function testMethodReturnsExpectedValue(): void
141+
{
142+
$result = ExampleClass::get('TEST_VAR', 'default');
143+
self::assertSame('expected', $result);
144+
}
145+
```
146+
147+
### Mock Data
148+
Use the provided mock functions for testing:
149+
- `set_mock_*()`
150+
151+
## Documentation
152+
153+
### Code Documentation
154+
- All public methods must have PHPDoc blocks
155+
- Include `@param` and `@return` annotations
156+
- Document complex logic with inline comments
157+
- Use clear, concise language
158+
159+
### README Updates
160+
When adding new features:
161+
- Update the feature list
162+
- Add usage examples
163+
- Update the API reference if needed
164+
165+
## Pull Request Process
166+
167+
1. **Create Feature Branch**
168+
```bash
169+
git checkout develop
170+
git checkout -b feature/your-feature
171+
```
172+
173+
2. **Make Changes**
174+
- Write code following the standards above
175+
- Add/update tests for your changes
176+
- Update documentation if needed
177+
178+
3. **Test Your Changes**
179+
```bash
180+
composer quality # Run all quality checks
181+
composer test # Run all tests
182+
```
183+
184+
4. **Commit Changes**
185+
```bash
186+
git add .
187+
git commit -m "feat: add new feature description"
188+
```
189+
190+
5. **Push and Create PR**
191+
```bash
192+
git push origin feature/your-feature
193+
```
194+
Then create a pull request against the `develop` branch.
195+
196+
### PR Requirements
197+
- All tests must pass
198+
- Code coverage should not decrease
199+
- Follow the PR template
200+
- Link to related issues
201+
- Use conventional commit messages
202+
203+
## Release Process
204+
205+
Releases are automated through GitHub Actions:
206+
207+
1. Merge to `main` triggers release workflow
208+
2. Conventional commits determine version bump
209+
3. Changelog is automatically updated
210+
4. GitHub release is created
211+
5. Packagist is notified
212+
213+
## Security
214+
215+
If you discover a security vulnerability, please follow our [Security Policy](SECURITY.md).
216+
217+
## Questions?
218+
219+
- Create an issue for questions about usage
220+
- Join discussions for feature planning
221+
- Contact maintainers for sensitive issues
222+
223+
## License
224+
225+
By contributing, you agree that your contributions will be licensed under the GPL-3.0-or-later license.
226+
227+
## Recognition
228+
229+
Contributors will be recognized in:
230+
- GitHub contributors list
231+
- Release notes for significant contributions
232+
- README acknowledgments for major features
233+
234+
Thank you for contributing! 🎉

.github/CONTRIBUTORS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributors
2+
3+
- [Frugan](https://github.com/frugan-dev) - Creator and main maintainer

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: [frugan-dev]
4+
buy_me_a_coffee: frugan
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## To Reproduce
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
## Expected Behavior
20+
A clear and concise description of what you expected to happen.
21+
22+
## Actual Behavior
23+
A clear and concise description of what actually happened.
24+
25+
## Environment
26+
- PHP Version: [e.g. 8.1]
27+
- WordPress Version: [e.g. 6.4]
28+
- WP Env Version: [e.g. 1.0.0]
29+
- Environment Type: [e.g. Docker, local, production]
30+
31+
## Configuration
32+
```php
33+
// Any relevant configuration or code snippets
34+
```
35+
36+
## Error Messages
37+
```
38+
Any error messages or logs
39+
```
40+
41+
## Screenshots
42+
If applicable, add screenshots to help explain your problem.
43+
44+
## Additional Context
45+
Add any other context about the problem here.

0 commit comments

Comments
 (0)