VOOZH about

URL: https://deepwiki.com/MahoCommerce/maho-composer-plugin/1.3-license-and-contributing

⇱ License and Contributing | MahoCommerce/maho-composer-plugin | DeepWiki


Loading...
Menu

License and Contributing

This document describes the licensing terms for the Maho Composer Plugin and provides guidelines for contributing to the project. It covers the MIT License permissions and limitations, the contribution process, and quality standards that contributors must meet.

For information about development environment setup and local testing, see Development Environment Configuration. For details about the quality assurance infrastructure, see Development and Quality Assurance.

MIT License

The Maho Composer Plugin is released under the MIT License, one of the most permissive open-source licenses available. The complete license text is located in LICENSE.txt1-22

Copyright and Attribution

Copyright Holder: Maho

The copyright notice and license text must be included in all copies or substantial portions of the software distributed by users or contributors.

Sources: LICENSE.txt1-3

License Permissions

The MIT License grants the following rights without restriction:

PermissionDescription
UseRun the software for any purpose, commercial or non-commercial
CopyMake copies of the software
ModifyChange the source code to suit your needs
MergeIncorporate the software into other projects
PublishShare the software publicly
DistributeGive copies to others
SublicenseRelicense the software under different terms
SellInclude the software in commercial products

All permissions are granted free of charge to any person obtaining a copy of the software.

Sources: LICENSE.txt5-10

License Conditions

The only condition is that the copyright notice and permission notice must be included in all copies or substantial portions of the software:

Copyright (c) Maho

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software")...

Sources: LICENSE.txt11-13

Warranty Disclaimer

The software is provided "AS IS" without warranty of any kind. The license explicitly disclaims:

Warranty TypeStatus
Express WarrantiesNone provided
Implied WarrantiesNone provided
MerchantabilityNot warranted
Fitness for Particular PurposeNot warranted
Non-infringementNot warranted

Contributors and copyright holders are not liable for any claims, damages, or other liability arising from the use of the software.

Sources: LICENSE.txt15-21

Contributing Process

Contributions to the Maho Composer Plugin are welcome. The project uses standard GitHub workflows for accepting contributions.

Contribution Workflow


Diagram: Contribution Workflow with GitHub and CI Integration

The standard contribution process follows these steps:

  1. Fork the repository on GitHub
  2. Clone your fork to your local development environment
  3. Create a feature branch from main with a descriptive name
  4. Make your changes to the relevant files in the src/ directory
  5. Test locally using PHPStan and composer validation
  6. Commit your changes with clear commit messages
  7. Push to your fork on GitHub
  8. Open a Pull Request against the main branch

Sources: Inferred from standard GitHub workflow and CI pipeline structure

Code Quality Requirements

All contributions must pass automated quality checks before they can be merged. The project enforces strict quality standards through GitHub Actions workflows.

Required Quality Gates


Diagram: Quality Gates Enforced on All Contributions

The following quality standards are automatically enforced:

CheckToolConfigurationPurpose
Composer Validationcomposer validate --strict.github/workflows/composer.ymlEnsures composer.json is valid and follows best practices
Static AnalysisPHPStan Level 10.github/workflows/phpstan.yml .phpstan.dist.neonType safety, strict rules, deprecation detection
PHP Syntaxphp -l.github/workflows/syntax-php.ymlValid PHP syntax across versions 8.2, 8.3, 8.4
Line Endingsgit grep.github/workflows/line-endings.ymlUnix line endings (LF), no Windows CRLF

For detailed information about each check, see Static Analysis with PHPStan and Continuous Integration Workflows.

Sources: Inferred from CI workflow files referenced in Diagram 6

Local Development and Testing

Before submitting a pull request, contributors should run quality checks locally to catch issues early.

Installing Dependencies


This installs development dependencies including PHPStan for static analysis.

Running PHPStan Locally


