Skip to content

Commit e5bb349

Browse files
authored
Merge pull request #47 from capachow/develop
The View Engine & Core Hardening
2 parents 18d1a4d + 874cb42 commit e5bb349

14 files changed

Lines changed: 380 additions & 140 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/contributing.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Contributing to Arcane
2+
3+
First off, thank you for considering contributing to Arcane!
4+
5+
Arcane is a deliberately minimal single-file microframework. It is built on the philosophy that web development should be crafted, not configured. Because of the framework's strict architectural constraints, please review these guidelines before opening an issue or pull request.
6+
7+
## Core Principles
8+
9+
- **Zero Dependencies:** Arcane does not and will not use external packages.
10+
- **Keep it Small:** The core engine lives in a single file (`index.php`). Every new line of code is ruthlessly scrutinized for weight and necessity. "Less" is a deliberate discipline.
11+
- **Native PHP:** We rely on modern PHP features rather than polyfills or heavy abstractions.
12+
- **Formatting:** We use modern PHP spacing (e.g., `if ()`, `elseif ()`) but strictly maintain a **2-space indentation** and an **80-column soft limit** to keep the file vertically dense and readable.
13+
14+
## Pull Requests
15+
16+
Pull requests for bug fixes, performance optimizations, and documentation updates are always welcome.
17+
18+
**Note on New Features:** Feature additions are heavily gated. If a feature is highly specific or adds significant weight, it likely belongs in the [Arcane Helpers](https://github.com/capachow/arcane-helpers) repository, not the core engine.
19+
20+
### Development Process
21+
22+
1. Fork the repository and create a feature branch off `master`.
23+
2. Ensure your code matches the existing minimalist architectural styles.
24+
3. Submit your pull request with a concise explanation of the problem it solves.
25+
26+
Thank you for helping build something you are proud of. Keep it **Arcane**.
File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Bug Report
3+
about: Report something that's broken
4+
labels: Bug
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**How to reproduce**
11+
Steps to cause the bug or a link to a minimal reproduction.
12+
13+
**Environment**
14+
PHP version, OS, and Server (Apache/NGINX/CLI).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
labels: Enhancement
5+
---
6+
7+
**The Idea**
8+
What is the problem or new feature you are suggesting?
9+
10+
**How it should work**
11+
A clear description of how you imagine this feature working in Arcane.

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**What does this PR do?**
2+
A brief description of the changes, bug fixes, or new features.
3+
4+
**Why is this needed?**
5+
Link to any relevant issues or explain the reasoning behind the change.

.github/workflows/linter.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: PHP Linter
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
linter:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.4'
20+
21+
- name: Check PHP Syntax
22+
run: php -l index.php

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Auto Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'index.php'
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
- name: Checkout Code
17+
uses: actions/checkout@v4
18+
19+
- name: Extract Version
20+
id: get_version
21+
run: |
22+
VERSION=$(grep -oE 'Arcane [0-9]+\.[0-9]+\.[0-9]+' index.php | awk '{print $2}')
23+
if [ -z "$VERSION" ]; then
24+
echo "Error: Version could not be extracted from index.php."
25+
exit 1
26+
fi
27+
echo "version=$VERSION" >> $GITHUB_OUTPUT
28+
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
29+
30+
- name: Create Release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
gh release create ${{ steps.get_version.outputs.tag }} \
35+
--title "${{ steps.get_version.outputs.version }}" \
36+
--generate-notes \
37+
index.php

0 commit comments

Comments
 (0)