diff --git a/.editorconfig b/.editorconfig index 1671c9b9d..8f0de65c5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,9 +3,9 @@ root = true [*] charset = utf-8 end_of_line = lf -insert_final_newline = true -indent_style = space indent_size = 4 +indent_style = space +insert_final_newline = true trim_trailing_whitespace = true [*.md] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b27e503df..77662031b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,11 +1,28 @@ name: Tests -on: [push, pull_request] +on: + push: + branches: + - master + - '*.x' + pull_request: + schedule: + - cron: '0 0 * * *' + +permissions: + contents: read jobs: tests: runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + php: ['8.0', 8.1, 8.2] + + name: PHP ${{ matrix.php }} + steps: - name: Checkout code uses: actions/checkout@v3 @@ -13,12 +30,12 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite coverage: none - name: Install Composer dependencies - run: composer install --prefer-dist --no-interaction + run: composer install --prefer-dist --no-interaction --no-progress - name: Copy environment file run: cp .env.example .env diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 1625bda10..ebda62069 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -4,6 +4,10 @@ on: release: types: [released] +permissions: {} + jobs: update: + permissions: + contents: write uses: laravel/.github/.github/workflows/update-changelog.yml@main diff --git a/.gitignore b/.gitignore index 38e5b2539..f0d10af60 100644 --- a/.gitignore +++ b/.gitignore @@ -6,11 +6,13 @@ /vendor .env .env.backup +.env.production .phpunit.result.cache Homestead.json Homestead.yaml auth.json npm-debug.log yarn-error.log +/.fleet /.idea /.vscode diff --git a/.styleci.yml b/.styleci.yml index 4705a3738..9daadf161 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -5,8 +5,5 @@ php: finder: not-name: - index.php -js: - finder: - not-name: - - vite.config.js +js: true css: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 9959e2639..0d3bea2a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Release Notes -## [Unreleased](https://github.com/laravel/laravel/compare/v9.3.0...master) +## [Unreleased](https://github.com/laravel/laravel/compare/v9.3.8...master) -## [v10.0.0 (2022-02-07)](https://github.com/laravel/laravel/compare/v9.3.0...master) +## [v10.0.0 (2022-02-07)](https://github.com/laravel/laravel/compare/v9.3.8...master) Laravel 10 includes a variety of changes to the application skeleton. Please consult the diff to see what's new. diff --git a/README.md b/README.md index f171ecacc..bf0ddd92c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -
+
@@ -25,6 +25,8 @@ Laravel is accessible, powerful, and provides tools required for large, robust a
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
+You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
+
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index c3be2544b..007968811 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -60,7 +60,7 @@ class Kernel extends HttpKernel
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
- 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
+ 'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php
new file mode 100644
index 000000000..093bf64af
--- /dev/null
+++ b/app/Http/Middleware/ValidateSignature.php
@@ -0,0 +1,22 @@
+
+ */
+ protected $except = [
+ // 'fbclid',
+ // 'utm_campaign',
+ // 'utm_content',
+ // 'utm_medium',
+ // 'utm_source',
+ // 'utm_term',
+ ];
+}
diff --git a/composer.json b/composer.json
index 08251b285..5f31316cd 100644
--- a/composer.json
+++ b/composer.json
@@ -55,7 +55,10 @@
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
- "sort-packages": true
+ "sort-packages": true,
+ "allow-plugins": {
+ "pestphp/pest-plugin": true
+ }
},
"minimum-stability": "dev",
"prefer-stable": true
diff --git a/config/broadcasting.php b/config/broadcasting.php
index 168824244..9e4d4aa44 100644
--- a/config/broadcasting.php
+++ b/config/broadcasting.php
@@ -36,7 +36,7 @@ return [
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
- 'host' => env('PUSHER_HOST', 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
+ 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php
index 20b35322d..41f8ae896 100644
--- a/database/factories/UserFactory.php
+++ b/database/factories/UserFactory.php
@@ -19,7 +19,7 @@ class UserFactory extends Factory
{
return [
'name' => fake()->name(),
- 'email' => fake()->safeEmail(),
+ 'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
@@ -33,10 +33,8 @@ class UserFactory extends Factory
*/
public function unverified()
{
- return $this->state(function (array $attributes) {
- return [
- 'email_verified_at' => null,
- ];
- });
+ return $this->state(fn (array $attributes) => [
+ 'email_verified_at' => null,
+ ]);
}
}
diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
index fd235f8c5..6c81fd229 100644
--- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
+++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
@@ -20,6 +20,7 @@ return new class extends Migration
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
+ $table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
diff --git a/lang/en/validation.php b/lang/en/validation.php
index cef02f589..5ea01fa77 100644
--- a/lang/en/validation.php
+++ b/lang/en/validation.php
@@ -43,6 +43,7 @@ return [
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
+ 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.',
'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.',
@@ -89,6 +90,7 @@ return [
'numeric' => 'The :attribute must not be greater than :max.',
'string' => 'The :attribute must not be greater than :max characters.',
],
+ 'max_digits' => 'The :attribute must not have more than :max digits.',
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
@@ -97,6 +99,7 @@ return [
'numeric' => 'The :attribute must be at least :min.',
'string' => 'The :attribute must be at least :min characters.',
],
+ 'min_digits' => 'The :attribute must have at least :min digits.',
'multiple_of' => 'The :attribute must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
@@ -117,6 +120,7 @@ return [
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
+ 'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
diff --git a/package.json b/package.json
index 6267eac1f..36489d96c 100644
--- a/package.json
+++ b/package.json
@@ -5,8 +5,8 @@
"build": "vite build"
},
"devDependencies": {
- "axios": "^0.27",
- "laravel-vite-plugin": "^0.5.0",
+ "axios": "^1.1.2",
+ "laravel-vite-plugin": "^0.6.0",
"lodash": "^4.17.19",
"postcss": "^8.1.14",
"vite": "^3.0.0"
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php
index de233926d..0ad6097c2 100644
--- a/resources/views/welcome.blade.php
+++ b/resources/views/welcome.blade.php
@@ -11,7 +11,7 @@