Commit 4c4113ed authored by Korko's avatar Korko
Browse files

Laravel 7.0

parent 0348b685
Pipeline #218371 failed with stage
in 4 minutes and 52 seconds
# Release Notes
## [Unreleased](https://github.com/laravel/laravel/compare/v7.0.0...master)
## [v7.0.0 (2020-03-03)](https://github.com/laravel/laravel/compare/v6.18.0...v7.0.0)
### Added
- Add HandleCors middleware ([#5189](https://github.com/laravel/laravel/pull/5189), [0bec06c](https://github.com/laravel/laravel/commit/0bec06cd45a7f6eda0d52f78dd5ff767d94ed5cc))
- Add new `view.expires` option ([#5209](https://github.com/laravel/laravel/pull/5209), [91dd1f6](https://github.com/laravel/laravel/commit/91dd1f61cdd3c7949593a4435dff8b77322761f2))
- Add `links` option to filesystem config ([#5222](https://github.com/laravel/laravel/pull/5222))
- Add Guzzle dependency ([c434eae](https://github.com/laravel/laravel/commit/c434eae43d673a709bb840f5f2e03b58da30682b), [705076f](https://github.com/laravel/laravel/commit/705076ffc28a834a1eb76b3550be2b6269a8fefb))
- Add array mailer ([#5240](https://github.com/laravel/laravel/pull/5240))
### Changed
- Laravel 7 constraint ([054bb43](https://github.com/laravel/laravel/commit/054bb43038f4acb7f356dd668715225ffc2e55ba))
- Implement new primary key syntax ([#5147](https://github.com/laravel/laravel/pull/5147))
- Switch to Symfony 5 ([#5157](https://github.com/laravel/laravel/pull/5157))
- Bumps `nunomaduro/collision` dependency to 4.1 ([#5221](https://github.com/laravel/laravel/pull/5221))
- Utilize Authentication Middleware Contract ([#5181](https://github.com/laravel/laravel/pull/5181), [#5182](https://github.com/laravel/laravel/pull/5182))
- Remove auth scaffolding ([b5bb91f](https://github.com/laravel/laravel/commit/b5bb91fea79a3bd5504cbcadfd4766f41f7d01ce), [13e4389](https://github.com/laravel/laravel/commit/13e43893ba2457c3e49898f0066a5ce8d7ea74f4), [3ee0065](https://github.com/laravel/laravel/commit/3ee0065bcd879b82ee42023165f8a8f71e893011))
- Import facades ([4d565e6](https://github.com/laravel/laravel/commit/4d565e681cbf496e0cdfb58743d4ae8238cef15e))
- Ignition v2 ([#5211](https://github.com/laravel/laravel/pull/5211))
- Bumped defaults for Laravel 7 ([#5195](https://github.com/laravel/laravel/pull/5195))
- Update mail config ([76d8227](https://github.com/laravel/laravel/commit/76d822768dcab14fa1ee1fd1f4a24065234860db), [61ec16f](https://github.com/laravel/laravel/commit/61ec16fe392967766b68d865ed10d56275a78718), [e43d454](https://github.com/laravel/laravel/commit/e43d4546a9c0bde49dae51fd6f4e2766674f1152), [130b8c8](https://github.com/laravel/laravel/commit/130b8c8bcb8f167e7013e7846004b2df3e405b72))
- Remove hyphen on email ([ffc74ba](https://github.com/laravel/laravel/commit/ffc74ba143a7de4a89f2c3fd525a5621ca879e38))
- Use `MAIL_MAILER` in test environment ([#5239](https://github.com/laravel/laravel/pull/5239))
## [v6.18.0 (2020-02-24)](https://github.com/laravel/laravel/compare/v6.12.0...v6.18.0)
### Changed
- Update cross-env and resolve-url-loader to the latest ([#5210](https://github.com/laravel/laravel/pull/5210), [#5216](https://github.com/laravel/laravel/pull/5216))
- Bump fzaninotto/faker version to support PHP 7.4 ([#5218](https://github.com/laravel/laravel/pull/5218))
- Remove redundant default attributes from `phpunit.xml` ([#5233](https://github.com/laravel/laravel/pull/5233))
## [v6.12.0 (2020-01-14)](https://github.com/laravel/laravel/compare/v6.8.0...v6.12.0)
### Added
- Allow configurable emergency logger ([#5179](https://github.com/laravel/laravel/pull/5179))
- Add `MAIL_FROM_ADDRESS` & `MAIL_FROM_NAME` to `.env` file ([#5180](https://github.com/laravel/laravel/pull/5180))
- Add missing full stop for some validation messages ([#5205](https://github.com/laravel/laravel/pull/5205))
### Changed
- Use class name to be consistent with web middleware ([140d4d9](https://github.com/laravel/laravel/commit/140d4d9b0a4581cec046875361e87c2981b3f9fe))
- Use file session driver again ([#5201](https://github.com/laravel/laravel/pull/5201))
### Fixed
- Correct exception handler doc ([#5187](https://github.com/laravel/laravel/pull/5187))
- Fix types consistency in Redis database config ([#5191](https://github.com/laravel/laravel/pull/5191))
### Security
- Update laravel mix and sass loader ([#5203](https://github.com/laravel/laravel/pull/5203))
## [v6.8.0 (2019-12-16)](https://github.com/laravel/laravel/compare/v6.5.2...v6.8.0)
### Added
- Add "none" to supported same site options in session config ([#5174](https://github.com/laravel/laravel/pull/5174))
### Changed
- Rename `encrypted` to `forceTLS` for Pusher ([#5159](https://github.com/laravel/laravel/pull/5159))
- Use laravel/tinker v2 ([#5161](https://github.com/laravel/laravel/pull/5161))
- Use PHPUnit TestCase and in-memory DB ([#5169](https://github.com/laravel/laravel/pull/5169))
- DRY up path to /home ([#5173](https://github.com/laravel/laravel/pull/5173))
- Change some default settings ([f48e2d5](https://github.com/laravel/laravel/commit/f48e2d500cb53cc4a09dfcb40beb0abafd79de4f))
### Fixed
- Consistent alphabetical order ([#5167](https://github.com/laravel/laravel/pull/5167))
- Update redirectTo return type PHPDoc ([#5175](https://github.com/laravel/laravel/pull/5175))
## [v6.5.2 (2019-11-21)](https://github.com/laravel/laravel/compare/v6.4.0...v6.5.2)
### Changed
- Update .styleci.yml ([bfd4b1e](https://github.com/laravel/laravel/commit/bfd4b1e92f7c6b4e6b74cfdde995a5afad648d96))
## [v6.4.0 (2019-10-21)](https://github.com/laravel/laravel/compare/v6.2.0...v6.4.0)
### Changed
- Add xml schema to phpunit ([#5139](https://github.com/laravel/laravel/pull/5139))
### Fixed
- Fixes required version of the framework within `composer.json` ([#5130](https://github.com/laravel/laravel/pull/5130))
- Security fix: Waiting before retrying password reset ([ace38c1](https://github.com/laravel/laravel/commit/ace38c133f3d8088fc7477f56b9db6fdc0098d06), [ba2f2ab](https://github.com/laravel/laravel/commit/ba2f2abe830f5d03c52fd9c88411859cf863abd6), [953b488](https://github.com/laravel/laravel/commit/953b488b8bb681d4d6e12227645c7c1b7ac26935))
## [v6.2.0 (2019-10-08)](https://github.com/laravel/laravel/compare/v6.0.2...v6.2.0)
### Added
- Add 'null' logging channel ([#5106](https://github.com/laravel/laravel/pull/5106))
- Add Password confirmation ([#5129](https://github.com/laravel/laravel/pull/5129), [d1f7a5a](https://github.com/laravel/laravel/commit/d1f7a5a886039e28a434905447865ca952032284), [9bc23ee](https://github.com/laravel/laravel/commit/9bc23ee468e1fb3e5b4efccdc35f1fcee5a8b6bc))
### Removed
- Remove testing bootstrap extension ([#5107](https://github.com/laravel/laravel/pull/5107))
### Fixed
- Revert "[6.x] According to PHP Bug 78516 Argon2 requires at least 8KB" ([#5102]()https://github.com/laravel/laravel/pull/5102)
## [v6.0.2 (2019-09-10)](https://github.com/laravel/laravel/compare/v6.0.1...v6.0.2)
### Changed
- Order imports alphabetically ([79fb6af](https://github.com/laravel/laravel/commit/79fb6af96ebf0325cef15c3132157fdf75f6fd6c), [#5100](https://github.com/laravel/laravel/pull/5100))
### Fixed
- Delete cached config file before running tests ([#5091](https://github.com/laravel/laravel/pull/5091))
- Update Argon memory ([#5097](https://github.com/laravel/laravel/pull/5097))
## [v6.0.1 (2019-08-27)](https://github.com/laravel/laravel/compare/v6.0.0...v6.0.1)
### Added
- Add Ignition ([41ee35d](https://github.com/laravel/laravel/commit/41ee35d01f4e57c47e924400db8a805089664141), [13ab419](https://github.com/laravel/laravel/commit/13ab419d59e2f0d2e188a5157a3cc17f72db595c))
## [v6.0.0 (2019-08-27)](https://github.com/laravel/laravel/compare/v5.8.35...v6.0.0)
### Added
- Add ThrottleRequests to the priority array ([#5057](https://github.com/laravel/laravel/pull/5057))
- Add PHPUnit bootstrap file to allow execution of console commands before a test run ([#5050](https://github.com/laravel/laravel/pull/5050), [8f2a278](https://github.com/laravel/laravel/commit/8f2a27868f7f9e0a0bbf69fa83d06b8a7a1b7894))
- Add failed jobs table ([b7d2b48](https://github.com/laravel/laravel/commit/b7d2b48b75afbaa34c82688cb30be2f00a7d8c57), [#5082](https://github.com/laravel/laravel/pull/5082))
- Add new failed driver option ([e6becd2](https://github.com/laravel/laravel/commit/e6becd2ca35a650f51ed49525935e8ca65671152))
### Changed
- Require PHP 7.2 ([25cf4c4](https://github.com/laravel/laravel/commit/25cf4c492308b9c5148f9522d8dd8f8f18819f50))
- Encourage to use PHPUnit 8 ([0582a20](https://github.com/laravel/laravel/commit/0582a20adddc0e6bd16ca05eeae93e6412924ad6))
- Use phpredis as default Redis client ([#5085](https://github.com/laravel/laravel/pull/5085))
### Removed
- Remove services deleted from core ([#5019](https://github.com/laravel/laravel/pull/5019))
- Remove dumpserver ([f053116](https://github.com/laravel/laravel/commit/f053116c5680e77c3a6c73afd193984a17ea482d))
- Remove UI scaffolding ([fc39b07](https://github.com/laravel/laravel/commit/fc39b073f3f61a22f1b48329e294ebb881700dbe))
- Remove deprecated language line ([#5074](https://github.com/laravel/laravel/pull/5074))
## [v5.8.35 (2019-09-09)](https://github.com/laravel/laravel/compare/v5.8.17...v5.8.35)
### Added
- Add DYNAMODB_ENDPOINT to the cache config ([#5034](https://github.com/laravel/laravel/pull/5034))
- Added support for new redis URL property ([#5037](https://github.com/laravel/laravel/pull/5037))
- Add .env.backup to gitignore ([#5046](https://github.com/laravel/laravel/pull/5046))
- Using environment variable to set redis prefix ([#5062](https://github.com/laravel/laravel/pull/5062))
### Changed
- Update axios package ([#5038](https://github.com/laravel/laravel/pull/5038))
- Use generic default db config ([6f3d68f](https://github.com/laravel/laravel/commit/6f3d68f67f3dab0e0d853719696ede8dfd9cc4e1))
- Update deprecated pusher option ([#5058](https://github.com/laravel/laravel/pull/5058))
- Move TrustProxies to highest priority ([#5055](https://github.com/laravel/laravel/pull/5055))
### Fixed
- Fixed lodash version ([#5060](https://github.com/laravel/laravel/pull/5060))
### Removed
- Remove Stripe config settings ([#5075](https://github.com/laravel/laravel/pull/5075), [bb43372](https://github.com/laravel/laravel/commit/bb433725483803a27f21d3b21317072610bc3e9c))
- Remove unnecessary X-CSRF-TOKEN header from our Axios instance ([#5083](https://github.com/laravel/laravel/pull/5083))
## [v5.8.17 (2019-05-14)](https://github.com/laravel/laravel/compare/v5.8.16...v5.8.17)
### Added
- Add ends_with validation message ([#5020](https://github.com/laravel/laravel/pull/5020))
### Fixed
- Fix type hint for case of trusting all proxies (string) ([#5025](https://github.com/laravel/laravel/pull/5025))
## [v5.8.16 (2019-05-07)](https://github.com/laravel/laravel/compare/v5.8.3...v5.8.16)
### Added
- Add IDE type-hint to UserFactory ([#4990](https://github.com/laravel/laravel/pull/4990))
- Update database config relating to Url addition ([#5018](https://github.com/laravel/laravel/pull/5018), [b0e0bdc](https://github.com/laravel/laravel/commit/b0e0bdc060ce068b73371919b904f3c7f0c1cfa6))
### Changed
- Upgrade the collision dependency from v2 to v3 ([#4963](https://github.com/laravel/laravel/pull/4963))
- Ignore SQLite journals ([#4971](https://github.com/laravel/laravel/pull/4971))
- Prefix redis database connection by default ([#4982](https://github.com/laravel/laravel/pull/4982), [#4986](https://github.com/laravel/laravel/pull/4986), [#4987](https://github.com/laravel/laravel/pull/4987))
### Removed
- Remove `.navbar-laravel` CSS class ([65f8271](https://github.com/laravel/laravel/commit/65f8271032c113883fb3f1e8e7b3279821148ad1))
## [v5.8.3 (2019-03-05)](https://github.com/laravel/laravel/compare/v5.8.0...v5.8.3)
### Added
- Add AWS S3 Bucket to `.env.example` ([f84a69e](https://github.com/laravel/laravel/commit/f84a69ee852bd44363042a61995d330574b6b8c3))
### Changed
- Set default AWS region ([ff4f40f](https://github.com/laravel/laravel/commit/ff4f40fbabcefcb87facb1346fcfe5b8266eb40d), [#4956](https://github.com/laravel/laravel/pull/4956))
### Fixed
- Comment out non-existing model class and policy example ([f4ff4f4](https://github.com/laravel/laravel/commit/f4ff4f4176f7d931e301f36b95a46285ac61b8b8))
- Only apply MySQL PDO options when extension exists ([3001f3c](https://github.com/laravel/laravel/commit/3001f3c6e232ba7ce2ecdbdfe6e43b4c64ee05ad))
## [v5.8.0 (2019-02-26)](https://github.com/laravel/laravel/compare/v5.7.28...v5.8.0)
### Added
......@@ -321,3 +516,4 @@
### Removed
- Remove index from password reset `token` column ([#4180](https://github.com/laravel/laravel/pull/4180))
<?php
namespace App\Casts;
use Crypt;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
class EncryptedString implements CastsAttributes
{
/**
* Cast the given value.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param mixed $value
* @param array $attributes
* @return array
*/
public function get($model, $key, $value, $attributes)
{
return Crypt::decrypt($value);
}
/**
* Prepare the given value for storage.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
* @param array $value
* @param array $attributes
* @return string
*/
public function set($model, $key, $value, $attributes)
{
return Crypt::encrypt($value);
}
}
<?php
namespace App\Console\Commands;
use Korko\Callr\CallrSmsCommand;
class SendSmsCommand extends CallrSmsCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'send:sms {phone} {text}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send an SMS';
}
......@@ -14,7 +14,6 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
Commands\SendSmsCommand::class,
Commands\SendMailCommand::class,
];
......
<?php
namespace App\Database;
use AustinHeap\Database\Encryption\Traits\HasEncryptedAttributes;
use Illuminate\Database\Eloquent\Model as BaseModel;
class Model extends BaseModel
{
use HasEncryptedAttributes;
}
......@@ -2,7 +2,8 @@
namespace App;
use App\Database\Model;
use App\Casts\EncryptedString;
use Illuminate\Database\Eloquent\Model;
class DearSanta extends Model
{
......@@ -15,8 +16,13 @@ class DearSanta extends Model
'delivery_status' => self::CREATED,
];
protected $encrypted = [
'email_body',
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'email_body' => EncryptedString::class,
];
const CREATED = 'created';
......
......@@ -2,10 +2,11 @@
namespace App;
use App\Database\Model;
use App\Casts\EncryptedString;
use DateInterval;
use DateTime;
use DB;
use Illuminate\Database\Eloquent\Model;
class Draw extends Model
{
......@@ -13,9 +14,14 @@ class Draw extends Model
'expires_at',
];
protected $encrypted = [
'email_title',
'email_body',
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'email_title' => EncryptedString::class,
'email_body' => EncryptedString::class,
];
public function save(array $options = [])
......
......@@ -2,8 +2,8 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
......@@ -29,10 +29,10 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* @param \Exception $exception
* @param \Throwable $exception
* @return void
*/
public function report(Exception $exception)
public function report(Throwable $exception)
{
parent::report($exception);
}
......@@ -41,10 +41,10 @@ class Handler extends ExceptionHandler
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @param \Throwable $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
public function render($request, Throwable $exception)
{
return parent::render($request, $exception);
}
......
......@@ -15,6 +15,7 @@ class Kernel extends HttpKernel
*/
protected $middleware = [
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Fruitcake\Cors\HandleCors::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
......
......@@ -2,18 +2,8 @@
namespace App\Http\Middleware;
use Korko\Encrypter\SymmetricalEncrypter as Encrypter;
class DecryptInput extends TransformsRequest
{
protected $decrypter;
public function __construct()
{
$key = md5(csrf_token().config('app.key'));
$this->decrypter = new Encrypter($key);
}
/**
* Transform the given key.
*
......@@ -22,6 +12,6 @@ class DecryptInput extends TransformsRequest
*/
protected function transformKey($key)
{
return $this->decrypter->decrypt($key);
return Crypt::decrypt($key);
}
}
......@@ -6,13 +6,6 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
*
* @var bool
*/
protected $addHttpCookie = true;
/**
* The URIs that should be excluded from CSRF verification.
*
......
......@@ -4,6 +4,7 @@ namespace App\Mail;
use App\DearSanta as DearSantaEntry;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
class DearSanta extends Mailable
{
......
<?php
namespace App\Mail;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Mail\Mailable as BaseMailable;
abstract class Mailable extends BaseMailable
{
public function send(MailerContract $mailer)
{
//Initializes properties on the Swift Message object
$this->withSwiftMessage(function ($message) {
$message->mailable = get_class($this);
});
parent::send($mailer);
}
}
......@@ -4,6 +4,7 @@ namespace App\Mail;
use App\Draw;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class OrganizerFinalRecap extends Mailable
......
......@@ -5,6 +5,7 @@ namespace App\Mail;
use App\Draw;
use Crypt;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class OrganizerRecap extends Mailable
......
......@@ -6,6 +6,7 @@ use App\Participant;
use Crypt;
use Hashids;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
class TargetDrawn extends Mailable
{
......
......@@ -2,8 +2,7 @@
namespace App\Mail;
use App\Database\Model;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Queue\SerializesModels;
trait UpdatesDeliveryStatus
......@@ -19,7 +18,7 @@ trait UpdatesDeliveryStatus
$this->updateDatetime = $entry->updated_at;
}
public function send(MailerContract $mailer)
public function send($mailer)
{
parent::send($mailer);
......
......@@ -2,7 +2,8 @@
namespace App;
use App\Database\Model;
use App\Casts\EncryptedString;
use Illuminate\Database\Eloquent\Model;
class Participant extends Model
{
......@@ -18,9 +19,14 @@ class Participant extends Model
'delivery_status' => self::CREATED,
];
protected $encrypted = [
'name',
'email_address',
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'name' => EncryptedString::class,
'email_address' => EncryptedString::class,
];
const CREATED = 'created';
......
......@@ -15,7 +15,7 @@ class ComposerServiceProvider extends ServiceProvider
public function boot()
{
View::composer('templates/layout', function ($view) {
$view->with('version', exec('git describe --tags --abbrev=0'))
$view->with('version', exec('git describe --tags --always --abbrev=0'))
->with('version_date', exec('git log -1 --format=%ai'));
});
}
......
......@@ -2,8 +2,8 @@
namespace App\Providers;
use App\Services\Encrypter;
use Illuminate\Encryption\EncryptionServiceProvider as ServiceProvider;
use Korko\Encrypter\SymmetricalEncrypter;
class EncryptionServiceProvider extends ServiceProvider
{
......@@ -15,7 +15,7 @@ class EncryptionServiceProvider extends ServiceProvider
public function register()
{
$this->app->singleton('encrypter', function ($app) {
return new SymmetricalEncrypter(SymmetricalEncrypter::generateKey('AES-256-CBC'), 'AES-256-CBC');
return new Encrypter(Encrypter::generateKey('AES-256-CBC'), 'AES-256-CBC');
});
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment