Skip to content

Commit 8fdb7f4

Browse files
authored
Merge branch '4.x' into feat/502-permite-alterar-@
2 parents f2d46db + dbf33db commit 8fdb7f4

84 files changed

Lines changed: 1547 additions & 2094 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/_pest.yml‎

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,21 @@ jobs:
2525
tests:
2626
name: 'Shard ${{ matrix.shard }}/2'
2727
runs-on: ubuntu-latest
28-
timeout-minutes: 10
28+
timeout-minutes: 5
2929
permissions:
3030
contents: read
3131
concurrency:
3232
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-tests-${{ matrix.shard }}
3333
cancel-in-progress: true
34+
3435
strategy:
3536
fail-fast: false
3637
matrix:
3738
shard: [1, 2]
3839

3940
services:
4041
postgres:
41-
image: postgres:18-alpine # zizmor: ignore[unpinned-images] — ephemeral CI test DB; tracking the patch tag keeps it updated (dependabot doesn't bump service-container images)
42+
image: postgres:18-alpine # zizmor: ignore[unpinned-images] — ephemeral CI test DB
4243
env:
4344
POSTGRES_USER: postgres
4445
POSTGRES_PASSWORD: postgres
@@ -60,7 +61,7 @@ jobs:
6061
persist-credentials: false
6162

6263
- name: Setup PHP
63-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
64+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
6465
with:
6566
php-version: ${{ inputs.PHP_VERSION }}
6667
extensions: ${{ inputs.PHP_EXTENSIONS }}
@@ -77,25 +78,11 @@ jobs:
7778
echo "::add-matcher::${RUNNER_TOOL_CACHE}/phpunit.json"
7879
7980
- name: Install composer dependencies
80-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
81+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
8182
with:
8283
composer-options: ${{ inputs.COMPOSER_FLAGS }}
8384
custom-cache-key: ${{ inputs.CACHE_KEY }}
8485

85-
- name: Install Node.js
86-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
87-
with:
88-
package-manager-cache: false
89-
node-version-file: '.nvmrc'
90-
cache: 'npm'
91-
92-
- name: Install node dependencies
93-
run: |
94-
npm ci
95-
96-
- name: Build Assets
97-
run: npm run build
98-
9986
- name: Prepare test env
10087
run: |
10188
composer run-script post-root-package-install

‎.github/workflows/_phpstan.yml‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,29 @@ jobs:
3939
persist-credentials: false
4040

4141
- name: Setup PHP
42-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
42+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
4343
with:
4444
php-version: ${{ inputs.PHP_VERSION }}
4545
extensions: ${{ inputs.PHP_EXTENSIONS }}
4646
ini-values: ${{ inputs.PHP_INI_PROPERTIES }}
47-
coverage: xdebug
47+
coverage: none
4848
tools: composer:v2
4949

5050
- name: Install composer dependencies
51-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
51+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
5252
with:
5353
composer-options: ${{ inputs.COMPOSER_FLAGS }}
5454
custom-cache-key: ${{ inputs.CACHE_KEY }}
5555

56+
- name: Cache PHPStan results
57+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
58+
with:
59+
path: .cache/phpstan
60+
key: phpstan-${{ inputs.CACHE_KEY }}-${{ hashFiles('phpstan.neon', 'phpstan.modules.php', 'phpstan.ignore.neon') }}-${{ github.run_id }}
61+
restore-keys: |
62+
phpstan-${{ inputs.CACHE_KEY }}-${{ hashFiles('phpstan.neon', 'phpstan.modules.php', 'phpstan.ignore.neon') }}-
63+
phpstan-${{ inputs.CACHE_KEY }}-
64+
5665
- name: Run Phpstan
5766
run: |
58-
vendor/bin/phpstan analyse --ansi --error-format=github
67+
vendor/bin/phpstan analyse --ansi --error-format=github --memory-limit=1G

‎.github/workflows/_pint.yml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,29 @@ jobs:
3939
persist-credentials: false
4040

4141
- name: Setup PHP
42-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
42+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
4343
with:
4444
php-version: ${{ inputs.PHP_VERSION }}
4545
extensions: ${{ inputs.PHP_EXTENSIONS }}
4646
ini-values: ${{ inputs.PHP_INI_PROPERTIES }}
47-
coverage: xdebug
47+
coverage: none
4848
tools: composer:v2, cs2pr
4949

5050
- name: Install composer dependencies
51-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
51+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
5252
with:
5353
composer-options: ${{ inputs.COMPOSER_FLAGS }}
5454
custom-cache-key: ${{ inputs.CACHE_KEY }}
5555

56+
- name: Cache Pint result cache
57+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
58+
with:
59+
path: .cache/pint
60+
key: pint-${{ inputs.CACHE_KEY }}-${{ hashFiles('pint.json') }}-${{ github.run_id }}
61+
restore-keys: |
62+
pint-${{ inputs.CACHE_KEY }}-${{ hashFiles('pint.json') }}-
63+
pint-${{ inputs.CACHE_KEY }}-
64+
5665
- name: Run Pint
5766
env:
5867
XDEBUG_MODE: off