The PHPStan configuration in .phpstan.dist.neon enforces:

  • Level 10: Maximum strictness
  • Strict rules: Enabled via phpstan-strict-rules
  • Deprecation rules: Enabled via phpstan-deprecation-rules
  • Bleeding edge: Latest PHPStan features

For more details about PHPStan configuration, see Static Analysis with PHPStan.

Validating composer.json


This checks that the package definition is valid and follows Composer best practices.

Sources: Inferred from CI workflow configurations and development dependencies

Code Contribution Guidelines

Modifying Core Plugin Classes

The project contains three main plugin classes:

ClassFilePurpose
AutoloadPluginsrc/AutoloadPlugin.phpManages PHP autoloading configuration
ModmanPluginsrc/ModmanPlugin.phpHandles modman-based module deployment
FileCopyPluginsrc/FileCopyPlugin.phpCopies assets and executables to project root

When modifying these classes:

  • Maintain compatibility with Composer Plugin API v2.1+
  • Follow existing patterns for event subscription
  • Add PHPStan type annotations for all parameters and return types
  • Ensure backward compatibility with existing Maho projects

For architectural details, see Plugin Architecture.

Modifying AutoloadRuntime

The AutoloadRuntime class in src/AutoloadRuntime.php provides package discovery and classification. Changes to this class affect all three plugins.

When modifying AutoloadRuntime:

  • Maintain package type recognition for maho-source, maho-module, magento-module
  • Preserve the code pool priority system (local > community > core > lib)
  • Ensure compatibility with both Composer 2.1+ Runtime API

For implementation details, see AutoloadRuntime Package Discovery.

Sources: Inferred from plugin architecture described in Diagram 1

Pull Request Requirements

Pull requests must include:

  1. Clear description of the changes and their purpose
  2. Rationale for the change (bug fix, feature, improvement)
  3. Testing performed locally before submission
  4. Breaking changes clearly documented, if any

Pull requests should:

  • Focus on a single feature or bug fix
  • Keep changes minimal and focused
  • Include updates to documentation if behavior changes
  • Pass all automated quality checks

Sources: Standard open-source contribution practices

Commit Message Guidelines

Write clear, descriptive commit messages that explain:

  • What changed
  • Why the change was necessary
  • Impact on existing functionality

Example:

Fix symlink creation for nested modman directories

ModmanPlugin was failing to create symlinks when modman files
contained nested directory mappings. This adds proper directory
creation before symlink generation.

Fixes: #123

Sources: Standard open-source contribution practices

Review Process

All pull requests are reviewed by project maintainers before merging. The review process checks:

  1. Code quality: Adherence to project standards
  2. Functionality: Changes work as intended
  3. Testing: Adequate validation performed
  4. Documentation: Changes are appropriately documented
  5. Compatibility: No breaking changes without discussion

Maintainers may request changes before approving the pull request.

Sources: Standard open-source contribution practices

Issue Reporting

Contributors can report bugs, request features, or ask questions through GitHub Issues at the repository.

Bug Reports Should Include

  • Description: Clear description of the issue
  • Steps to reproduce: How to trigger the bug
  • Expected behavior: What should happen
  • Actual behavior: What actually happens
  • Environment: PHP version, Composer version, OS
  • Logs/Output: Relevant error messages or command output

Feature Requests Should Include

  • Use case: Why the feature is needed
  • Proposed solution: How it could work
  • Alternatives considered: Other approaches
  • Impact: Who would benefit from the feature

Sources: Standard open-source contribution practices

Code of Conduct

Contributors are expected to:

  • Be respectful and constructive in discussions
  • Focus on what is best for the community
  • Show empathy towards other community members
  • Accept constructive criticism gracefully
  • Help maintain a welcoming environment

Sources: Standard open-source community practices

Getting Help

If you need help contributing:

  • Review existing issues and pull requests for examples
  • Check the documentation in this wiki, starting with Overview
  • Ask questions in GitHub Issues before starting work on major changes
  • Refer to the Development and Quality Assurance section for testing guidance

Sources: Standard open-source contribution practices