Skip to content

Commit

Permalink
Merge branch '7.x' of git://github.com/laravel/framework into fix-mor…
Browse files Browse the repository at this point in the history
…ph-pivot-delete
  • Loading branch information
ThomasTrost committed Apr 17, 2020
2 parents 3c69296 + c9de4a9 commit 3a9e020
Show file tree
Hide file tree
Showing 502 changed files with 14,494 additions and 6,104 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/1_Bug_report.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
name: "Bug report"
about: 'Report a general framework issue. Please ensure your Laravel version is still supported: https://laravel.com/docs/releases#support-policy'
about: "Report something that's broken. Please ensure your Laravel version is still supported: https://laravel.com/docs/releases#support-policy"
---

<!-- DO NOT THROW THIS AWAY -->
<!-- Fill out the FULL versions with patch versions -->

- Laravel Version: #.#.#
- PHP Version: #.#.#
- Database Driver & Version:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ contact_links:
- name: Feature request
url: https://github.com/laravel/ideas/issues
about: 'For ideas or feature requests, open up an issue on the Laravel ideas repository'
- name: Support question
- name: Support Questions & Other
url: https://laravel.com/docs/contributions#support-questions
about: 'This repository is only for reporting bugs. If you need help using the library, click:'
about: 'This repository is only for reporting bugs. If you have a question or need help using the library, click:'
- name: Documentation issue
url: https://github.com/laravel/docs
about: For documentation issues, open a pull request at the laravel/docs repository
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
php: [7.2, 7.3, 7.4]
stability: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - S${{ matrix.stability }}
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

steps:
- name: Checkout code
Expand All @@ -53,11 +53,10 @@ jobs:
uses: niden/actions-memcached@v7

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit --verbose
env:
CI: ${{ secrets.CI }}
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
581 changes: 0 additions & 581 deletions CHANGELOG-5.8.md

This file was deleted.

300 changes: 300 additions & 0 deletions CHANGELOG-7.x.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
<p align="center"><a href="https://laravel.com" target="_blank" rel="noopener"><img src="https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg" width="400"></a></p>

<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
Expand Down
4 changes: 2 additions & 2 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ then
exit 1
fi

RELEASE_BRANCH="6.x"
RELEASE_BRANCH="7.x"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
VERSION=$1

Expand Down Expand Up @@ -52,7 +52,7 @@ git tag $VERSION
git push origin --tags

# Tag Components
for REMOTE in auth broadcasting bus cache config console container contracts cookie database encryption events filesystem hashing http log mail notifications pagination pipeline queue redis routing session support translation validation view
for REMOTE in auth broadcasting bus cache config console container contracts cookie database encryption events filesystem hashing http log mail notifications pagination pipeline queue redis routing session support testing translation validation view
do
echo ""
echo ""
Expand Down
4 changes: 3 additions & 1 deletion bin/split.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
set -x

CURRENT_BRANCH="6.x"
CURRENT_BRANCH="7.x"

