Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{json,yml,yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* text=auto eol=lf

/.github export-ignore
/docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/ruleset.xml export-ignore
/stubs export-ignore
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: composer
directory: /
schedule:
interval: weekly
groups:
composer:
patterns:
- "*"

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions:
patterns:
- "*"
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2

- name: Validate package
run: composer validate --strict

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --ignore-platform-req=ext-getbiblesword

- name: Unit tests
run: composer test

- name: Coding standard
if: matrix.php == '8.4'
run: composer style

- name: Static analysis
if: matrix.php == '8.4'
run: composer analyse
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/.phpunit.cache/
/.phpunit.result.cache
/build/
/composer.lock
/coverage.xml
/vendor/
/.idea/
/.vscode/
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changelog

All notable changes to this project are documented here.

The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
and the project uses [Semantic Versioning](https://semver.org/).

## [Unreleased]

### Added

- Initial Composer package structure.
- Joomla DI composition root and service provider.
- Native `getbible/sword` engine adapter.
- Independent streaming validator for `getbiblesword.ndjson/v1`.
- Lossless contract and Scripture domain objects.
- Atomic, lazy translation snapshot generation.
- Configurable monthly snapshot rotation and Joomla lifecycle events.
- Explicit provisioning capability discovery.
- Selected/all installation, refresh, and removal contracts.
- Ordered per-module provisioning outcomes.
- Bounded shared/exclusive module-root lifecycle locking.
- Provisioning lifecycle events and atomic process-cache invalidation.
- Durable initialization, refresh, and interval-gated refresh services.
- Per-module maintenance failure isolation and durable failure state.
- Joomla Console initialization, refresh, and status commands.
- Joomla Scheduled Tasks callable integration.
- Production cron, systemd, health-check, and scheduler documentation.

### Changed

- Project license aligned with the GPL-2.0-only native dependency.
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

## Development

Install the native extension first, then install Composer dependencies:

```bash
pie install getbible/sword
composer install
composer check
```

Unit tests use an injected engine and can run without loading the extension:

```bash
composer install --ignore-platform-req=ext-getbiblesword
composer check
```

## Engineering rules

- Preserve GPL-2.0-only SPDX headers on source files.
- Keep domain objects immutable and free of container lookups.
- Inject infrastructure through interfaces.
- Never load a complete native module stream into one PHP string.
- Validate the entire v1 stream before activating a snapshot.
- Treat decoded Base64 bytes as authoritative.
- Preserve unknown additive record fields.
- Never treat lexical annotation markup as trusted HTML.
- Do not introduce network activity in constructors.
- Do not modify an active SWORD module root while native extraction is reading
it.

Contract changes require matching tests and documentation. A breaking public API
change requires an appropriate semantic version increment.
Loading
Loading