diff --git a/.github/workflows/databases.yml b/.github/workflows/databases.yml index 96ab3c911a9b..3be7f33c487b 100644 --- a/.github/workflows/databases.yml +++ b/.github/workflows/databases.yml @@ -5,7 +5,7 @@ on: branches: - master - '*.x' - pull_request: + # pull_request: jobs: mysql_57: diff --git a/.github/workflows/queues.yml b/.github/workflows/queues.yml index de3043ba01f3..ed533b6ce243 100644 --- a/.github/workflows/queues.yml +++ b/.github/workflows/queues.yml @@ -5,7 +5,7 @@ on: branches: - master - '*.x' - pull_request: + # pull_request: jobs: sync: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b3624859ce0c..fffeaa3de2cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,10 +37,10 @@ jobs: - 8888:8000 strategy: - fail-fast: true + fail-fast: false matrix: - php: [8.2, 8.3] - phpunit: ['10.5', '11.0.1'] + php: [8.4] + phpunit: ['10.5.12', '11.3.2'] stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }} @@ -53,7 +53,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp, :php-psr + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis-6.1.0, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp, :php-psr ini-values: error_reporting=E_ALL tools: composer:v2 coverage: none @@ -71,22 +71,25 @@ jobs: max_attempts: 5 command: composer require guzzlehttp/psr7:^2.4 --no-interaction --no-update - - name: Set PHPUnit + - name: Set minimum PHP 8.4 versions uses: nick-fields/retry@v3 with: timeout_minutes: 5 max_attempts: 5 - command: composer require phpunit/phpunit:^${{ matrix.phpunit }} --dev --no-interaction --no-update + command: composer require "laravel/serializable-closure:^2.0" nesbot/carbon:^3.4" "guzzlehttp/promises:^2.0.3" "symfony/contracts:^3.4.2" "symfony/string:^7.0.3" "symfony/translation:^7.0.3" "mtdowling/jmespath.php:^2.8.0" "league/mime-type-detection:^1.16.0" --no-interaction --no-update - name: Install dependencies uses: nick-fields/retry@v3 with: timeout_minutes: 5 max_attempts: 5 - command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress --with=phpunit/phpunit:^${{ matrix.phpunit }} + + - name: Installed dependencies + run: composer show -D - name: Execute tests - run: vendor/bin/phpunit --display-deprecation + run: vendor/bin/phpunit --display-deprecation --fail-on-deprecation env: DB_PORT: ${{ job.services.mysql.ports[3306] }} DB_USERNAME: root @@ -103,71 +106,71 @@ jobs: vendor/orchestra/testbench-core/laravel/storage/logs !vendor/**/.gitignore - windows_tests: - runs-on: windows-2022 - - strategy: - fail-fast: true - matrix: - php: [8.2, 8.3] - phpunit: ['10.5', '11.0.1'] - stability: [prefer-lowest, prefer-stable] - - name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }} - Windows - - steps: - - name: Set git to use LF - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp, redis, memcached, gmp, intl, :php-psr - tools: composer:v2 - coverage: none - - - name: Set Framework version - run: composer config version "11.x-dev" - - - name: Set Minimum PHP 8.2 Versions - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer require guzzlehttp/psr7:^2.4 --no-interaction --no-update - shell: bash - - - name: Set PHPUnit - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer require phpunit/phpunit:^${{ matrix.phpunit }} --dev --no-interaction --no-update - shell: bash - - - name: Install dependencies - uses: nick-fields/retry@v3 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit - env: - AWS_ACCESS_KEY_ID: random_key - AWS_SECRET_ACCESS_KEY: random_secret - - - name: Store artifacts - uses: actions/upload-artifact@v4 - with: - name: windows-logs-${{ matrix.php }}-${{ matrix.phpunit }}-${{ matrix.stability }} - path: | - vendor/orchestra/testbench-core/laravel/storage/logs - !vendor/**/.gitignore + # windows_tests: + # runs-on: windows-2022 + + # strategy: + # fail-fast: true + # matrix: + # php: [8.2, 8.3] + # phpunit: ['10.5', '11.0.1'] + # stability: [prefer-lowest, prefer-stable] + + # name: PHP ${{ matrix.php }} - PHPUnit ${{ matrix.phpunit }} - ${{ matrix.stability }} - Windows + + # steps: + # - name: Set git to use LF + # run: | + # git config --global core.autocrlf false + # git config --global core.eol lf + + # - name: Checkout code + # uses: actions/checkout@v4 + + # - name: Setup PHP + # uses: shivammathur/setup-php@v2 + # with: + # php-version: ${{ matrix.php }} + # extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp, redis, memcached, gmp, intl, :php-psr + # tools: composer:v2 + # coverage: none + + # - name: Set Framework version + # run: composer config version "11.x-dev" + + # - name: Set Minimum PHP 8.2 Versions + # uses: nick-fields/retry@v3 + # with: + # timeout_minutes: 5 + # max_attempts: 5 + # command: composer require guzzlehttp/psr7:^2.4 --no-interaction --no-update + # shell: bash + + # - name: Set PHPUnit + # uses: nick-fields/retry@v3 + # with: + # timeout_minutes: 5 + # max_attempts: 5 + # command: composer require phpunit/phpunit:^${{ matrix.phpunit }} --dev --no-interaction --no-update + # shell: bash + + # - name: Install dependencies + # uses: nick-fields/retry@v3 + # with: + # timeout_minutes: 5 + # max_attempts: 5 + # command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + + # - name: Execute tests + # run: vendor/bin/phpunit + # env: + # AWS_ACCESS_KEY_ID: random_key + # AWS_SECRET_ACCESS_KEY: random_secret + + # - name: Store artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: windows-logs-${{ matrix.php }}-${{ matrix.phpunit }}-${{ matrix.stability }} + # path: | + # vendor/orchestra/testbench-core/laravel/storage/logs + # !vendor/**/.gitignore diff --git a/composer.json b/composer.json index b035062f8f4c..0b0b355cc0cc 100644 --- a/composer.json +++ b/composer.json @@ -26,36 +26,37 @@ "composer-runtime-api": "^2.2", "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", "doctrine/inflector": "^2.0.5", - "dragonmantank/cron-expression": "^3.3.2", + "dragonmantank/cron-expression": "^3.4", "egulias/email-validator": "^3.2.1|^4.0", "fruitcake/php-cors": "^1.3", - "guzzlehttp/guzzle": "^7.8", + "guzzlehttp/guzzle": "^7.8.2", "guzzlehttp/uri-template": "^1.0", "laravel/prompts": "^0.1.18|^0.2.0|^0.3.0", - "laravel/serializable-closure": "^1.3", + "laravel/serializable-closure": "^1.3|^2.0", "league/commonmark": "^2.2.1", - "league/flysystem": "^3.8.0", + "league/flysystem": "^3.25.1", + "league/flysystem-local": "^3.25.1", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.72.2|^3.0", + "nesbot/carbon": "^2.72.2|^3.4", "nunomaduro/termwind": "^2.0", "psr/container": "^1.1.1|^2.0.1", "psr/log": "^1.0|^2.0|^3.0", "psr/simple-cache": "^1.0|^2.0|^3.0", "ramsey/uuid": "^4.7", - "symfony/console": "^7.0", - "symfony/error-handler": "^7.0", - "symfony/finder": "^7.0", - "symfony/http-foundation": "^7.0", - "symfony/http-kernel": "^7.0", - "symfony/mailer": "^7.0", - "symfony/mime": "^7.0", - "symfony/polyfill-php83": "^1.28", - "symfony/process": "^7.0", - "symfony/routing": "^7.0", - "symfony/uid": "^7.0", - "symfony/var-dumper": "^7.0", + "symfony/console": "^7.0.3", + "symfony/error-handler": "^7.0.3", + "symfony/finder": "^7.0.3", + "symfony/http-foundation": "^7.0.3", + "symfony/http-kernel": "^7.0.3", + "symfony/mailer": "^7.0.3", + "symfony/mime": "^7.0.3", + "symfony/polyfill-php83": "^1.30", + "symfony/process": "^7.0.3", + "symfony/routing": "^7.0.3", + "symfony/uid": "^7.0.3", + "symfony/var-dumper": "^7.0.3", "tijsverkoyen/css-to-inline-styles": "^2.2.5", - "vlucas/phpdotenv": "^5.4.1", + "vlucas/phpdotenv": "^5.6.1", "voku/portable-ascii": "^2.0" }, "replace": { @@ -98,24 +99,25 @@ "require-dev": { "ext-gmp": "*", "ably/ably-php": "^1.0", - "aws/aws-sdk-php": "^3.235.5", + "aws/aws-sdk-php": "^3.322.9", "fakerphp/faker": "^1.23", - "league/flysystem-aws-s3-v3": "^3.0", - "league/flysystem-ftp": "^3.0", - "league/flysystem-path-prefixing": "^3.3", - "league/flysystem-read-only": "^3.3", - "league/flysystem-sftp-v3": "^3.0", - "mockery/mockery": "^1.6", + "league/flysystem-aws-s3-v3": "^3.25.1", + "league/flysystem-ftp": "^3.25.1", + "league/flysystem-path-prefixing": "^3.25.1", + "league/flysystem-read-only": "^3.25.1", + "league/flysystem-sftp-v3": "^3.25.1", + "mockery/mockery": "^1.6.10", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.5", - "pda/pheanstalk": "^5.0", + "orchestra/testbench-core": "9.x-dev", + "pda/pheanstalk": "^5.0.6", "phpstan/phpstan": "^1.11.5", - "phpunit/phpunit": "^10.5|^11.0", - "predis/predis": "^2.0.2", + "phpunit/phpunit": "^10.5.35|^11.3.6", + "predis/predis": "v2.x-dev", "resend/resend-php": "^0.10.0", - "symfony/cache": "^7.0", - "symfony/http-client": "^7.0", - "symfony/psr-http-message-bridge": "^7.0" + "symfony/cache": "^7.0.3", + "symfony/http-client": "^7.0.3", + "symfony/psr-http-message-bridge": "^7.0.3", + "nette/schema": "^1.3.1" }, "conflict": { "mockery/mockery": "1.6.8", @@ -169,21 +171,21 @@ "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).", "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).", "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", "laravel/tinker": "Required to use the tinker console command (^2.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", - "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", - "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", - "league/flysystem-read-only": "Required to use read-only disks (^3.3)", - "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.25.1).", + "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", "mockery/mockery": "Required to use mocking (^1.6).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", "phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).", - "predis/predis": "Required to use the predis connector (^2.0.2).", + "predis/predis": "Required to use the predis connector (^2.2.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", diff --git a/src/Illuminate/Console/composer.json b/src/Illuminate/Console/composer.json index 060355b3c3a1..363a59f2738e 100755 --- a/src/Illuminate/Console/composer.json +++ b/src/Illuminate/Console/composer.json @@ -23,9 +23,9 @@ "illuminate/view": "^11.0", "laravel/prompts": "^0.1.20|^0.2|^0.3", "nunomaduro/termwind": "^2.0", - "symfony/console": "^7.0", - "symfony/polyfill-php83": "^1.28", - "symfony/process": "^7.0" + "symfony/console": "^7.0.3", + "symfony/polyfill-php83": "^1.30", + "symfony/process": "^7.0.3" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Cookie/composer.json b/src/Illuminate/Cookie/composer.json index e8514738ce54..79c80672d0b2 100755 --- a/src/Illuminate/Cookie/composer.json +++ b/src/Illuminate/Cookie/composer.json @@ -20,8 +20,8 @@ "illuminate/contracts": "^11.0", "illuminate/macroable": "^11.0", "illuminate/support": "^11.0", - "symfony/http-foundation": "^7.0", - "symfony/http-kernel": "^7.0" + "symfony/http-foundation": "^7.0.3", + "symfony/http-kernel": "^7.0.3" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Filesystem/composer.json b/src/Illuminate/Filesystem/composer.json index 95ee6851a485..bb9ecc66237c 100644 --- a/src/Illuminate/Filesystem/composer.json +++ b/src/Illuminate/Filesystem/composer.json @@ -19,7 +19,7 @@ "illuminate/contracts": "^11.0", "illuminate/macroable": "^11.0", "illuminate/support": "^11.0", - "symfony/finder": "^7.0" + "symfony/finder": "^7.0.3" }, "autoload": { "psr-4": { @@ -39,10 +39,10 @@ "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-hash": "Required to use the Filesystem class.", "illuminate/http": "Required for handling uploaded files (^7.0).", - "league/flysystem": "Required to use the Flysystem local driver (^3.0.16).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", - "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", - "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "league/flysystem": "Required to use the Flysystem local driver (^3.25.1).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", "symfony/mime": "Required to enable support for guessing extensions (^7.0)." diff --git a/src/Illuminate/Http/composer.json b/src/Illuminate/Http/composer.json index 9222aedd597b..3e7e7f7a7f0a 100755 --- a/src/Illuminate/Http/composer.json +++ b/src/Illuminate/Http/composer.json @@ -17,16 +17,16 @@ "php": "^8.2", "ext-filter": "*", "fruitcake/php-cors": "^1.3", - "guzzlehttp/guzzle": "^7.8", + "guzzlehttp/guzzle": "^7.8.2", "guzzlehttp/uri-template": "^1.0", "illuminate/collections": "^11.0", "illuminate/macroable": "^11.0", "illuminate/session": "^11.0", "illuminate/support": "^11.0", - "symfony/http-foundation": "^7.0", - "symfony/http-kernel": "^7.0", - "symfony/polyfill-php83": "^1.28", - "symfony/mime": "^7.0" + "symfony/http-foundation": "^7.0.3", + "symfony/http-kernel": "^7.0.3", + "symfony/polyfill-php83": "^1.30", + "symfony/mime": "^7.0.3" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Mail/composer.json b/src/Illuminate/Mail/composer.json index cf00d7cc483c..f81532e654cc 100755 --- a/src/Illuminate/Mail/composer.json +++ b/src/Illuminate/Mail/composer.json @@ -22,7 +22,7 @@ "illuminate/support": "^11.0", "league/commonmark": "^2.2", "psr/log": "^1.0|^2.0|^3.0", - "symfony/mailer": "^7.0", + "symfony/mailer": "^7.0.3", "tijsverkoyen/css-to-inline-styles": "^2.2.5" }, "autoload": { @@ -36,7 +36,7 @@ } }, "suggest": { - "aws/aws-sdk-php": "Required to use the SES mail driver (^3.235.5).", + "aws/aws-sdk-php": "Required to use the SES mail driver (^3.322.9).", "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", "symfony/http-client": "Required to use the Symfony API mail transports (^7.0).", "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.0).", diff --git a/src/Illuminate/Process/composer.json b/src/Illuminate/Process/composer.json index 1fecb13ba822..0425904ef047 100644 --- a/src/Illuminate/Process/composer.json +++ b/src/Illuminate/Process/composer.json @@ -19,7 +19,7 @@ "illuminate/contracts": "^11.0", "illuminate/macroable": "^11.0", "illuminate/support": "^11.0", - "symfony/process": "^7.0" + "symfony/process": "^7.0.3" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Queue/composer.json b/src/Illuminate/Queue/composer.json index 54fddacecb46..a2e0ce710928 100644 --- a/src/Illuminate/Queue/composer.json +++ b/src/Illuminate/Queue/composer.json @@ -25,7 +25,7 @@ "illuminate/support": "^11.0", "laravel/serializable-closure": "^1.2.2", "ramsey/uuid": "^4.7", - "symfony/process": "^7.0" + "symfony/process": "^7.0.3" }, "autoload": { "psr-4": { @@ -43,7 +43,7 @@ "ext-mbstring": "Required to use the database failed job providers.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "aws/aws-sdk-php": "Required to use the SQS queue driver and DynamoDb failed job storage (^3.235.5).", + "aws/aws-sdk-php": "Required to use the SQS queue driver and DynamoDb failed job storage (^3.322.9).", "illuminate/redis": "Required to use the Redis queue driver (^11.0).", "pda/pheanstalk": "Required to use the Beanstalk queue driver (^5.0)." }, diff --git a/src/Illuminate/Redis/composer.json b/src/Illuminate/Redis/composer.json index 643d294b78f6..5172ea812223 100755 --- a/src/Illuminate/Redis/composer.json +++ b/src/Illuminate/Redis/composer.json @@ -27,7 +27,7 @@ }, "suggest": { "ext-redis": "Required to use the phpredis connector (^4.0|^5.0|^6.0).", - "predis/predis": "Required to use the predis connector (^2.0.2)." + "predis/predis": "Required to use the predis connector (^2.2.0)." }, "extra": { "branch-alias": { diff --git a/src/Illuminate/Routing/composer.json b/src/Illuminate/Routing/composer.json index a9c4b8a78810..ab9ed96d7777 100644 --- a/src/Illuminate/Routing/composer.json +++ b/src/Illuminate/Routing/composer.json @@ -25,9 +25,9 @@ "illuminate/pipeline": "^11.0", "illuminate/session": "^11.0", "illuminate/support": "^11.0", - "symfony/http-foundation": "^7.0", - "symfony/http-kernel": "^7.0", - "symfony/routing": "^7.0" + "symfony/http-foundation": "^7.0.3", + "symfony/http-kernel": "^7.0.3", + "symfony/routing": "^7.0.3" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Session/composer.json b/src/Illuminate/Session/composer.json index 56789edc0f78..fe0a93c1eac3 100755 --- a/src/Illuminate/Session/composer.json +++ b/src/Illuminate/Session/composer.json @@ -21,8 +21,8 @@ "illuminate/contracts": "^11.0", "illuminate/filesystem": "^11.0", "illuminate/support": "^11.0", - "symfony/finder": "^7.0", - "symfony/http-foundation": "^7.0" + "symfony/finder": "^7.0.3", + "symfony/http-foundation": "^7.0.3" }, "autoload": { "psr-4": { diff --git a/src/Illuminate/Support/composer.json b/src/Illuminate/Support/composer.json index 3da999fd887f..c927d1e5eab3 100644 --- a/src/Illuminate/Support/composer.json +++ b/src/Illuminate/Support/composer.json @@ -23,7 +23,7 @@ "illuminate/conditionable": "^11.0", "illuminate/contracts": "^11.0", "illuminate/macroable": "^11.0", - "nesbot/carbon": "^2.72.2|^3.0", + "nesbot/carbon": "^2.72.2|^3.4", "voku/portable-ascii": "^2.0" }, "conflict": { @@ -54,7 +54,7 @@ "symfony/process": "Required to use the composer class (^7.0).", "symfony/uid": "Required to use Str::ulid() (^7.0).", "symfony/var-dumper": "Required to use the dd function (^7.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.6.1)." }, "config": { "sort-packages": true diff --git a/src/Illuminate/Validation/ValidationRuleParser.php b/src/Illuminate/Validation/ValidationRuleParser.php index f803540fa2a9..9d9c7166593a 100644 --- a/src/Illuminate/Validation/ValidationRuleParser.php +++ b/src/Illuminate/Validation/ValidationRuleParser.php @@ -282,7 +282,7 @@ protected static function parseStringRule($rule) */ protected static function parseParameters($rule, $parameter) { - return static::ruleIsRegex($rule) ? [$parameter] : str_getcsv($parameter); + return static::ruleIsRegex($rule) ? [$parameter] : str_getcsv($parameter, escape: '\\'); } /** diff --git a/src/Illuminate/Validation/composer.json b/src/Illuminate/Validation/composer.json index ac4f997747a0..dfd137f0c3d1 100755 --- a/src/Illuminate/Validation/composer.json +++ b/src/Illuminate/Validation/composer.json @@ -25,8 +25,8 @@ "illuminate/macroable": "^11.0", "illuminate/support": "^11.0", "illuminate/translation": "^11.0", - "symfony/http-foundation": "^7.0", - "symfony/mime": "^7.0" + "symfony/http-foundation": "^7.0.3", + "symfony/mime": "^7.0.3" }, "autoload": { "psr-4": { diff --git a/tests/Validation/ValidationUniqueRuleTest.php b/tests/Validation/ValidationUniqueRuleTest.php index 69212ab4063e..8b4c85054ca5 100644 --- a/tests/Validation/ValidationUniqueRuleTest.php +++ b/tests/Validation/ValidationUniqueRuleTest.php @@ -57,8 +57,8 @@ public function testItCorrectlyFormatsAStringVersionOfTheRule() $rule->ignore('Taylor, Otwell"\'..-"', 'id_column'); $rule->where('foo', 'bar'); $this->assertSame('unique:table,column,"Taylor, Otwell\"\\\'..-\"",id_column,foo,"bar"', (string) $rule); - $this->assertSame('Taylor, Otwell"\'..-"', stripslashes(str_getcsv('table,column,"Taylor, Otwell\"\\\'..-\"",id_column,foo,"bar"')[2])); - $this->assertSame('id_column', stripslashes(str_getcsv('table,column,"Taylor, Otwell\"\\\'..-\"",id_column,foo,"bar"')[3])); + $this->assertSame('Taylor, Otwell"\'..-"', stripslashes(str_getcsv('table,column,"Taylor, Otwell\"\\\'..-\"",id_column,foo,"bar"', escape: '\\')[2])); + $this->assertSame('id_column', stripslashes(str_getcsv('table,column,"Taylor, Otwell\"\\\'..-\"",id_column,foo,"bar"', escape: '\\')[3])); $rule = new Unique('table', 'column'); $rule->ignore(null, 'id_column');