Skip to content

About

Symfony bundle: working-hours register (art. 34.9 ET, tamper-evident) plus leave and holidays, configurable by tenant resolver, permission checker and brand provider

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Working Time Bundle

CI Packagist Version Packagist Downloads License PHP Symfony GitHub stars Coverage

⭐ Found this useful? Install it from Packagist and give it a star on GitHub: it helps us maintain and improve the project.

A working-hours register (art. 34.9 ET), public holidays and leave for Symfony, in one bundle with three parts that can be enabled separately, a private entity manager, a UiKit + FormKit UI and bridges to the other Nowo bundles.

Standard Symfony by default, DDD / hexagonal opt-in: zero configuration in a standard project; public ports are interfaces and value objects with no Symfony, Doctrine or HTTP types, the bundle-owned tables are mapped in XML and referenced by id, and the bundle never flushes your EntityManager.

🚧 Status: 0.1 (S1) — the working-hours register. Holidays (S2) and leave (S3) arrive slice by slice from docs/CONTRACT.md (docs/ROADMAP.md). Usage: docs/USAGE.md.

📋 Compatible with Symfony 7.4, 8.0 and 8.1 · PHP 8.2+ (Symfony 8.x requires PHP 8.4+)

FrankenPHP Friendly Worker Mode

This bundle is FrankenPHP worker mode friendly (kernel kept alive and not reset).

Features

Three parts, switched separately (register.enabled on, holidays.enabled on, leave.enabled off):

  • Register: workdays and segments, clock state machine, schedules, corrections with approval, append-only revisions with a SHA-256 hash chain and database triggers, verifier, inspection export (PDF / CSV / ZIP), retention purge.
  • Holidays (stand-alone): holiday calendars, work centres, providers (festivos.io, OpenHolidays, CSV / ICS import).
  • Leave: leave types, allowances, requests with a per-worker lock, approval chain, team calendar, iCal, payroll CSV.
  • Private entity manager nowo_working_time, declared by the Flex recipe, so the bundle never flushes the host's unit of work.
  • Closed PDF rendering: no remote resources, no JavaScript, no PHP.

Built slice by slice: S0 scaffold → S1 register (0.1) → S2 holidays + leave foundations → S3 leave workflow.

Installation

composer require nowo-tech/working-time-bundle

See docs/INSTALLATION.md.

Configuration

# config/packages/nowo_working_time.yaml
nowo_working_time:
    doctrine:
        entity_manager: nowo_working_time
    register: { enabled: true }
    holidays: { enabled: true }
    leave: { enabled: false }

Every key of the contract is already accepted (strict tree): docs/CONFIGURATION.md.

Requirements

  • PHP >= 8.2, < 8.6 (Symfony 8.x needs PHP 8.4+)
  • Symfony 7.4, 8.0 or 8.1
  • Doctrine DBAL 3.8+ / 4 and ORM 3.7+ with DoctrineBundle
  • nowo-tech/ui-kit-bundle ^2.55, nowo-tech/transaction-doctrine ^1.3, nowo-tech/form-kit-bundle ^2.22, nowo-tech/outbound-url-guard-bundle ^1.5

Demo

demo/symfony7 (Symfony 7.4, http://localhost:8240) and demo/symfony8 (Symfony 8.1, http://localhost:8241): FrankenPHP worker mode, MySQL, UiKit + FormKit, the register with in-memory users ana (worker), mia (manager) and admin (password demo); make -C demo up-symfony8, then make test-e2e for the Playwright run. See docs/DEMO-FRANKENPHP.md.

Documentation

Additional documentation

Tests and coverage

make test               # PHPUnit in Docker
make test-coverage-100  # fails below 100 % of src/
make test-with-db       # Database suite on MySQL 8.4, MariaDB 11.4 and PostgreSQL 16
make release-check      # every gate, demo included
  • PHP: 100 % of src/ (gate in CI). Database suite on SQLite, MySQL 8.4, MariaDB 11.4 and PostgreSQL 16 in CI.

License

MIT. See LICENSE.

Author

Created by Héctor Franco Aceituno at Nowo.tech.

About

Symfony bundle: working-hours register (art. 34.9 ET, tamper-evident) plus leave and holidays, configurable by tenant resolver, permission checker and brand provider

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages