From e928f7cfd3d3c2da4d966f30db915062d56fc076 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 11:40:40 +0100 Subject: [PATCH 01/15] Feat(ci) Adding default pipeline with sonar --- .github/workflows/build.yml | 19 +++++++++++++++++++ sonar-project.properties | 14 ++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000000..5fbe985c8b4b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,19 @@ +name: Build +on: + push: + branches: + - 12.x + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarqube: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000000..7a90df52555d --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,14 @@ +sonar.projectKey=AntoineCvlz_laravel-framework +sonar.organization=antoinecvlz + + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=laravel-framework +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file From c99d2fafb7f3386e40b857bd837b2309f794339b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 13:04:23 +0100 Subject: [PATCH 02/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 7a90df52555d..da1ae3f42e1b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,14 +1,15 @@ sonar.projectKey=AntoineCvlz_laravel-framework sonar.organization=antoinecvlz - -# This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=laravel-framework -#sonar.projectVersion=1.0 - - -# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -#sonar.sources=. - -# Encoding of the source code. Default is default system encoding -#sonar.sourceEncoding=UTF-8 \ No newline at end of file +sonar.sources=. + +sonar.exclusions=\ + vendor/**,\ + node_modules/**,\ + storage/**,\ + bootstrap/cache/**,\ + public/**,\ + .github/**,\ + .idea/**,\ + tests/Mocks/**,\ + tests/Fixtures/** \ No newline at end of file From fdc0ebe64eee619d4353a99c8de70a4884ab7cff Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 13:53:28 +0100 Subject: [PATCH 03/15] fix:exclusion sonar --- sonar-project.properties | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index da1ae3f42e1b..2d1629d6b61d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,12 +4,5 @@ sonar.organization=antoinecvlz sonar.sources=. sonar.exclusions=\ - vendor/**,\ - node_modules/**,\ - storage/**,\ - bootstrap/cache/**,\ - public/**,\ .github/**,\ - .idea/**,\ - tests/Mocks/**,\ - tests/Fixtures/** \ No newline at end of file + tests/** \ No newline at end of file From 8d162dcb8bea1506a36d96f8dc855bca1d7f8adb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:00:39 +0100 Subject: [PATCH 04/15] fix:exclusion sonar --- sonar-project.properties | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sonar-project.properties b/sonar-project.properties index 2d1629d6b61d..e4106b578459 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,5 +4,11 @@ sonar.organization=antoinecvlz sonar.sources=. sonar.exclusions=\ + vendor/**,\ + node_modules/**,\ + storage/**,\ + bootstrap/cache/**,\ + public/**,\ .github/**,\ + .idea/**,\ tests/** \ No newline at end of file From 8e95cec2f73521a8983a655d7554013239d4dba6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:16:07 +0100 Subject: [PATCH 05/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index e4106b578459..da1ae3f42e1b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -11,4 +11,5 @@ sonar.exclusions=\ public/**,\ .github/**,\ .idea/**,\ - tests/** \ No newline at end of file + tests/Mocks/**,\ + tests/Fixtures/** \ No newline at end of file From 9414126c29a44fd990bda03befeb4e8a26ee6a50 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:27:14 +0100 Subject: [PATCH 06/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index da1ae3f42e1b..92944d6257d2 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -10,6 +10,8 @@ sonar.exclusions=\ bootstrap/cache/**,\ public/**,\ .github/**,\ - .idea/**,\ - tests/Mocks/**,\ - tests/Fixtures/** \ No newline at end of file + .idea/** + +sonar.issue.ignore.multicriteria=1 +sonar.issue.ignore.multicriteria.1.resource=tests/** +sonar.issue.ignore.multicriteria.1.ruleKey=phpsecurity:* \ No newline at end of file From 0699d90e5aa285292d67aaeda9573996582c0b7a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:32:33 +0100 Subject: [PATCH 07/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 92944d6257d2..48a189030a26 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -10,8 +10,6 @@ sonar.exclusions=\ bootstrap/cache/**,\ public/**,\ .github/**,\ - .idea/** + .idea/**,\ -sonar.issue.ignore.multicriteria=1 -sonar.issue.ignore.multicriteria.1.resource=tests/** -sonar.issue.ignore.multicriteria.1.ruleKey=phpsecurity:* \ No newline at end of file +sonar.security.exclusions=tests/**/* \ No newline at end of file From bfee49f1a9c3e5ca441ee0ad04215881de662abe Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:41:27 +0100 Subject: [PATCH 08/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 48a189030a26..d350d91f6521 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,8 +1,15 @@ +# Projet et organisation SonarCloud sonar.projectKey=AntoineCvlz_laravel-framework sonar.organization=antoinecvlz -sonar.sources=. +# Définition du code source et des tests +# Seul le code dans 'src' sera analysé pour les règles de sécurité +sonar.sources=src +# Les tests sont analysés pour la couverture et la qualité mais pas pour la sécurité +sonar.tests=tests + +# Exclusions globales (non pertinentes pour l'analyse) sonar.exclusions=\ vendor/**,\ node_modules/**,\ @@ -10,6 +17,7 @@ sonar.exclusions=\ bootstrap/cache/**,\ public/**,\ .github/**,\ - .idea/**,\ + .idea/** -sonar.security.exclusions=tests/**/* \ No newline at end of file +# Encoding des fichiers +sonar.sourceEncoding=UTF-8 \ No newline at end of file From ee0cf798f8cb6cc5897d908fb2cd51001853369e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:47:26 +0100 Subject: [PATCH 09/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index d350d91f6521..47528c0f29a4 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,15 +1,8 @@ -# Projet et organisation SonarCloud sonar.projectKey=AntoineCvlz_laravel-framework sonar.organization=antoinecvlz -# Définition du code source et des tests -# Seul le code dans 'src' sera analysé pour les règles de sécurité -sonar.sources=src +sonar.sources=. -# Les tests sont analysés pour la couverture et la qualité mais pas pour la sécurité -sonar.tests=tests - -# Exclusions globales (non pertinentes pour l'analyse) sonar.exclusions=\ vendor/**,\ node_modules/**,\ @@ -17,7 +10,4 @@ sonar.exclusions=\ bootstrap/cache/**,\ public/**,\ .github/**,\ - .idea/** - -# Encoding des fichiers -sonar.sourceEncoding=UTF-8 \ No newline at end of file + .idea/**,\ \ No newline at end of file From 46760478b3d243c8bb01f402f97999ba03905e7e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:53:31 +0100 Subject: [PATCH 10/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 47528c0f29a4..da1ae3f42e1b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -10,4 +10,6 @@ sonar.exclusions=\ bootstrap/cache/**,\ public/**,\ .github/**,\ - .idea/**,\ \ No newline at end of file + .idea/**,\ + tests/Mocks/**,\ + tests/Fixtures/** \ No newline at end of file From 54f216a6c2f688a65c7d0114fc146e98f9f858e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 14:59:08 +0100 Subject: [PATCH 11/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index da1ae3f42e1b..f8e216da1464 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,8 @@ sonar.projectKey=AntoineCvlz_laravel-framework sonar.organization=antoinecvlz -sonar.sources=. +sonar.test=. +sonar.tests.inclusions=tests/** sonar.exclusions=\ vendor/**,\ From 1a7f96ee3d987a748ab7ade6387eedef3e36a639 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 15:08:14 +0100 Subject: [PATCH 12/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index f8e216da1464..c78eb5d2f272 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=AntoineCvlz_laravel-framework sonar.organization=antoinecvlz sonar.test=. -sonar.tests.inclusions=tests/** +sonar.test.inclusions=tests/** sonar.exclusions=\ vendor/**,\ From 6bd34d07d94a88cc00bd1b57acc5c4c355fc56ce Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Dec 2025 15:15:12 +0100 Subject: [PATCH 13/15] Feat(sonar) Sonar properties exclusion --- sonar-project.properties | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index c78eb5d2f272..1c08ce107194 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,16 +1,2 @@ sonar.projectKey=AntoineCvlz_laravel-framework -sonar.organization=antoinecvlz - -sonar.test=. -sonar.test.inclusions=tests/** - -sonar.exclusions=\ - vendor/**,\ - node_modules/**,\ - storage/**,\ - bootstrap/cache/**,\ - public/**,\ - .github/**,\ - .idea/**,\ - tests/Mocks/**,\ - tests/Fixtures/** \ No newline at end of file +sonar.organization=antoinecvlz \ No newline at end of file From 90ba2953a5e51ef5bd6668c8f365dbcdef600dc0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 5 Jan 2026 11:01:11 +0100 Subject: [PATCH 14/15] fix(sonar) --- .github/workflows/build.yml | 32 +++++++++++++++++++++++++++++++- sonar-project.properties | 8 +++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fbe985c8b4b..65dca26d9907 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,37 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + fetch-depth: 0 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + coverage: xdebug + tools: composer + + - name: Cache Composer dependencies + uses: actions/cache@v4 + with: + path: vendor + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: | + composer install --no-interaction --prefer-dist + + - name: Run PHPUnit with coverage + env: + XDEBUG_MODE: coverage + run: | + mkdir -p build/logs + php -d memory_limit=1G ./vendor/bin/phpunit \ + --configuration phpunit.xml.dist \ + --coverage-clover build/logs/clover.xml \ + --coverage-filter src \ + --do-not-fail-on-warning + - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@v6 env: diff --git a/sonar-project.properties b/sonar-project.properties index 1c08ce107194..69c177ec3920 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,2 +1,8 @@ sonar.projectKey=AntoineCvlz_laravel-framework -sonar.organization=antoinecvlz \ No newline at end of file +sonar.organization=antoinecvlz + +sonar.sources=src +sonar.tests=tests +sonar.php.coverage.reportPaths=build/logs/clover.xml + +sonar.exclusions=vendor/**,**/node_modules/**,storage/**,build/**,.github/** \ No newline at end of file From 2f2c06105c6e31c5dfa843c6c0da944e41ca9cec Mon Sep 17 00:00:00 2001 From: AntoineCvlz <112949855+AntoineCvlz@users.noreply.github.com> Date: Mon, 5 Jan 2026 10:01:46 +0000 Subject: [PATCH 15/15] Update facade docblocks --- src/Illuminate/Support/Facades/Event.php | 2 +- src/Illuminate/Support/Facades/Request.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Support/Facades/Event.php b/src/Illuminate/Support/Facades/Event.php index 35d61f465123..466a6f66bac9 100755 --- a/src/Illuminate/Support/Facades/Event.php +++ b/src/Illuminate/Support/Facades/Event.php @@ -21,7 +21,7 @@ * @method static void forgetPushed() * @method static \Illuminate\Events\Dispatcher setQueueResolver(callable $resolver) * @method static \Illuminate\Events\Dispatcher setTransactionManagerResolver(callable|null $resolver) - * @method static void defer(callable $callback, string[]|null $events = null) + * @method static mixed defer(callable $callback, string[]|null $events = null) * @method static array getRawListeners() * @method static void macro(string $name, object|callable $macro) * @method static void mixin(object $mixin, bool $replace = true) diff --git a/src/Illuminate/Support/Facades/Request.php b/src/Illuminate/Support/Facades/Request.php index ede894a3b5d3..cc491e21250d 100755 --- a/src/Illuminate/Support/Facades/Request.php +++ b/src/Illuminate/Support/Facades/Request.php @@ -66,8 +66,8 @@ * @method static string normalizeQueryString(string|null $qs) * @method static void enableHttpMethodParameterOverride() * @method static bool getHttpMethodParameterOverride() - * @method static void setAllowedHttpMethodOverride(array|null $methods) - * @method static array|null getAllowedHttpMethodOverride() + * @method static void setAllowedHttpMethodOverride(string[]|null $methods) + * @method static string[]|null getAllowedHttpMethodOverride() * @method static bool hasPreviousSession() * @method static void setSession(\Symfony\Component\HttpFoundation\Session\SessionInterface $session) * @method static array getClientIps()