Skip to content

Latest commit

 

History

History
114 lines (78 loc) · 3.14 KB

File metadata and controls

114 lines (78 loc) · 3.14 KB

Contributing Guide

Thank you for your interest in contributing to Cookie Consent Bundle! This document provides guidelines for contributing to the project.

Table of contents

Code of Conduct

This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to hectorfranco@nowo.tech.

How Can I Contribute?

Reporting Bugs

  1. Check existing issues at GitHub Issues
  2. Create a new issue with steps to reproduce, expected vs. actual behavior, and PHP/Symfony versions

Suggesting Enhancements

  1. Search for duplicate suggestions in the issue tracker
  2. Describe the use case, benefits, and possible implementation

Contributing Code

Development environment

git clone https://github.com/nowo-tech/CookieConsentBundle.git
cd cookie-consent-bundle
make up
make install

Code standards

  • PSR-12 via PHP-CS-Fixer
  • PHP 8.1+ with declare(strict_types=1);
  • PHPDoc in English for public classes and methods
make cs-check
make cs-fix
make phpstan
make rector-dry

Tests

make test
make test-coverage
make test-ts
make assets

Add or update tests under tests/Unit/ (and tests/Integration/ when applicable) for behavior changes.

Demos

make -C demo up-symfony8
make -C demo up-symfony8-tailwind
make -C demo release-check

After editing bundle PHP code in a mounted demo, run make update-bundle inside the demo directory (or rely on release-check, which syncs the bundle first).

Release pipeline

Before opening a PR that targets a release:

make release-check

See Release for maintainer steps.

Pull requests

  1. Fork and create a feature branch
  2. Update docs/CHANGELOG.md under [Unreleased] for user-facing changes
  3. Update docs/UPGRADING.md when consumers must change configuration or code
  4. Ensure make release-check passes locally (or document why not)

Documentation

  • Integrator docs: docs/INSTALLATION.md, docs/CONFIGURATION.md, docs/USAGE.md
  • Product spec and REQ-* traceability: docs/SPEC-DRIVEN-DEVELOPMENT.md

License

By contributing, you agree that your contributions will be licensed under the MIT License.

Git hooks (REQ-GIT-001)

Do not add Co-authored-by: Cursor or cursoragent@cursor.com trailers to commit messages.

make setup-hooks
make check-no-cursor-coauthor

make setup-hooks installs .githooks/commit-msg (or sets core.hooksPath to .githooks). Run it once per clone before your first commit. If CI fails because trailers are already on the remote, see GITHUB_CI.md (REQ-GIT-001) and run make strip-cursor-coauthor-from-history before git push --force-with-lease.