‎.github/workflows/_rector.yml‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,29 @@ jobs:
3939
persist-credentials: false
4040

4141
- name: Setup PHP
42-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
42+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
4343
with:
4444
php-version: ${{ inputs.PHP_VERSION }}
4545
extensions: ${{ inputs.PHP_EXTENSIONS }}
4646
ini-values: ${{ inputs.PHP_INI_PROPERTIES }}
47-
coverage: xdebug
47+
coverage: none
4848
tools: composer:v2
4949

5050
- name: Install composer dependencies
51-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
51+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
5252
with:
5353
composer-options: ${{ inputs.COMPOSER_FLAGS }}
5454
custom-cache-key: ${{ inputs.CACHE_KEY }}
5555

56+
- name: Cache Rector result cache
57+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
58+
with:
59+
path: .cache/rector
60+
key: rector-${{ inputs.CACHE_KEY }}-${{ hashFiles('rector.php') }}-${{ github.run_id }}
61+
restore-keys: |
62+
rector-${{ inputs.CACHE_KEY }}-${{ hashFiles('rector.php') }}-
63+
rector-${{ inputs.CACHE_KEY }}-
64+
5665
- name: Run Rector
5766
run: |
58-
vendor/bin/rector --dry-run --output-format=github
67+
vendor/bin/rector --dry-run

‎.github/workflows/_setup.yml‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Setup
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
CACHE_KEY:
7+
value: ${{ jobs.setup.outputs.CACHE_KEY }}
8+
PHP_VERSION:
9+
value: ${{ jobs.setup.outputs.PHP_VERSION }}
10+
PHP_EXTENSIONS:
11+
value: ${{ jobs.setup.outputs.PHP_EXTENSIONS }}
12+
PHP_INI_PROPERTIES:
13+
value: ${{ jobs.setup.outputs.PHP_INI_PROPERTIES }}
14+
COMPOSER_FLAGS:
15+
value: ${{ jobs.setup.outputs.COMPOSER_FLAGS }}
16+
17+
permissions: {}
18+
19+
jobs:
20+
setup:
21+
name: Run
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
permissions:
25+
contents: read
26+
outputs:
27+
CACHE_KEY: ${{ steps.cache.outputs.key }}
28+
PHP_VERSION: ${{ steps.setup.outputs.PHP_VERSION }}
29+
PHP_EXTENSIONS: ${{ steps.setup.outputs.PHP_EXTENSIONS }}
30+
PHP_INI_PROPERTIES: ${{ steps.setup.outputs.PHP_INI_PROPERTIES }}
31+
COMPOSER_FLAGS: ${{ steps.setup.outputs.COMPOSER_FLAGS }}
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
35+
with:
36+
fetch-depth: 0
37+
persist-credentials: false
38+
39+
- name: Setup job outputs
40+
id: setup
41+
run: |
42+
echo "PHP_VERSION=8.4" >> "$GITHUB_OUTPUT"
43+
echo "PHP_EXTENSIONS=mbstring,pdo,pdo_pgsql,xml,ctype,fileinfo,json,curl,openssl,dom,zip" >> "$GITHUB_OUTPUT"
44+
echo "PHP_INI_PROPERTIES=post_max_size=256M,upload_max_filesize=256M" >> "$GITHUB_OUTPUT"
45+
echo "COMPOSER_FLAGS=--prefer-dist --optimize-autoloader" >> "$GITHUB_OUTPUT"
46+
47+
- name: Create cache key
48+
id: cache
49+
shell: bash
50+
env:
51+
RUNNER_OS: ${{ runner.os }}
52+
RUNNER_ARCH: ${{ runner.arch }}
53+
HASHED_COMPOSER_LOCK: ${{ hashFiles('composer.lock') }}
54+
run: |
55+
composer_hash=${HASHED_COMPOSER_LOCK}
56+
os_lower=$(echo ${RUNNER_OS} | tr '[:upper:]' '[:lower:]')
57+
arch_lower=$(echo ${RUNNER_ARCH} | tr '[:upper:]' '[:lower:]')
58+
combined_key="${os_lower}-${arch_lower}-composer-${composer_hash}"
59+
echo "key=${combined_key}" >> "$GITHUB_OUTPUT"
60+
61+
- name: Setup PHP
62+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
63+
with:
64+
php-version: ${{ steps.setup.outputs.PHP_VERSION }}
65+
extensions: ${{ steps.setup.outputs.PHP_EXTENSIONS }}
66+
ini-values: ${{ steps.setup.outputs.PHP_INI_PROPERTIES }}
67+
coverage: none
68+
tools: composer:v2
69+
70+
- name: Install composer dependencies
71+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
72+
with:
73+
composer-options: ${{ steps.setup.outputs.COMPOSER_FLAGS }}
74+
custom-cache-key: ${{ steps.cache.outputs.key }}

‎.github/workflows/auto-assign.yml‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎.github/workflows/continuous-integration.yml‎

Lines changed: 10 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Continuous Integration
22

33
on:
4+
push:
5+
branches:
6+
- '*.x'
47
pull_request:
58
branches:
69
- '*.x'
@@ -10,6 +13,7 @@ on:
1013
- 'chore/**'
1114
- 'story/**'
1215
types: [opened, reopened, synchronize, ready_for_review]
16+
workflow_dispatch:
1317

1418
concurrency:
1519
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -20,68 +24,18 @@ permissions: {}
2024
jobs:
2125
setup:
2226
name: Setup PHP
23-
runs-on: ubuntu-latest
2427
if: ${{ !github.event.pull_request.draft }}
25-
timeout-minutes: 5
2628
permissions:
2729
contents: read
28-
outputs:
29-
CACHE_KEY: ${{ steps.cache.outputs.key }}
30-
PHP_VERSION: ${{ steps.setup.outputs.PHP_VERSION }}
31-
PHP_EXTENSIONS: ${{ steps.setup.outputs.PHP_EXTENSIONS }}
32-
PHP_INI_PROPERTIES: ${{ steps.setup.outputs.PHP_INI_PROPERTIES }}
33-
COMPOSER_FLAGS: ${{ steps.setup.outputs.COMPOSER_FLAGS }}
34-
steps:
35-
- name: Checkout code
36-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
37-
with:
38-
fetch-depth: 0
39-
persist-credentials: false
40-
41-
- name: Setup job outputs
42-
id: setup
43-
run: |
44-
echo "PHP_VERSION=8.4" >> "$GITHUB_OUTPUT"
45-
echo "PHP_EXTENSIONS=mbstring,pdo,pdo_pgsql,xml,ctype,fileinfo,json,curl,openssl,dom,zip" >> "$GITHUB_OUTPUT"
46-
echo "PHP_INI_PROPERTIES=post_max_size=256M,upload_max_filesize=256M" >> "$GITHUB_OUTPUT"
47-
echo "COMPOSER_FLAGS=--prefer-dist --optimize-autoloader" >> "$GITHUB_OUTPUT"
48-
49-
- name: Create cache key
50-
id: cache
51-
shell: bash
52-
env:
53-
RUNNER_OS: ${{ runner.os }}
54-
RUNNER_ARCH: ${{ runner.arch }}
55-
HASHED_COMPOSER_LOCK: ${{ hashFiles('composer.lock') }}
56-
run: |
57-
composer_hash=${HASHED_COMPOSER_LOCK}
58-
os_lower=$(echo ${RUNNER_OS} | tr '[:upper:]' '[:lower:]')
59-
arch_lower=$(echo ${RUNNER_ARCH} | tr '[:upper:]' '[:lower:]')
60-
combined_key="${os_lower}-${arch_lower}-composer-${composer_hash}"
61-
echo "key=${combined_key}" >> "$GITHUB_OUTPUT"
62-
63-
- name: Setup PHP
64-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
65-
with:
66-
php-version: ${{ steps.setup.outputs.PHP_VERSION }}
67-
extensions: ${{ steps.setup.outputs.PHP_EXTENSIONS }}
68-
ini-values: ${{ steps.setup.outputs.PHP_INI_PROPERTIES }}
69-
coverage: xdebug
70-
tools: composer:v2
71-
72-
- name: Install composer dependencies
73-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
74-
with:
75-
composer-options: ${{ steps.setup.outputs.COMPOSER_FLAGS }}
76-
custom-cache-key: ${{ steps.cache.outputs.key }}
30+
uses: $/.github/workflows/_setup.yml
7731

7832
pint:
7933
name: Perform Pint format
8034
needs: [setup]
8135
if: ${{ !github.event.pull_request.draft }}
8236
permissions:
8337
contents: read
84-
uses: ./.github/workflows/_pint.yml
38+
uses: $/.github/workflows/_pint.yml
8539
with:
8640
CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }}
8741
COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }}
@@ -95,7 +49,7 @@ jobs:
9549
if: ${{ !github.event.pull_request.draft }}
9650
permissions:
9751
contents: read
98-
uses: ./.github/workflows/_rector.yml
52+
uses: $/.github/workflows/_rector.yml
9953
with:
10054
CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }}
10155
COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }}
@@ -109,7 +63,7 @@ jobs:
10963
if: ${{ !github.event.pull_request.draft }}
11064
permissions:
11165
contents: read
112-
uses: ./.github/workflows/_phpstan.yml
66+
uses: $/.github/workflows/_phpstan.yml
11367
with:
11468
CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }}
11569
COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }}
@@ -123,7 +77,7 @@ jobs:
12377
if: ${{ !github.event.pull_request.draft }}
12478
permissions:
12579
contents: read
126-
uses: ./.github/workflows/_pest.yml
80+
uses: $/.github/workflows/_pest.yml
12781
with:
12882
CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }}
12983
COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }}
@@ -135,7 +89,7 @@ jobs:
13589
name: CI Gate
13690
needs: [setup, pint, rector, phpstan, pest]
13791
if: ${{ always() && !github.event.pull_request.draft }}
138-
runs-on: ubuntu-latest
92+
runs-on: ubuntu-slim
13993
timeout-minutes: 5
14094
permissions: {}
14195
steps:

0 commit comments

Comments
 (0)