Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] Remove unused parameter $connection #51330

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4dcd347
fix: incorrect parameter name in SesV2Transport (#51265)
Tietew May 2, 2024
99a7995
[11.x] Add Databases nightly workflow (#51218)
Jubeki May 3, 2024
f827673
Update databases-nightly.yml
driesvints May 3, 2024
d52c640
resend
taylorotwell May 3, 2024
17f3aa2
update "min" and "max" rule comments (#51274)
browner12 May 3, 2024
5f0bced
fix namespace and improvement PSR in ClassMakeCommandTest.php (#51280)
saMahmoudzadeh May 3, 2024
8f9cba8
improvement test coverage for view components. (#51271)
saMahmoudzadeh May 3, 2024
8c684a2
[11.x] Introduce method `Rule::array()` (#51250)
Jacobs63 May 3, 2024
2f9a217
Fix docblock for collection pluck methods (#51295)
SanderMuller May 5, 2024
7269425
[11.x] Add tests for handling non-baked enum and empty string request…
hrant1020 May 5, 2024
2dee1de
blank and filled now support stringable (#51300)
lava83 May 5, 2024
a8829f7
[11.x] Fix ratio validation for high ratio images (#51296)
ahmedbally May 5, 2024
6a08fce
[11.x] Add int|float support to e method (#51314)
trippo May 6, 2024
580ffe1
[11.x] Add release notes (#51310)
driesvints May 6, 2024
c9d2ba0
[11.x] `Stringable` is also an interface of symfony (#51309)
lava83 May 6, 2024
7161dff
add some tests and improvement test coverage for Str::camel (#51308)
saMahmoudzadeh May 6, 2024
dbcad29
using ?? operator (Null Coalescing Operator) (#51305)
saMahmoudzadeh May 6, 2024
279c444
[11.x] Add ability to override the default loading cached Routes for …
ahmedabdel3al May 6, 2024
2a32afb
[11.x] Add ->whereJsonOverlaps() for mysql (#51288)
parkourben99 May 6, 2024
451247f
[11.x] Add `InteractsWithInput` methods to `ValidatedInput` (#51316)
aydinfatih May 6, 2024
5710fdb
[11.x] Adding PasswordResetLinkSent event (#51253)
Muffinman May 6, 2024
d4119d7
wip
driesvints May 7, 2024
e5ac72f
Update version to v11.7.0
driesvints May 7, 2024
869c1d9
Update CHANGELOG.md
driesvints May 7, 2024
f71aa49
remove $connection as unused parameter from addFluentCommands, addFlu…
saMahmoudzadeh May 7, 2024
9dd56aa
Merge branch 'laravel:11.x' into fix/blueprint
saMahmoudzadeh May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/databases-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: databases-nightly

on:
schedule:
- cron: '0 0 * * *'

jobs:

mariadb:
runs-on: ubuntu-22.04
continue-on-error: true

services:
mariadb:
image: quay.io/mariadb-foundation/mariadb-devel:verylatest
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
MARIADB_DATABASE: laravel
ports:
- 3306:3306
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3

strategy:
fail-fast: true

name: MariaDB Very Latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr
tools: composer:v2
coverage: none

- name: Set Framework version
run: composer config version "11.x-dev"

- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit tests/Integration/Database
env:
DB_CONNECTION: mariadb
76 changes: 38 additions & 38 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,41 +79,41 @@ jobs:
bash ./bin/release.sh v${{ steps.version.outputs.version }}
script_stop: true

- name: Generate release notes
id: generated-notes
uses: RedCrafter07/release-notes-action@main
with:
tag-name: v${{ steps.version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}

- name: Cleanup release notes
id: cleaned-notes
run: |
RELEASE_NOTES=$(echo $RELEASE_NOTES | sed '/## What/d')
RELEASE_NOTES=$(echo $RELEASE_NOTES | sed '/## New Contributors/,$d')
echo "notes=${RELEASE_NOTES}" >> "$GITHUB_OUTPUT"
env:
RELEASE_NOTES: ${{ steps.generated-notes.outputs.release-notes }}

- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
name: v${{ steps.version.outputs.version }}
body: ${{ steps.cleaned-notes.outputs.notes }}
target_commitish: ${{ github.ref_name }}
make_latest: 'legacy'

update-changelog:
needs: release

name: Update changelog

uses: laravel/.github/.github/workflows/update-changelog.yml@main
with:
branch: ${{ github.ref_name }}
version: "v${{ needs.release.outputs.version }}"
notes: ${{ needs.release.outputs.notes }}
# - name: Generate release notes
# id: generated-notes
# uses: RedCrafter07/release-notes-action@main
# with:
# tag-name: v${{ steps.version.outputs.version }}
# token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref_name }}

# - name: Cleanup release notes
# id: cleaned-notes
# run: |
# RELEASE_NOTES=$(echo $RELEASE_NOTES | sed '/## What/d')
# RELEASE_NOTES=$(echo $RELEASE_NOTES | sed '/## New Contributors/,$d')
# echo "notes=${RELEASE_NOTES}" >> "$GITHUB_OUTPUT"
# env:
# RELEASE_NOTES: ${{ steps.generated-notes.outputs.release-notes }}

# - name: Create release
# uses: softprops/action-gh-release@v2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: v${{ steps.version.outputs.version }}
# name: v${{ steps.version.outputs.version }}
# body: ${{ steps.cleaned-notes.outputs.notes }}
# target_commitish: ${{ github.ref_name }}
# make_latest: 'legacy'

# update-changelog:
# needs: release

# name: Update changelog

# uses: laravel/.github/.github/workflows/update-changelog.yml@main
# with:
# branch: ${{ github.ref_name }}
# version: "v${{ needs.release.outputs.version }}"
# notes: ${{ needs.release.outputs.notes }}
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# Release Notes for 11.x

## [Unreleased](https://github.com/laravel/framework/compare/v11.6.0...11.x)
## [Unreleased](https://github.com/laravel/framework/compare/v11.7.0...11.x)

## [v11.7.0](https://github.com/laravel/framework/compare/v11.6.0...v11.7.0) - 2024-05-07

* [11.x] Fix SesV2Transport to use correct `EmailTags` argument by @Tietew in https://github.com/laravel/framework/pull/51265
* [11.x] Add Databases nightly workflow by @Jubeki in https://github.com/laravel/framework/pull/51218
* [11.x] update "min" and "max" rule comments by @browner12 in https://github.com/laravel/framework/pull/51274
* [11.x] Fix namespace and improvement PSR in `ClassMakeCommandTest.php` by @saMahmoudzadeh in https://github.com/laravel/framework/pull/51280
* [11.x] improvement test coverage for view components. by @saMahmoudzadeh in https://github.com/laravel/framework/pull/51271
* [11.x] Introduce method `Rule::array()` by @Jacobs63 in https://github.com/laravel/framework/pull/51250
* [11.x] Fix docblock for collection pluck methods by @SanderMuller in https://github.com/laravel/framework/pull/51295
* [11.x] Add tests for handling non-baked enum and empty string requests by @hrant1020 in https://github.com/laravel/framework/pull/51289
* blank and filled now support stringable by @lava83 in https://github.com/laravel/framework/pull/51300
* [11.x] Fix ratio validation for high ratio images by @ahmedbally in https://github.com/laravel/framework/pull/51296
* [11.x] Add int|float support to e method by @trippo in https://github.com/laravel/framework/pull/51314
* [11.x] Add release notes by @driesvints in https://github.com/laravel/framework/pull/51310
* [11.x] `Stringable` is also an interface of symfony by @lava83 in https://github.com/laravel/framework/pull/51309
* [11.x] Add some tests and improvement test coverage for `Str::camel` by @saMahmoudzadeh in https://github.com/laravel/framework/pull/51308
* [11.x] Using the `??` Operator (Null Coalescing Operator) by @saMahmoudzadeh in https://github.com/laravel/framework/pull/51305
* [11.x] Add ability to override the default loading cached Routes for application by @ahmedabdel3al in https://github.com/laravel/framework/pull/51292
* [11.x] Add ->whereJsonOverlaps() for mysql by @parkourben99 in https://github.com/laravel/framework/pull/51288
* [11.x] Add `InteractsWithInput` methods to `ValidatedInput` by @aydinfatih in https://github.com/laravel/framework/pull/51316
* [11.x] Adding PasswordResetLinkSent event by @Muffinman in https://github.com/laravel/framework/pull/51253

## [v11.6.0](https://github.com/laravel/framework/compare/v11.5.0...v11.6.0) - 2024-04-30

Expand Down
5 changes: 5 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release Instructions

Go to the ["manual release" GitHub Action](https://github.com/laravel/framework/actions/workflows/releases.yml). Then, choose "Run workflow", select the correct branch, and enter the version you wish to release. Next, press "Run workflow" to execute the action. The workflow will automatically update the version in `Application.php`, tag a new release, run the splitter script for the Illuminate components, generate release notes, create a GitHub Release, and update the `CHANGELOG.md` file.

<img width="400" alt="Screenshot 2024-05-06 at 10 46 04" src="https://github.com/laravel/framework/assets/594614/4dc5efc8-946e-4e96-9e79-8e26f92ea354">
7 changes: 6 additions & 1 deletion config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
| your mailers below. You may also add additional mailers if needed.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "log", "array", "failover", "roundrobin"
| "postmark", "resend", "log", "array",
| "failover", "roundrobin"
|
*/

Expand Down Expand Up @@ -60,6 +61,10 @@
// ],
],

'resend' => [
'transport' => 'resend',
],

'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
Expand Down
28 changes: 28 additions & 0 deletions src/Illuminate/Auth/Events/PasswordResetLinkSent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Illuminate\Auth\Events;

use Illuminate\Queue\SerializesModels;

class PasswordResetLinkSent
{
use SerializesModels;

/**
* The user instance.
*
* @var \Illuminate\Contracts\Auth\CanResetPassword
*/
public $user;

/**
* Create a new event instance.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @return void
*/
public function __construct($user)
{
$this->user = $user;
}
}
17 changes: 16 additions & 1 deletion src/Illuminate/Auth/Passwords/PasswordBroker.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
namespace Illuminate\Auth\Passwords;

use Closure;
use Illuminate\Auth\Events\PasswordResetLinkSent;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Contracts\Auth\PasswordBroker as PasswordBrokerContract;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\Arr;
use UnexpectedValueException;

Expand All @@ -25,17 +27,26 @@ class PasswordBroker implements PasswordBrokerContract
*/
protected $users;

/**
* The event dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;

/**
* Create a new password broker instance.
*
* @param \Illuminate\Auth\Passwords\TokenRepositoryInterface $tokens
* @param \Illuminate\Contracts\Auth\UserProvider $users
* @param \Illuminate\Contracts\Events\Dispatcher $users
* @return void
*/
public function __construct(TokenRepositoryInterface $tokens, UserProvider $users)
public function __construct(TokenRepositoryInterface $tokens, UserProvider $users, ?Dispatcher $dispatcher = null)
{
$this->users = $users;
$this->tokens = $tokens;
$this->events = $dispatcher;
}

/**
Expand Down Expand Up @@ -71,6 +82,10 @@ public function sendResetLink(array $credentials, ?Closure $callback = null)
// the current URI having nothing set in the session to indicate errors.
$user->sendPasswordResetNotification($token);

if ($this->events) {
$this->events->dispatch(new PasswordResetLinkSent($user));
}

return static::RESET_LINK_SENT;
}

Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ protected function resolve($name)
// aggregate service of sorts providing a convenient interface for resets.
return new PasswordBroker(
$this->createTokenRepository($config),
$this->app['auth']->createUserProvider($config['provider'] ?? null)
$this->app['auth']->createUserProvider($config['provider'] ?? null),
$this->app['events'] ?? null,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ public function last(?callable $callback = null, $default = null)
/**
* Get the values of a given key.
*
* @param string|int|array<array-key, string> $value
* @param string|int|array<array-key, string>|null $value
* @param string|null $key
* @return static<array-key, mixed>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ public function pad($size, $value)
/**
* Get an array with the values of a given key.
*
* @param string|array<array-key, string> $value
* @param string|array<array-key, string>|null $value
* @param string|null $key
* @return \Illuminate\Support\Collection<array-key, mixed>
*/
Expand Down
59 changes: 59 additions & 0 deletions src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,65 @@ public function orWhereJsonDoesntContain($column, $value)
return $this->whereJsonDoesntContain($column, $value, 'or');
}

/**
* Add a "where JSON overlaps" clause to the query.
*
* @param string $column
* @param mixed $value
* @param string $boolean
* @param bool $not
* @return $this
*/
public function whereJsonOverlaps($column, $value, $boolean = 'and', $not = false)
{
$type = 'JsonOverlaps';

$this->wheres[] = compact('type', 'column', 'value', 'boolean', 'not');

if (! $value instanceof ExpressionContract) {
$this->addBinding($this->grammar->prepareBindingForJsonContains($value));
}

return $this;
}

/**
* Add an "or where JSON overlaps" clause to the query.
*
* @param string $column
* @param mixed $value
* @return $this
*/
public function orWhereJsonOverlaps($column, $value)
{
return $this->whereJsonOverlaps($column, $value, 'or');
}

/**
* Add a "where JSON not overlap" clause to the query.
*
* @param string $column
* @param mixed $value
* @param string $boolean
* @return $this
*/
public function whereJsonDoesntOverlap($column, $value, $boolean = 'and')
{
return $this->whereJsonOverlaps($column, $value, $boolean, true);
}

/**
* Add an "or where JSON not overlap" clause to the query.
*
* @param string $column
* @param mixed $value
* @return $this
*/
public function orWhereJsonDoesntOverlap($column, $value)
{
return $this->whereJsonDoesntOverlap($column, $value, 'or');
}

/**
* Add a clause that determines if a JSON path exists to the query.
*
Expand Down