diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 38bcaed..80d9cfe 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,46 +1,5 @@ -# This is a comment. -# Each line is a file pattern followed by one or more owners. - -# These owners will be the default owners for everything in -# the repo. Unless a later match takes precedence, -# @global-owner1 and @global-owner2 will be requested for -# review when someone opens a pull request. - * @onairmarc - -# *.js @js-owner #This is an inline comment. - /composer.json @EncoreDigitalGroup/dependency-management /package.json @EncoreDigitalGroup/dependency-management - /.github/ @onairmarc -/.github/dependabot.yml @EncoreDigitalGroup/dependency-management - -# The `docs/*` pattern will match files like -# `docs/getting-started.md` but not further nested files like -# `docs/build-app/troubleshooting.md`. -# bdocs/* docs@example.com - -# In this example, @octocat owns any file in an apps directory -# anywhere in your repository. -# apps/ @octocat - -# In this example, @doctocat owns any file in the `/docs` -# directory in the root of your repository and any of its -# subdirectories. -# /docs/ @doctocat - -# In this example, any change inside the `/scripts` directory -# will require approval from @doctocat or @octocat. -# /scripts/ @doctocat @octocat - -# In this example, @octocat owns any file in a `/logs` directory such as -# `/build/logs`, `/scripts/logs`, and `/deeply/nested/logs`. Any changes -# in a `/logs` directory will require approval from @octocat. -# **/logs @octocat - -# In this example, @octocat owns any file in the `/apps` -# directory in the root of your repository except for the `/apps/github` -# subdirectory, as its owners are left empty. -# /apps/ @octocat -# /apps/github +/.github/dependabot.yml @EncoreDigitalGroup/dependency-management \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3ea24d7..bae055e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,16 +1,9 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - version: 2 updates: - - package-ecosystem: "composer" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: weekly - day: wednesday - time: "12:00" - timezone: America/Chicago - reviewers: - - "EncoreDigitalGroup/dependency-management" \ No newline at end of file + - package-ecosystem: "composer" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: weekly + day: wednesday + time: "12:00" + timezone: America/Chicago \ No newline at end of file diff --git a/.github/workflows/_pullRequest.yml b/.github/workflows/_pullRequest.yml index 1db4870..c2ef839 100644 --- a/.github/workflows/_pullRequest.yml +++ b/.github/workflows/_pullRequest.yml @@ -2,34 +2,79 @@ name: Pull Request on: pull_request_target: + workflow_dispatch: + +concurrency: + group: ${{ github.repository }}-${{ github.event.pull_request.number }}-pullRequest + cancel-in-progress: true permissions: contents: write pull-requests: write jobs: + GitStatusCheck: + name: GitStatusCheck + runs-on: ubuntu-latest + outputs: + shouldRun: ${{ steps.GitStatusCheck.outputs.shouldRun }} + steps: + - name: GitStatusCheck + id: GitStatusCheck + uses: EncoreDigitalGroup/ci-workflows/actions/php/gitStatusCheck@v2 + + FormatTitle: + name: FormatTitle + runs-on: ubuntu-latest + steps: + - name: FormatTitle + uses: EncoreDigitalGroup/ci-workflows/actions/github/formatPullRequestTitle@v2 + with: + branch: ${{ github.head_ref }} + pullRequestNumber: ${{ github.event.number }} + repository: ${{ github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} + + Rector: + needs: GitStatusCheck + name: Rector + if: needs.GitStatusCheck.outputs.shouldRun == 'true' + runs-on: ubuntu-latest + steps: + - name: Rector + uses: EncoreDigitalGroup/ci-workflows/actions/php/rector@v2 + with: + branch: "${{ github.ref }}" + repository: "${{ github.repository }}" + Duster: + needs: Rector name: Duster - uses: EncoreDigitalGroup/ci-workflows/.github/workflows/dusterFixBlame.yml@v1 + uses: EncoreDigitalGroup/ci-workflows/.github/workflows/php_dusterFix.yml@v2 permissions: contents: write pull-requests: write + StaticAnalysis: needs: Duster name: StaticAnalysis - uses: EncoreDigitalGroup/ci-workflows/.github/workflows/larastan.yml@v1 + uses: EncoreDigitalGroup/ci-workflows/.github/workflows/php_larastan.yml@v2 with: - phpVersion: '8.3' + phpVersion: "8.3" + path: "src/" branch: ${{ github.head_ref }} - path: 'src/' + Test: needs: Duster name: Test - uses: EncoreDigitalGroup/ci-workflows/.github/workflows/pest.yml@v1 + uses: EncoreDigitalGroup/ci-workflows/.github/workflows/php_pest.yml@v2 with: - phpVersion: '8.3' + phpVersion: "8.3" branch: ${{ github.head_ref }} + enforceCoverage: false + runParallel: true + AutoMerge: needs: [ StaticAnalysis, Test ] - name: AutoMerge - uses: EncoreDigitalGroup/ci-workflows/.github/workflows/dependabotAutoMerge.yml@v1 + name: Auto-Merge + uses: EncoreDigitalGroup/ci-workflows/.github/workflows/github_dependabotAutoMerge.yml@v2 diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index b80d3df..22f8739 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -11,7 +11,7 @@ permissions: write-all jobs: CreateRelease: name: Create Release - uses: EncoreDigitalGroup/ci-workflows/.github/workflows/createRelease.yml@v1 + uses: EncoreDigitalGroup/ci-workflows/.github/workflows/github_createRelease.yml@v2 permissions: contents: write with: diff --git a/.idea/php.xml b/.idea/php.xml index 7ef2f4f..4dc0b87 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -94,6 +94,11 @@ + + + + + diff --git a/.idea/stdlib.iml b/.idea/stdlib.iml index b1830d2..a60e953 100644 --- a/.idea/stdlib.iml +++ b/.idea/stdlib.iml @@ -2,7 +2,9 @@ + + diff --git a/composer.json b/composer.json index 6181faf..c3fd57b 100644 --- a/composer.json +++ b/composer.json @@ -44,5 +44,10 @@ "src/ObjectHelpers/val_helpers.php" ] }, + "scripts": { + "post-autoload-dump": [ + "PHPGenesis\\Common\\Composer\\Scripts::postAutoloadDump" + ] + }, "minimum-stability": "stable" } diff --git a/pint.json b/pint.json index 1a17a72..e37f8a1 100644 --- a/pint.json +++ b/pint.json @@ -1,51 +1,51 @@ { - "preset": "laravel", - "rules": { - "blank_line_between_import_groups": true, - "class_attributes_separation": { - "elements": { - "const": "none", - "method": "one", - "property": "none", - "trait_import": "none", - "case": "none" - } - }, - "concat_space": { - "spacing": "one" - }, - "explicit_string_variable": true, - "global_namespace_import": { - "import_classes": true, - "import_constants": true, - "import_functions": true - }, - "ordered_imports": { - "sort_algorithm": "alpha" - }, - "php_unit_test_annotation": { - "style": "annotation" - }, - "simple_to_complex_string_variable": true, - "blank_line_after_namespace": true, - "array_push": true, - "cast_spaces": true, - "braces_position": true, - "constant_case": true, - "indentation_type": true, - "line_ending": true, - "linebreak_after_opening_tag": true, - "lowercase_static_reference": true, - "method_argument_space": true, - "no_closing_tag": true, - "no_empty_comment": true, - "no_empty_phpdoc": true, - "no_spaces_after_function_name": true, - "no_useless_return": true, - "no_whitespace_in_blank_line": true, - "new_with_parentheses": true, - "new_with_braces": true, - "not_operator_with_successor_space": false, - "ternary_to_null_coalescing": true - } + "preset": "laravel", + "rules": { + "blank_line_between_import_groups": true, + "class_attributes_separation": { + "elements": { + "const": "none", + "method": "one", + "property": "none", + "trait_import": "none", + "case": "none" + } + }, + "concat_space": { + "spacing": "one" + }, + "explicit_string_variable": true, + "global_namespace_import": { + "import_classes": true, + "import_constants": true, + "import_functions": true + }, + "ordered_imports": { + "sort_algorithm": "alpha" + }, + "php_unit_test_annotation": { + "style": "annotation" + }, + "simple_to_complex_string_variable": true, + "blank_line_after_namespace": true, + "array_push": true, + "cast_spaces": true, + "braces_position": true, + "constant_case": true, + "indentation_type": true, + "line_ending": true, + "linebreak_after_opening_tag": true, + "lowercase_static_reference": true, + "method_argument_space": true, + "no_closing_tag": true, + "no_empty_comment": true, + "no_empty_phpdoc": true, + "no_spaces_after_function_name": true, + "no_useless_return": true, + "no_whitespace_in_blank_line": true, + "new_with_parentheses": true, + "new_with_braces": true, + "not_operator_with_successor_space": false, + "ternary_to_null_coalescing": true + } } \ No newline at end of file diff --git a/rector.php b/rector.php index d33cfb0..9340059 100644 --- a/rector.php +++ b/rector.php @@ -33,7 +33,6 @@ AddVoidReturnTypeWhereNoReturnRector::class, ]) ->withSkip([ - CallableThisArrayToAnonymousFunctionRector::class, CompactToVariablesRector::class, UseIdenticalOverEqualWithSameTypeRector::class, LogicalToBooleanRector::class, @@ -45,7 +44,6 @@ RenameForeachValueVariableToMatchExprVariableRector::class, RenameParamToMatchTypeRector::class, RenameVariableToMatchMethodCallReturnTypeRector::class, - ChangeAndIfToEarlyReturnRector::class, SeparateMultiUseImportsRector::class, RemoveExtraParametersRector::class, NewlineAfterStatementRector::class,