function split()
{
Expand Down Expand Up @@ -43,6 +43,7 @@ remote redis [email protected]:illuminate/redis.git
remote routing [email protected]:illuminate/routing.git
remote session [email protected]:illuminate/session.git
remote support [email protected]:illuminate/support.git
remote testing [email protected]:illuminate/testing.git
remote translation [email protected]:illuminate/translation.git
remote validation [email protected]:illuminate/validation.git
remote view [email protected]:illuminate/view.git
Expand Down Expand Up @@ -72,6 +73,7 @@ split 'src/Illuminate/Redis' redis
split 'src/Illuminate/Routing' routing
split 'src/Illuminate/Session' session
split 'src/Illuminate/Support' support
split 'src/Illuminate/Testing' testing
split 'src/Illuminate/Translation' translation
split 'src/Illuminate/Validation' validation
split 'src/Illuminate/View' view
55 changes: 30 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.2.5",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
Expand All @@ -24,23 +24,25 @@
"egulias/email-validator": "^2.1.10",
"league/commonmark": "^1.3",
"league/flysystem": "^1.0.8",
"monolog/monolog": "^1.12|^2.0",
"nesbot/carbon": "^2.0",
"monolog/monolog": "^2.0",
"nesbot/carbon": "^2.17",
"opis/closure": "^3.1",
"psr/container": "^1.0",
"psr/simple-cache": "^1.0",
"ramsey/uuid": "^3.7",
"ramsey/uuid": "^3.7|^4.0",
"swiftmailer/swiftmailer": "^6.0",
"symfony/console": "^4.3.4",
"symfony/debug": "^4.3.4",
"symfony/finder": "^4.3.4",
"symfony/http-foundation": "^4.3.4",
"symfony/http-kernel": "^4.3.4",
"symfony/process": "^4.3.4",
"symfony/routing": "^4.3.4",
"symfony/var-dumper": "^4.3.4",
"tijsverkoyen/css-to-inline-styles": "^2.2.1",
"vlucas/phpdotenv": "^3.3"
"symfony/console": "^5.0",
"symfony/error-handler": "^5.0",
"symfony/finder": "^5.0",
"symfony/http-foundation": "^5.0",
"symfony/http-kernel": "^5.0",
"symfony/mime": "^5.0",
"symfony/process": "^5.0",
"symfony/routing": "^5.0",
"symfony/var-dumper": "^5.0",
"tijsverkoyen/css-to-inline-styles": "^2.2.2",
"vlucas/phpdotenv": "^4.0",
"voku/portable-ascii": "^1.4.8"
},
"replace": {
"illuminate/auth": "self.version",
Expand Down Expand Up @@ -68,26 +70,27 @@
"illuminate/routing": "self.version",
"illuminate/session": "self.version",
"illuminate/support": "self.version",
"illuminate/testing": "self.version",
"illuminate/translation": "self.version",
"illuminate/validation": "self.version",
"illuminate/view": "self.version"
},
"conflict": {
"tightenco/collect": "<5.5.33"
},
"require-dev": {
"aws/aws-sdk-php": "^3.0",
"doctrine/dbal": "^2.6",
"filp/whoops": "^2.4",
"guzzlehttp/guzzle": "^6.3|^7.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0",
"league/flysystem-cached-adapter": "^1.0",
"mockery/mockery": "^1.3.1",
"moontoast/math": "^1.1",
"orchestra/testbench-core": "^4.0",
"orchestra/testbench-core": "^5.0",
"pda/pheanstalk": "^4.0",
"phpunit/phpunit": "^7.5.15|^8.4|^9.0",
"phpunit/phpunit": "^8.4|^9.0",
"predis/predis": "^1.1.1",
"symfony/cache": "^4.3.4"
"symfony/cache": "^5.0"
},
"conflict": {
"tightenco/collect": "<5.5.33"
},
"autoload": {
"files": [
Expand All @@ -108,7 +111,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "6.x-dev"
"dev-master": "7.x-dev"
}
},
"suggest": {
Expand All @@ -121,18 +124,20 @@
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
"filp/whoops": "Required for friendly error pages in development (^2.4).",
"fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).",
"guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0|^7.0).",
"guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).",
"laravel/tinker": "Required to use the tinker console command (^2.0).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
"league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
"league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).",
"mockery/mockery": "Required to use mocking (^1.3.1).",
"moontoast/math": "Required to use ordered UUIDs (^1.1).",
"nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).",
"phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.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 (^4.0).",
"symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).",
"symfony/cache": "Required to PSR-6 cache bridge (^5.0).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).",
"wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
},
"config": {
Expand Down
8 changes: 4 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
</whitelist>
</filter>
<php>
<!--
<env name="REDIS_HOST" value="127.0.0.1" />
<env name="REDIS_PORT" value="6379" />
-->
<!--
<env name="REDIS_HOST" value="127.0.0.1"/>
<env name="REDIS_PORT" value="6379"/>
-->
</php>
</phpunit>
5 changes: 3 additions & 2 deletions src/Illuminate/Auth/Access/AuthorizationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Illuminate\Auth\Access;

use Exception;
use Throwable;

class AuthorizationException extends Exception
{
Expand All @@ -18,10 +19,10 @@ class AuthorizationException extends Exception
*
* @param string|null $message
* @param mixed $code
* @param \Exception|null $previous
* @param \Throwable|null $previous
* @return void
*/
public function __construct($message = null, $code = null, Exception $previous = null)
public function __construct($message = null, $code = null, Throwable $previous = null)
{
parent::__construct($message ?? 'This action is unauthorized.', 0, $previous);

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Auth/GuardHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function guest()
/**
* Get the ID for the currently authenticated user.
*
* @return int|null
* @return int|string|null
*/
public function id()
{
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Auth/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
use Closure;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Contracts\Auth\Factory as Auth;
use Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests;

class Authenticate
class Authenticate implements AuthenticatesRequests
{
/**
* The authentication factory instance.
Expand Down
29 changes: 28 additions & 1 deletion src/Illuminate/Auth/Notifications/ResetPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ class ResetPassword extends Notification
*/
public $token;

/**
* The callback that should be used to create the reset password URL.
*
* @var \Closure|null
*/
public static $createUrlCallback;

/**
* The callback that should be used to build the mail message.
*
Expand Down Expand Up @@ -56,14 +63,34 @@ public function toMail($notifiable)
return call_user_func(static::$toMailCallback, $notifiable, $this->token);
}

if (static::$createUrlCallback) {
$url = call_user_func(static::$createUrlCallback, $notifiable, $this->token);
} else {
$url = url(route('password.reset', [
'token' => $this->token,
'email' => $notifiable->getEmailForPasswordReset(),
], false));
}

return (new MailMessage)
->subject(Lang::get('Reset Password Notification'))
->line(Lang::get('You are receiving this email because we received a password reset request for your account.'))
->action(Lang::get('Reset Password'), url(config('app.url').route('password.reset', ['token' => $this->token, 'email' => $notifiable->getEmailForPasswordReset()], false)))
->action(Lang::get('Reset Password'), $url)
->line(Lang::get('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')]))
->line(Lang::get('If you did not request a password reset, no further action is required.'));
}

/**
* Set a callback that should be used when creating the reset password button URL.
*
* @param \Closure $callback
* @return void
*/
public static function createUrlUsing($callback)
{
static::$createUrlCallback = $callback;
}

/**
* Set a callback that should be used when building the notification mail message.
*
Expand Down
3 changes: 1 addition & 2 deletions src/Illuminate/Auth/Passwords/PasswordBroker.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public function sendResetLink(array $credentials)
return static::INVALID_USER;
}

if (method_exists($this->tokens, 'recentlyCreatedToken') &&
$this->tokens->recentlyCreatedToken($user)) {
if ($this->tokens->recentlyCreatedToken($user)) {
return static::RESET_THROTTLED;
}

Expand Down
8 changes: 8 additions & 0 deletions src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ public function create(CanResetPasswordContract $user);
*/
public function exists(CanResetPasswordContract $user, $token);

/**
* Determine if the given user recently created a password reset token.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @return bool
*/
public function recentlyCreatedToken(CanResetPasswordContract $user);

/**
* Delete a token record.
*
Expand Down
5 changes: 3 additions & 2 deletions src/Illuminate/Auth/SessionGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ protected function recaller()
/**
* Get the ID for the currently authenticated user.
*
* @return int|null
* @return int|string|null
*/
public function id()
{
Expand Down Expand Up @@ -632,7 +632,8 @@ protected function fireAttemptEvent(array $credentials, $remember = false)
/**
* Fires the validated event if the dispatcher is set.
*
* @param $user
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @return void
*/
protected function fireValidatedEvent($user)
{
Expand Down
18 changes: 9 additions & 9 deletions src/Illuminate/Auth/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
}
],
"require": {
"php": "^7.2",
"illuminate/contracts": "^6.0",
"illuminate/http": "^6.0",
"illuminate/queue": "^6.0",
"illuminate/support": "^6.0"
"php": "^7.2.5",
"illuminate/contracts": "^7.0",
"illuminate/http": "^7.0",
"illuminate/queue": "^7.0",
"illuminate/support": "^7.0"
},
"autoload": {
"psr-4": {
Expand All @@ -27,13 +27,13 @@
},
"extra": {
"branch-alias": {
"dev-master": "6.x-dev"
"dev-master": "7.x-dev"
}
},
"suggest": {
"illuminate/console": "Required to use the auth:clear-resets command (^6.0).",
"illuminate/queue": "Required to fire login / logout events (^6.0).",
"illuminate/session": "Required to use the session based guard (^6.0)."
"illuminate/console": "Required to use the auth:clear-resets command (^7.0).",
"illuminate/queue": "Required to fire login / logout events (^7.0).",
"illuminate/session": "Required to use the session based guard (^7.0)."
},
"config": {
"sort-packages": true
Expand Down
Loading

0 comments on commit 3a9e020

Please sign in to comment.