-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add template #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
serhiidonii
wants to merge
5
commits into
main
Choose a base branch
from
feat/add-base-template
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Git | ||
| .git | ||
| .gitignore | ||
| .gitattributes | ||
|
|
||
| # IDE | ||
| .idea | ||
| .vscode | ||
| .phpstorm.meta.php | ||
|
|
||
| # Documentation | ||
| README.md | ||
| CHANGELOG.md | ||
| LICENSE | ||
| *.md | ||
|
|
||
| # CI/CD | ||
| .github | ||
|
|
||
| # Testing | ||
| tests | ||
| .phpunit.cache | ||
| coverage | ||
| coverage.xml | ||
| infection.log | ||
| infection-summary.log | ||
| infection-debug.log | ||
| .infection | ||
|
|
||
| # Dependencies (will be installed in container) | ||
| vendor | ||
|
|
||
| # Environment | ||
| .env | ||
| .env.local | ||
| .env.*.local | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # Docker | ||
| Dockerfile | ||
| docker-compose.yml | ||
| .dockerignore | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # EditorConfig is awesome: https://EditorConfig.org | ||
|
|
||
| # top-most EditorConfig file | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.php] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [*.{yml,yaml}] | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [*.{json,json5}] | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # PHP Server Configuration | ||
| PHP_SERVER_PORT=8000 | ||
|
|
||
| # Application Environment | ||
| APP_ENV=dev | ||
| APP_DEBUG=true | ||
|
|
||
| # Add your custom environment variables below | ||
| # EXAMPLE_VARIABLE=value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @MacPaw/platform-backend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| ## 📋 Description | ||
|
|
||
| <!-- Provide a brief description of the changes in this PR --> | ||
|
|
||
| ## 🎯 Type of Change | ||
|
|
||
| <!-- Mark the relevant option with an "x" --> | ||
|
|
||
| - [ ] 🐛 Bug fix (non-breaking change which fixes an issue) | ||
| - [ ] ✨ New feature (non-breaking change which adds functionality) | ||
| - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
| - [ ] 📚 Documentation update | ||
| - [ ] 🔧 Configuration change | ||
| - [ ] ♻️ Code refactoring | ||
|
|
||
| ## 🔄 Changes Made | ||
|
|
||
| <!-- List the key changes made in this PR --> | ||
|
|
||
| - | ||
| - | ||
| - | ||
|
|
||
| ## 📸 Screenshots (if applicable) | ||
|
|
||
| <!-- Add screenshots to help explain your changes --> | ||
|
|
||
| ## ✅ Checklist | ||
|
|
||
| - [ ] My code follows the style guidelines of this project | ||
| - [ ] I have performed a self-review of my own code | ||
| - [ ] I have commented my code, particularly in hard-to-understand areas | ||
| - [ ] I have made corresponding changes to the documentation | ||
| - [ ] My changes generate no new warnings | ||
| - [ ] I have tested my changes across multiple PHP/Symfony versions (if applicable) | ||
| - [ ] Any dependent changes have been merged and published | ||
|
|
||
| ## 🔗 Related Issues | ||
|
|
||
| <!-- Link any related issues here using #issue_number --> | ||
|
|
||
| Closes # | ||
|
|
||
| ## 📝 Additional Notes | ||
|
|
||
| <!-- Add any additional context or notes for reviewers --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Security Policy | ||
|
|
||
| ## Reporting Security Issues | ||
| If you believe you have found a security vulnerability in any MacPaw-owned repository, please report it to us through coordinated disclosure. | ||
|
|
||
| Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests. | ||
|
|
||
| Instead, please send an email to `security[@]macpaw.com`. | ||
|
|
||
| Please include as much of the information listed below as you can to help us better understand and resolve the issue: | ||
|
|
||
| - The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting) | ||
| - Full paths of source file(s) related to the manifestation of the issue | ||
| - The location of the affected source code (tag/branch/commit or direct URL) | ||
| - Any special configuration required to reproduce the issue | ||
| - Step-by-step instructions to reproduce the issue | ||
| - Proof-of-concept or exploit code (if possible) | ||
| - Impact of the issue, including how an attacker might exploit the issue | ||
|
|
||
| This information will help us triage your report more quickly. | ||
|
|
||
| ## Policy | ||
| See MacPaw's [Vulnerability Disclosure Policy](https://macpaw.com/vulnerability-disclosure-policy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - master | ||
| - develop | ||
| - dev | ||
|
|
||
| jobs: | ||
| ci: | ||
| name: Package CI | ||
| uses: MacPaw/github-actions/.github/workflows/symfony-php-reusable.yml@feat/add-release-workflow | ||
| with: | ||
| # Version matrix for testing across PHP and Symfony versions | ||
| # Only using stable, available versions | ||
| versions-matrix: | | ||
| { | ||
| "php": ["8.2", "8.3", "8.4"], | ||
| "symfony/http-kernel": ["6.4.*", "7.0.*", "7.1.*", "7.2", "7.3", "7.4"] | ||
| } | ||
|
|
||
| # Matrix include - add specific combinations (e.g., testing lowest dependencies) | ||
| matrix-include: | | ||
| [ | ||
| { | ||
| "php": "8.2", | ||
| "symfony/http-kernel": "6.4.*", | ||
| "dependencies": "lowest" | ||
| }, | ||
| { | ||
| "php": "8.4", | ||
| "symfony/http-kernel": "7.4.*", | ||
| "dependencies": "coverage", | ||
| "coverage": "xdebug" | ||
| } | ||
| ] | ||
|
|
||
| # Matrix exclude - skip specific incompatible combinations if needed | ||
| # Currently empty as all combinations above are valid | ||
| matrix-exclude: | | ||
| [ | ||
| {"php": "8.2", "symfony/http-kernel": "7.0.*"}, | ||
| {"php": "8.3", "symfony/http-kernel": "7.0.*"}, | ||
| {"php": "8.4", "symfony/http-kernel": "7.0.*"}, | ||
|
|
||
| {"php": "8.2", "symfony/http-kernel": "7.1.*"}, | ||
| {"php": "8.3", "symfony/http-kernel": "7.1.*"}, | ||
| {"php": "8.4", "symfony/http-kernel": "7.1.*"}, | ||
|
|
||
| {"php": "8.2", "symfony/http-kernel": "7.2.*"}, | ||
| {"php": "8.3", "symfony/http-kernel": "7.2.*"}, | ||
| {"php": "8.4", "symfony/http-kernel": "7.2.*"}, | ||
|
|
||
| {"php": "8.2", "symfony/http-kernel": "7.3.*"}, | ||
| {"php": "8.3", "symfony/http-kernel": "7.3.*"}, | ||
| {"php": "8.4", "symfony/http-kernel": "7.3.*"} | ||
| ] | ||
|
|
||
| # Testing settings | ||
| enable-coverage-check: true | ||
| coverage-threshold: 70 | ||
| coverage-file: 'coverage.xml' | ||
| phpcov-version: 11.0.3 | ||
|
|
||
| # PHP quality tools version | ||
| php-version-quality-tools: '8.3' | ||
|
|
||
| # Static analysis tools | ||
| enable-phpstan: true | ||
| phpstan-level: 'max' | ||
| phpstan-config: 'phpstan.neon.dist' | ||
|
|
||
| # Code style tools | ||
| enable-phpcs: true | ||
| phpcs-config: 'phpcs.xml.dist' | ||
|
|
||
| enable-php-cs-fixer: true | ||
| php-cs-fixer-config: '.php-cs-fixer.dist.php' | ||
|
|
||
| # Refactoring tool | ||
| enable-rector: true | ||
| rector-config: 'rector.php' | ||
|
|
||
| # Mutation testing | ||
| enable-infection: true | ||
| infection-config: 'infection.json5.dist' | ||
| infection-min-msi: 80 | ||
| infection-min-covered-msi: 90 | ||
|
|
||
| # Other validation tools | ||
| enable-composer-validate: true | ||
| enable-commitlint: true | ||
| commitlint-config: 'commitlint.config.js' | ||
|
|
||
| # Environment configuration | ||
| php-extensions: 'mbstring, json, xdebug' | ||
| working-directory: '.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| - next | ||
| - beta | ||
| - alpha | ||
| - '[0-9]+.x' | ||
| - '[0-9]+.[0-9]+.x' | ||
| workflow_dispatch: | ||
| inputs: | ||
| dry_run: | ||
| description: 'Dry run (no release will be created)' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| uses: ./.github/workflows/release-reusable.yml | ||
| secrets: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| dry_run: ${{ inputs.dry_run || false }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Composer | ||
| /vendor/ | ||
| composer.lock | ||
|
|
||
| # IDE | ||
| .idea/ | ||
| .phpstorm.meta.php | ||
| .phpunit.result.cache | ||
| .vscode/ | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # PHPUnit | ||
| .phpunit.cache/ | ||
| coverage.xml | ||
| coverage/ | ||
|
|
||
| # Infection | ||
| .infection/ | ||
| infection.log | ||
| infection-summary.log | ||
| infection-debug.log | ||
|
|
||
| # Symfony | ||
| /var/ | ||
| /.phpunit.cache/ | ||
|
|
||
| # Local | ||
| .env | ||
| .env.local | ||
|
|
||
| /*.cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| FROM php:8.3-cli-alpine | ||
|
|
||
| # Install system dependencies | ||
| RUN apk add --no-cache \ | ||
| git \ | ||
| curl \ | ||
| libpng-dev \ | ||
| libzip-dev \ | ||
| zip \ | ||
| unzip \ | ||
| oniguruma-dev | ||
|
|
||
| # Install PHP extensions | ||
| RUN docker-php-ext-install \ | ||
| mbstring \ | ||
| zip \ | ||
| pdo_mysql \ | ||
| opcache | ||
|
|
||
| # Install Composer | ||
| COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | ||
|
|
||
| # Set working directory | ||
| WORKDIR /app | ||
|
|
||
| # Copy composer files | ||
| COPY composer.json composer.lock* ./ | ||
|
|
||
| # Install dependencies | ||
| RUN composer install --no-interaction --no-scripts --prefer-dist --no-dev || \ | ||
| composer install --no-interaction --no-scripts --prefer-dist | ||
|
|
||
| # Copy application files | ||
| COPY . . | ||
|
|
||
| # Expose port (default 8000, can be overridden via env) | ||
| EXPOSE 8000 | ||
|
|
||
| # Start PHP built-in server | ||
| CMD ["sh", "-c", "php -S 0.0.0.0:${PHP_SERVER_PORT:-8000} -t public"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| $finder = PhpCsFixer\Finder::create() | ||
| ->in(__DIR__) | ||
| ->exclude('vendor') | ||
| ->exclude('var') | ||
| ->exclude('.phpunit.cache') | ||
| ->name('*.php') | ||
| ; | ||
|
|
||
| return (new PhpCsFixer\Config()) | ||
| ->setRules([ | ||
| '@PSR12' => true, | ||
| '@Symfony' => true, | ||
| 'declare_strict_types' => true, | ||
| 'array_syntax' => ['syntax' => 'short'], | ||
| 'ordered_imports' => ['sort_algorithm' => 'alpha'], | ||
| 'no_unused_imports' => true, | ||
| 'not_operator_with_successor_space' => true, | ||
| 'trailing_comma_in_multiline' => true, | ||
| 'phpdoc_scalar' => true, | ||
| 'unary_operator_spaces' => true, | ||
| 'binary_operator_spaces' => true, | ||
| 'blank_line_before_statement' => [ | ||
| 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], | ||
| ], | ||
| 'phpdoc_single_line_var_spacing' => true, | ||
| 'phpdoc_var_without_name' => true, | ||
| ]) | ||
| ->setFinder($finder) | ||
| ->setRiskyAllowed(true) | ||
| ; | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.