Skip to content

Commit

Permalink
Merge branch 'FakerPHP:2.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
notaprodev authored Mar 14, 2024
2 parents 8aa016c + 2114cc6 commit 2e6f6dd
Show file tree
Hide file tree
Showing 742 changed files with 9,393 additions and 8,875 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
[*.{yaml, yml}]
indent_size = 2

[Makefile]
Expand Down
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/.php-cs-fixer.rules.php export-ignore
/.php-cs-fixer.test.php export-ignore
/.yamllint.yaml export-ignore
/codecov.yml export-ignore
/Makefile export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm-baseline.xml export-ignore
/psalm.baseline.xml export-ignore
/psalm.xml export-ignore
/roave-bc-check.yaml export-ignore
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
### Review checklist

- [ ] All checks have passed
- [ ] Changes are added to the `CHANGELOG.md`
- [ ] Changes are approved by maintainer
17 changes: 17 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Security Policy

## Supported Versions

The following versions of `fakerphp/faker` have active support:

- `^1.23.0`

## Unsupported Versions

The following versions of `fakerphp/faker` have reached their end of life:

- `<1.23.0`

## Reporting a Vulnerability

If you believe that you have found a security vulnerability, please send an email to [email protected]. Ensure to include all details required to understand the severity of the issue.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ updates:
interval: "monthly"
versioning-strategy: "increase"

- commit-message:
include: "scope"
prefix: "composer"
directory: "/vendor-bin/rector"
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "composer"
schedule:
interval: "monthly"
versioning-strategy: "increase"

- commit-message:
include: "scope"
prefix: "github-actions"
Expand Down
6 changes: 3 additions & 3 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
daysUntilStale: 14
daysUntilClose: 7
exemptLabels:
- pinned
- security
- "pinned"
- "security"
# Label to use when marking an issue as stale
staleLabel: lifecycle/stale
staleLabel: "lifecycle/stale"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/bc-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on: # yamllint disable-line rule:truthy
pull_request: ~
push:
branches:
- "main"
- "[0-9].*"

name: "BC Check"

jobs:
roave-bc-check:
name: "Roave BC Check"
runs-on: "ubuntu-latest"

steps:
- name: "Checkout code"
uses: "actions/checkout@v4"

- name: "Roave BC Check"
uses: "addnab/docker-run-action@v3"
with:
image: "nyholm/roave-bc-check-ga"
options: "--env GITHUB_REPOSITORY=${{ github.repository }} --user 1001 --volume ${{ github.workspace }}:/app"
run: "/entrypoint.sh"
21 changes: 0 additions & 21 deletions .github/workflows/bc-check.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
name: Update branch alias
name: "Update branch alias"

on:
on: # yamllint disable-line rule:truthy
push:
tags: ['*']
tags: ["*"]

jobs:
branch-alias:
name: Update branch alias
runs-on: ubuntu-latest
name: "Update branch alias"
runs-on: "ubuntu-latest"

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: 7.4
coverage: none
php-version: "7.4"
coverage: "none"

- name: Checkout code
uses: actions/checkout@v2
- name: "Checkout code"
uses: "actions/checkout@v4"
with:
ref: main
ref: "main"

- name: Find branch alias
id: find_alias
- name: "Find branch alias"
id: "find_alias"
run: |
TAG=$(echo $GITHUB_REF | cut -d'/' -f 3)
echo "Last tag was $TAG"
ARR=(${TAG//./ })
ARR[1]=$((${ARR[1]}+1))
echo ::set-output name=alias::${ARR[0]}.${ARR[1]}
echo "name=alias::${ARR[0]}.${ARR[1]}" >> $GITHUB_OUTPUT
- name: Update branch alias
- name: "Update branch alias"
run: |
CURRENT_ALIAS=$(composer config extra.branch-alias.dev-main | cut -d'-' -f 1)
Expand All @@ -53,15 +53,15 @@ jobs:
composer config extra.branch-alias.dev-main ${{ steps.find_alias.outputs.alias }}-dev
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
- name: "Create Pull Request"
uses: "peter-evans/create-pull-request@v5"
with:
base: main
branch: branch-alias-update
author: GitHub <[email protected]>
committer: GitHub <[email protected]>
commit-message: Updating branch alias to ${{ steps.find_alias.outputs.alias }}
title: Update branch alias
labels: pinned, do not merge
base: "main"
branch: "branch-alias-update"
author: "GitHub <[email protected]>"
committer: "GitHub <[email protected]>"
commit-message: "Updating branch alias to ${{ steps.find_alias.outputs.alias }}"
title: "Update branch alias"
labels: "pinned, do not merge"
body: |
Since we just tagged a new version, we need to update composer.json branch alias. This should not be merged until there are new features, as it would prevent patch releases.
55 changes: 55 additions & 0 deletions .github/workflows/code-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on: # yamllint disable-line rule:truthy
pull_request: ~
push:
branches:
- "main"
- "[0-9].*"

name: "Code Coverage"

jobs:
code-coverage:
name: "Code Coverage"

strategy:
matrix:
php-version:
- "8.0"

runs-on: "ubuntu-latest"

steps:
- name: "Checkout code"
uses: "actions/checkout@v4"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "xdebug"
extensions: "intl"
php-version: "${{ matrix.php-version }}"

- name: "Determine composer cache directory"
id: "composer-cache"
run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v3"
with:
path: "${{ steps.composer-cache.outputs.directory }}"
key: "composer-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}"
restore-keys: |
composer-${{ matrix.php-version }}-
composer-
- name: "Download dependencies"
run: |
composer update --ansi --no-interaction --no-progress --optimize-autoloader
- name: "Collect code coverage with PHPUnit"
run: |
vendor/bin/phpunit --colors=always --coverage-clover=.build/logs/clover.xml
- name: "Send code coverage report to codecov.io"
run: |
bash <(curl -s https://codecov.io/bash)
57 changes: 0 additions & 57 deletions .github/workflows/code-coverage.yml

This file was deleted.

Loading

0 comments on commit 2e6f6dd

Please sign in to comment.