Skip to content

Commit

Permalink
Merge 2.0.x into main (#26)
Browse files Browse the repository at this point in the history
Merges the changes from the `2.0.x` branch into the `main` branch

Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter authored Feb 1, 2025
2 parents 6b56153 + ddda172 commit df865a0
Show file tree
Hide file tree
Showing 18 changed files with 3,459 additions and 963 deletions.
19 changes: 0 additions & 19 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
# Auto detect text files and perform LF normalization
* text=auto
*.bash text eol=lf
*.css text diff=css
*.gif binary
*.html text diff=html
*.ico binary
*.jpeg binary
*.jpg binary
*.lock text -diff
*.md text diff=markdown
*.php text eol=lf diff=php
*.phpt text eol=lf diff=php
*.phtml text eol=lf diff=html
*.png binary
*.py text diff=python
*.sh text eol=lf
*.svg text
*.txt text
*.webp binary
*.zip binary
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/composer.lock export-ignore
/infection.json5.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml.dist export-ignore
/tests export-ignore
29 changes: 11 additions & 18 deletions .github/workflows/automation.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
name: Automation

on:
pull_request:
push:
pull_request: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
push: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
branches:
# Default branch
- "main"
# Release branches
## 1.2.x - e.g. Semantic Versioning
- "[0-9]+.[0-9]+.x"
## v1 - e.g. GitHub Actions Versioning
- "v[0-9]+"
# Scheduled workflow
schedule:
# Runs hourly
- cron: "0 * * * *"
# Manually Trigger workflow
workflow_dispatch:
- "main" # Default branch
- "[0-9]+.[0-9]+.x" # Release branches (1.2.x - e.g. Semantic Versioning)
- "v[0-9]+" # v1 - e.g. GitHub Actions Versioning
schedule: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onschedule
- cron: "0 * * * *" # Runs hourly
workflow_dispatch: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatch

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
# values: read, write, none
permissions:
permissions: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
# actions: Work with GitHub Actions. For example, actions: write permits an action to cancel a workflow run.
actions: write
# attestations: Work with artifact attestations. For example, attestations: write permits an action to generate an artifact attestation for a build.
attestations: write
# checks: Work with check runs and check suites. For example, checks: write permits an action to create a check run.
checks: write
# contents: Work with the contents of the repository. For example, contents: read permits an action to list the commits, and contents:write allows the action to create a release.
Expand Down Expand Up @@ -52,6 +46,5 @@ jobs:
automation:
uses: ghostwriter/compliance/.github/workflows/automation.yml@v1
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
INFECTION_DASHBOARD_API_KEY: ${{ secrets.INFECTION_DASHBOARD_API_KEY }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2014-2024, Nathanael Esayeas
Copyright (c) 2014-2025, Nathanael Esayeas
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# CaseConverter

[![Compliance](https://github.com/ghostwriter/case-converter/actions/workflows/automation.yml/badge.svg)](https://github.com/ghostwriter/case-converter/actions/workflows/automation.yml)
[![Supported PHP Version](https://badgen.net/packagist/php/ghostwriter/case-converter?color=8892bf)](https://www.php.net/supported-versions)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/ghostwriter?label=Sponsor+@ghostwriter/case-converter&logo=GitHub+Sponsors)](https://github.com/sponsors/ghostwriter)
[![Code Coverage](https://codecov.io/gh/ghostwriter/case-converter/branch/main/graph/badge.svg)](https://codecov.io/gh/ghostwriter/case-converter)
[![Type Coverage](https://shepherd.dev/github/ghostwriter/case-converter/coverage.svg)](https://shepherd.dev/github/ghostwriter/case-converter)
[![Psalm Level](https://shepherd.dev/github/ghostwriter/case-converter/level.svg)](https://psalm.dev/docs/running_psalm/error_levels)
[![Latest Version on Packagist](https://badgen.net/packagist/v/ghostwriter/case-converter)](https://packagist.org/packages/ghostwriter/case-converter)
[![Automation](https://github.com/ghostwriter/case-converter/actions/workflows/automation.yml/badge.svg)](https://github.com/ghostwriter/case-converter/actions/workflows/automation.yml)
[![Supported PHP Version](https://badgen.net/packagist/php/ghostwriter/case-converter?color=8892bf)](https://www.php.net/supported-versions)
[![Downloads](https://badgen.net/packagist/dt/ghostwriter/case-converter?color=blue)](https://packagist.org/packages/ghostwriter/case-converter)

Convert strings from and to `AdaCase`, `CamelCase`, `CobolCase`, `KebabCase`, `Lowercase`, `MacroCase`, `PascalCase`, `SentenceCase`, `SnakeCase`, `TitleCase`, `TrainCase`, and `Uppercase`.
Expand Down
74 changes: 43 additions & 31 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
"homepage": "https://github.com/ghostwriter/case-converter",
"support": {
"issues": "https://github.com/ghostwriter/case-converter/issues",
"forum": "https://github.com/ghostwriter/case-converter/discussions",
"source": "https://github.com/ghostwriter/case-converter",
"docs": "https://github.com/ghostwriter/case-converter",
"rss": "https://github.com/ghostwriter/case-converter/releases.atom",
"security": "https://github.com/ghostwriter/case-converter/security/advisories/new"
},
Expand All @@ -43,13 +41,19 @@
"url": "https://github.com/sponsors/ghostwriter"
}
],
"_comment": "#BlackLivesMatter",
"_comment": [
"#BlackLivesMatter",
"#FreePalestine",
"#StandWithUkraine"
],
"require": {
"php": ">=8.3",
"ext-mbstring": "*"
},
"require-dev": {
"ghostwriter/coding-standard": "dev-main"
"ghostwriter/coding-standard": "@dev",
"ghostwriter/psalm-plugin": "@dev",
"ghostwriter/testify": "@dev"
},
"replace": {},
"minimum-stability": "stable",
Expand All @@ -61,63 +65,71 @@
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests"
}
"Tests\\Unit\\": "tests/unit/"
},
"files": [
"tests/bootstrap.php"
],
"exclude-from-classmap": [
"tests/fixture/"
]
},
"config": {
"allow-plugins": {
"ghostwriter/coding-standard": true
},
"bump-after-update": true,
"classmap-authoritative": false,
"discard-changes": true,
"optimize-autoloader": true,
"platform": {
"php": "8.3.999"
},
"platform-check": true,
"preferred-install": "dist",
"prepend-autoloader": true,
"process-timeout": 5000,
"sort-packages": true,
"use-parent-dir": false
},
"scripts": {
"bin_composer": "vendor/ghostwriter/coding-standard/tools/composer",
"bin_ecs": "ecs check --clear-cache --no-interaction",
"bin_infection": "infection --ansi --show-mutations --threads=max --min-msi=0 --min-covered-msi=0",
"bin_phive": "phive",
"bin_phpunit": "phpunit --do-not-cache-result --colors=always",
"bin_infection": "vendor/ghostwriter/coding-standard/tools/infection --ansi --min-covered-msi=0 --min-msi=0 --show-mutations --threads=max",
"bin_normalize": "vendor/ghostwriter/coding-standard/tools/composer-normalize",
"bin_phive": "vendor/ghostwriter/coding-standard/tools/phive",
"bin_phpunit": "vendor/ghostwriter/coding-standard/tools/phpunit --do-not-cache-result --colors=always",
"bin_psalm": "psalm --no-cache",
"bin_rector": "rector process --no-ansi --clear-cache",
"bin_rector": "rector process --clear-cache --no-ansi",
"cache:clear": "rm -rf ./.cache/*",
"check": [
"@composer validate",
"@cache:clear",
"@bin_composer validate",
"@composer-normalize",
"@ecs",
"@test"
],
"dev": [
"@cache:clear",
"@check",
"@psalm:update",
"@psalm:security",
"@psalm:dry-run"
],
"composer-normalize": "@bin_normalize --no-cache --diff --no-check-lock --no-scripts --no-plugins",
"ecs": "@bin_ecs --fix",
"git:submodule:update": "git submodule update --depth=1 --init --recursive --recommend-shallow --remote",
"infection": "@bin_infection",
"phpunit": "@bin_phpunit",
"phpunit:migrate": "@bin_phpunit --migrate-configuration",
"psalm": "@bin_psalm --show-info=true",
"psalm:alter": "@bin_psalm --alter --allow-backwards-incompatible-changes=false --safe-types",
"psalm:baseline": "@psalm --no-diff --set-baseline=psalm-baseline.xml",
"psalm:dry-run": "@psalm:alter --issues=all --dry-run",
"psalm:fix": "@psalm:alter --issues=UnnecessaryVarAnnotation,MissingPureAnnotation,MissingImmutableAnnotation",
"psalm:security": "@psalm --no-diff --taint-analysis",
"psalm:shepherd": "@psalm --no-diff --shepherd --stats",
"psalm:update": "@psalm --no-diff --update-baseline=psalm-baseline.xml",
"infection": [
"@xdebug",
"@bin_infection"
],
"phpunit": [
"@xdebug",
"@bin_phpunit"
],
"phpunit:migrate": [
"@xdebug",
"@bin_phpunit --migrate-configuration"
],
"rector": "@bin_rector",
"rector:dry-run": "@rector --dry-run",
"test": [
"@phpunit",
"@psalm:shepherd",
"@infection"
]
],
"xdebug": "@putenv XDEBUG_MODE=coverage"
}
}
Loading

0 comments on commit df865a0

Please sign in to comment.