diff --git a/CHANGELOG.md b/CHANGELOG.md index 7556531d0..2de8a3f0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,62 @@ # Release Notes -## [Unreleased](https://github.com/laravel/breeze/compare/v2.2.0...2.x) +## [Unreleased](https://github.com/laravel/breeze/compare/v2.3.3...2.x) + +## [v2.3.3](https://github.com/laravel/breeze/compare/v2.3.2...v2.3.3) - 2025-01-26 + +* Fix type error in Login component for `setData` function by [@florikodra](https://github.com/florikodra) in https://github.com/laravel/breeze/pull/454 +* Fix tsc error in Pages/Auth/Login.tsx on fresh install by [@MariosIgkiempor](https://github.com/MariosIgkiempor) in https://github.com/laravel/breeze/pull/457 + +## [v2.3.2](https://github.com/laravel/breeze/compare/v2.3.1...v2.3.2) - 2025-01-21 + +* [2.x] Unpin typescript version for Inertia Vue stack by [@reyberyturiaga](https://github.com/reyberyturiaga) in https://github.com/laravel/breeze/pull/447 +* Missing type declaration add to NewPasswordController.php by [@ashokbaruaakas](https://github.com/ashokbaruaakas) in https://github.com/laravel/breeze/pull/449 + +## [v2.3.1](https://github.com/laravel/breeze/compare/v2.3.0...v2.3.1) - 2025-01-13 + +* [2.x] Remove tailwind config files on api stack by [@p-nerd](https://github.com/p-nerd) in https://github.com/laravel/breeze/pull/444 +* [2.x] Remove redundant `.d.ts` inclusion from `tsconfig.json` by [@panakour](https://github.com/panakour) in https://github.com/laravel/breeze/pull/445 + +## [v2.3.0](https://github.com/laravel/breeze/compare/v2.2.6...v2.3.0) - 2024-12-14 + +* Fix typescript version by [@mo7zayed](https://github.com/mo7zayed) in https://github.com/laravel/breeze/pull/442 +* Upgrade to Inertia V2 by [@adamjgriffith](https://github.com/adamjgriffith) in https://github.com/laravel/breeze/pull/443 + +## [v2.2.6](https://github.com/laravel/breeze/compare/v2.2.5...v2.2.6) - 2024-11-20 + +* [2.x] Supports PHPStan 2 by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/breeze/pull/441 + +## [v2.2.5](https://github.com/laravel/breeze/compare/v2.2.4...v2.2.5) - 2024-11-12 + +* fix(ts): remove redundant [@ts-expect-error](https://github.com/ts-expect-error) directives in SSR route setup by [@datlechin](https://github.com/datlechin) in https://github.com/laravel/breeze/pull/434 +* Backport JetStream Modal.vue enhancements by [@mrleblanc101](https://github.com/mrleblanc101) in https://github.com/laravel/breeze/pull/435 +* Convert array to single line format by [@Rattone](https://github.com/Rattone) in https://github.com/laravel/breeze/pull/436 +* [2.x] Replace `Rule` with `ValidationRule` by [@avosalmon](https://github.com/avosalmon) in https://github.com/laravel/breeze/pull/437 + +## [v2.2.4](https://github.com/laravel/breeze/compare/v2.2.3...v2.2.4) - 2024-10-29 + +* fix(sanctum): add 127.0.0.1:3000 for proper API auth during local development with 127.0.0.1:3000 by [@ShahAlamShaikat](https://github.com/ShahAlamShaikat) in https://github.com/laravel/breeze/pull/431 +* Using the translate function instead of a static value by [@ashkanfekridev](https://github.com/ashkanfekridev) in https://github.com/laravel/breeze/pull/432 + +## [v2.2.3](https://github.com/laravel/breeze/compare/v2.2.2...v2.2.3) - 2024-10-17 + +* [2.x] Fixed TypeScript Errors in React SSR Setup with Ziggy Props when Builds by [@akr4m](https://github.com/akr4m) in https://github.com/laravel/breeze/pull/430 + +## [v2.2.2](https://github.com/laravel/breeze/compare/v2.2.1...v2.2.2) - 2024-10-06 + +* Update logo to support dark/light theme by [@milewski](https://github.com/milewski) in https://github.com/laravel/breeze/pull/418 +* Add hint to clarify how to use multiselect by [@bdweix](https://github.com/bdweix) in https://github.com/laravel/breeze/pull/417 +* [2.x] Utilise `Illuminate\Support\php_binary()` by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/breeze/pull/421 +* Remove blade unescape for attributes by [@Rattone](https://github.com/Rattone) in https://github.com/laravel/breeze/pull/422 +* [2.x] chore: text-input to use [@disabled](https://github.com/disabled) by [@MrPunyapal](https://github.com/MrPunyapal) in https://github.com/laravel/breeze/pull/427 +* Updated names of the default functions to match the file names. by [@msamgan](https://github.com/msamgan) in https://github.com/laravel/breeze/pull/428 + +## [v2.2.1](https://github.com/laravel/breeze/compare/v2.2.0...v2.2.1) - 2024-09-22 + +* [2.x] Add `pnpm` lockfile to `flushNodeModules` by [@osbre](https://github.com/osbre) in https://github.com/laravel/breeze/pull/411 +* [2.x] Add option to install ESLint with Prettier by [@avosalmon](https://github.com/avosalmon) in https://github.com/laravel/breeze/pull/412 +* [2.x] Allows GitHub Actions to run directly from GA UI by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/breeze/pull/413 +* Refactor: Break long email validation rule into multiple lines by [@Amidope](https://github.com/Amidope) in https://github.com/laravel/breeze/pull/416 ## [v2.2.0](https://github.com/laravel/breeze/compare/v2.1.5...v2.2.0) - 2024-09-11 diff --git a/README.md b/README.md index 17cd2ae50..ffa1f9aa6 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,9 @@

Logo Laravel Breeze

- - Total Downloads - - - Latest Stable Version - - - License - + Total Downloads + Latest Stable Version + License

## Introduction diff --git a/art/logo.svg b/art/logo.svg index 3a88cc78f..e162cd021 100644 --- a/art/logo.svg +++ b/art/logo.svg @@ -1 +1,9 @@ - \ No newline at end of file + + + + + + + diff --git a/composer.json b/composer.json index 0d7421424..095885a0b 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,11 @@ "illuminate/validation": "^11.0", "symfony/console": "^7.0" }, + "require-dev": { + "laravel/framework": "^11.0", + "orchestra/testbench-core": "^9.0", + "phpstan/phpstan": "^2.0" + }, "autoload": { "psr-4": { "Laravel\\Breeze\\": "src/" @@ -37,9 +42,5 @@ "sort-packages": true }, "minimum-stability": "dev", - "prefer-stable": true, - "require-dev": { - "orchestra/testbench": "^9.0", - "phpstan/phpstan": "^1.10" - } + "prefer-stable": true } diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index ed521dfa5..9051350e9 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -298,6 +298,7 @@ protected static function flushNodeModules() $files->delete(base_path('pnpm-lock.yaml')); $files->delete(base_path('yarn.lock')); + $files->delete(base_path('bun.lock')); $files->delete(base_path('bun.lockb')); $files->delete(base_path('deno.lock')); $files->delete(base_path('package-lock.json')); @@ -324,6 +325,10 @@ protected function replaceInFile($search, $replace, $path) */ protected function phpBinary() { + if (function_exists('Illuminate\Support\php_binary')) { + return \Illuminate\Support\php_binary(); + } + return (new PhpExecutableFinder)->find(false) ?: 'php'; } @@ -402,7 +407,8 @@ protected function afterPromptingForMissingArguments(InputInterface $input, Outp 'ssr' => 'Inertia SSR', 'typescript' => 'TypeScript', 'eslint' => 'ESLint with Prettier', - ] + ], + hint: 'Use the space bar to select options.' ))->each(fn ($option) => $input->setOption($option, true)); } elseif (in_array($stack, ['blade', 'livewire', 'livewire-functional'])) { $input->setOption('dark', confirm( diff --git a/src/Console/InstallsApiStack.php b/src/Console/InstallsApiStack.php index 1509747fb..759e3f11b 100644 --- a/src/Console/InstallsApiStack.php +++ b/src/Console/InstallsApiStack.php @@ -95,6 +95,8 @@ protected function removeScaffoldingUnnecessaryForApis() // Remove frontend related files... $files->delete(base_path('package.json')); $files->delete(base_path('vite.config.js')); + $files->delete(base_path('tailwind.config.js')); + $files->delete(base_path('postcss.config.js')); // Remove Laravel "welcome" view... $files->delete(resource_path('views/welcome.blade.php')); diff --git a/src/Console/InstallsBladeStack.php b/src/Console/InstallsBladeStack.php index 1eccffa03..103e32ded 100644 --- a/src/Console/InstallsBladeStack.php +++ b/src/Console/InstallsBladeStack.php @@ -86,7 +86,7 @@ protected function installBladeStack() $this->runCommands(['pnpm install', 'pnpm run build']); } elseif (file_exists(base_path('yarn.lock'))) { $this->runCommands(['yarn install', 'yarn run build']); - } elseif (file_exists(base_path('bun.lockb'))) { + } elseif (file_exists(base_path('bun.lock')) || file_exists(base_path('bun.lockb'))) { $this->runCommands(['bun install', 'bun run build']); } elseif (file_exists(base_path('deno.lock'))) { $this->runCommands(['deno install', 'deno task build']); diff --git a/src/Console/InstallsInertiaStacks.php b/src/Console/InstallsInertiaStacks.php index 0d5239fd7..f7f114d84 100644 --- a/src/Console/InstallsInertiaStacks.php +++ b/src/Console/InstallsInertiaStacks.php @@ -16,7 +16,7 @@ protected function installInertiaVueStack() { // Install Inertia... if (! $this->requireComposerPackages([ - 'inertiajs/inertia-laravel:^1.0', + 'inertiajs/inertia-laravel:^2.0', $this->option('oauth') ? 'laravel/passport:^13.0' : 'laravel/sanctum:^4.0', 'tightenco/ziggy:^2.0', ])) { @@ -26,7 +26,7 @@ protected function installInertiaVueStack() // NPM Packages... $this->updateNodePackages(function ($packages) { return [ - '@inertiajs/vue3' => '^1.0.0', + '@inertiajs/vue3' => '^2.0.0', '@tailwindcss/forms' => '^0.5.3', '@vitejs/plugin-vue' => '^5.0.0', 'autoprefixer' => '^10.4.12', @@ -39,7 +39,7 @@ protected function installInertiaVueStack() if ($this->option('typescript')) { $this->updateNodePackages(function ($packages) { return [ - 'typescript' => '^5.5.3', + 'typescript' => '^5.6.3', 'vue-tsc' => '^2.0.24', ] + $packages; }); @@ -185,7 +185,7 @@ protected function installInertiaVueStack() $this->runCommands(['pnpm install', 'pnpm run build']); } elseif (file_exists(base_path('yarn.lock'))) { $this->runCommands(['yarn install', 'yarn run build']); - } elseif (file_exists(base_path('bun.lockb'))) { + } elseif (file_exists(base_path('bun.lock')) || file_exists(base_path('bun.lockb'))) { $this->runCommands(['bun install', 'bun run build']); } else { $this->runCommands(['npm install', 'npm run build']); @@ -231,7 +231,7 @@ protected function installInertiaReactStack() { // Install Inertia... if (! $this->requireComposerPackages([ - 'inertiajs/inertia-laravel:^1.0', + 'inertiajs/inertia-laravel:^2.0', $this->option('oauth') ? 'laravel/passport:^13.0' : 'laravel/sanctum:^4.0', 'tightenco/ziggy:^2.0', ])) { @@ -242,7 +242,7 @@ protected function installInertiaReactStack() $this->updateNodePackages(function ($packages) { return [ '@headlessui/react' => '^2.0.0', - '@inertiajs/react' => '^1.0.0', + '@inertiajs/react' => '^2.0.0', '@tailwindcss/forms' => '^0.5.3', '@vitejs/plugin-react' => '^4.2.0', 'autoprefixer' => '^10.4.12', @@ -409,7 +409,7 @@ protected function installInertiaReactStack() $this->runCommands(['pnpm install', 'pnpm run build']); } elseif (file_exists(base_path('yarn.lock'))) { $this->runCommands(['yarn install', 'yarn run build']); - } elseif (file_exists(base_path('bun.lockb'))) { + } elseif (file_exists(base_path('bun.lockb')) || file_exists(base_path('bun.lock'))) { $this->runCommands(['bun install', 'bun run build']); } elseif (file_exists(base_path('deno.lock'))) { $this->runCommands(['deno install', 'deno task build']); diff --git a/src/Console/InstallsLivewireStack.php b/src/Console/InstallsLivewireStack.php index 93c75abd9..40b818568 100644 --- a/src/Console/InstallsLivewireStack.php +++ b/src/Console/InstallsLivewireStack.php @@ -104,7 +104,7 @@ protected function installLivewireStack($functional = false) $this->runCommands(['pnpm install', 'pnpm run build']); } elseif (file_exists(base_path('yarn.lock'))) { $this->runCommands(['yarn install', 'yarn run build']); - } elseif (file_exists(base_path('bun.lockb'))) { + } elseif (file_exists(base_path('bun.lock')) || file_exists(base_path('bun.lockb'))) { $this->runCommands(['bun install', 'bun run build']); } elseif (file_exists(base_path('deno.lock'))) { $this->runCommands(['deno install', 'deno task build']); diff --git a/stubs/api/app/Http/Requests/Auth/LoginRequest.php b/stubs/api/app/Http/Requests/Auth/LoginRequest.php index 4d3637a9c..f5692bf4c 100644 --- a/stubs/api/app/Http/Requests/Auth/LoginRequest.php +++ b/stubs/api/app/Http/Requests/Auth/LoginRequest.php @@ -22,7 +22,7 @@ public function authorize(): bool /** * Get the validation rules that apply to the request. * - * @return array + * @return array|string> */ public function rules(): array { diff --git a/stubs/api/config/sanctum.php b/stubs/api/config/sanctum.php index 7bead37ec..b03f249cc 100644 --- a/stubs/api/config/sanctum.php +++ b/stubs/api/config/sanctum.php @@ -17,7 +17,7 @@ 'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( '%s%s%s', - 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', + 'localhost,localhost:3000,127.0.0.1,127.0.0.1:3000,127.0.0.1:8000,::1', Sanctum::currentApplicationUrlWithPort(), env('FRONTEND_URL') ? ','.parse_url(env('FRONTEND_URL'), PHP_URL_HOST) : '' ))), diff --git a/stubs/default/app/Http/Controllers/Auth/NewPasswordController.php b/stubs/default/app/Http/Controllers/Auth/NewPasswordController.php index 79ac3cd65..e8368bd22 100644 --- a/stubs/default/app/Http/Controllers/Auth/NewPasswordController.php +++ b/stubs/default/app/Http/Controllers/Auth/NewPasswordController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; +use App\Models\User; use Illuminate\Auth\Events\PasswordReset; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; @@ -40,7 +41,7 @@ public function store(Request $request): RedirectResponse // database. Otherwise we will parse the error and return the response. $status = Password::reset( $request->only('email', 'password', 'password_confirmation', 'token'), - function ($user) use ($request) { + function (User $user) use ($request) { $user->forceFill([ 'password' => Hash::make($request->password), 'remember_token' => Str::random(60), diff --git a/stubs/default/app/Http/Requests/Auth/LoginRequest.php b/stubs/default/app/Http/Requests/Auth/LoginRequest.php index 2b92f6511..257464245 100644 --- a/stubs/default/app/Http/Requests/Auth/LoginRequest.php +++ b/stubs/default/app/Http/Requests/Auth/LoginRequest.php @@ -22,7 +22,7 @@ public function authorize(): bool /** * Get the validation rules that apply to the request. * - * @return array + * @return array|string> */ public function rules(): array { diff --git a/stubs/default/app/Http/Requests/ProfileUpdateRequest.php b/stubs/default/app/Http/Requests/ProfileUpdateRequest.php index 93b0022e6..3622a8f37 100644 --- a/stubs/default/app/Http/Requests/ProfileUpdateRequest.php +++ b/stubs/default/app/Http/Requests/ProfileUpdateRequest.php @@ -11,13 +11,20 @@ class ProfileUpdateRequest extends FormRequest /** * Get the validation rules that apply to the request. * - * @return array + * @return array|string> */ public function rules(): array { return [ 'name' => ['required', 'string', 'max:255'], - 'email' => ['required', 'string', 'lowercase', 'email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)], + 'email' => [ + 'required', + 'string', + 'lowercase', + 'email', + 'max:255', + Rule::unique(User::class)->ignore($this->user()->id), + ], ]; } } diff --git a/stubs/default/resources/views/components/text-input.blade.php b/stubs/default/resources/views/components/text-input.blade.php index 7779a13ad..3f44b2f74 100644 --- a/stubs/default/resources/views/components/text-input.blade.php +++ b/stubs/default/resources/views/components/text-input.blade.php @@ -1,3 +1,3 @@ @props(['disabled' => false]) -merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm']) !!}> +merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm']) }}> diff --git a/stubs/default/vite.config.js b/stubs/default/vite.config.js index 89f26f5db..421b56956 100644 --- a/stubs/default/vite.config.js +++ b/stubs/default/vite.config.js @@ -4,10 +4,7 @@ import laravel from 'laravel-vite-plugin'; export default defineConfig({ plugins: [ laravel({ - input: [ - 'resources/css/app.css', - 'resources/js/app.js', - ], + input: ['resources/css/app.css', 'resources/js/app.js'], refresh: true, }), ], diff --git a/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx b/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx index cb2320654..980a5adf1 100644 --- a/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx +++ b/stubs/inertia-react-ts/resources/js/Pages/Auth/Login.tsx @@ -17,7 +17,7 @@ export default function Login({ const { data, setData, post, processing, errors, reset } = useForm({ email: '', password: '', - remember: false, + remember: false as boolean, }); const submit: FormEventHandler = (e) => { @@ -78,7 +78,10 @@ export default function Login({ name="remember" checked={data.remember} onChange={(e) => - setData('remember', e.target.checked) + setData( + 'remember', + (e.target.checked || false) as false, + ) } /> diff --git a/stubs/inertia-react/resources/js/Layouts/AuthenticatedLayout.jsx b/stubs/inertia-react/resources/js/Layouts/AuthenticatedLayout.jsx index cecb24a91..a52677b51 100644 --- a/stubs/inertia-react/resources/js/Layouts/AuthenticatedLayout.jsx +++ b/stubs/inertia-react/resources/js/Layouts/AuthenticatedLayout.jsx @@ -5,7 +5,7 @@ import ResponsiveNavLink from '@/Components/ResponsiveNavLink'; import { Link, usePage } from '@inertiajs/react'; import { useState } from 'react'; -export default function Authenticated({ header, children }) { +export default function AuthenticatedLayout({ header, children }) { const user = usePage().props.auth.user; const [showingNavigationDropdown, setShowingNavigationDropdown] = diff --git a/stubs/inertia-react/resources/js/Layouts/GuestLayout.jsx b/stubs/inertia-react/resources/js/Layouts/GuestLayout.jsx index bfe75b0bb..c0675398c 100644 --- a/stubs/inertia-react/resources/js/Layouts/GuestLayout.jsx +++ b/stubs/inertia-react/resources/js/Layouts/GuestLayout.jsx @@ -1,7 +1,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo'; import { Link } from '@inertiajs/react'; -export default function Guest({ children }) { +export default function GuestLayout({ children }) { return (
diff --git a/stubs/inertia-vue-ts/resources/js/Components/Modal.vue b/stubs/inertia-vue-ts/resources/js/Components/Modal.vue index ff99736c6..0e96a3682 100644 --- a/stubs/inertia-vue-ts/resources/js/Components/Modal.vue +++ b/stubs/inertia-vue-ts/resources/js/Components/Modal.vue @@ -1,5 +1,5 @@ diff --git a/stubs/inertia-vue-ts/tsconfig.json b/stubs/inertia-vue-ts/tsconfig.json index fab818e64..41cc067eb 100644 --- a/stubs/inertia-vue-ts/tsconfig.json +++ b/stubs/inertia-vue-ts/tsconfig.json @@ -16,5 +16,5 @@ "ziggy-js": ["./vendor/tightenco/ziggy"] } }, - "include": ["resources/js/**/*.ts", "resources/js/**/*.d.ts", "resources/js/**/*.vue"] + "include": ["resources/js/**/*.ts", "resources/js/**/*.vue"] } diff --git a/stubs/inertia-vue/resources/js/Components/Modal.vue b/stubs/inertia-vue/resources/js/Components/Modal.vue index 5fcfc8f38..01e7fbc80 100644 --- a/stubs/inertia-vue/resources/js/Components/Modal.vue +++ b/stubs/inertia-vue/resources/js/Components/Modal.vue @@ -1,5 +1,5 @@ diff --git a/stubs/livewire-common/resources/views/components/action-message.blade.php b/stubs/livewire-common/resources/views/components/action-message.blade.php index 46ac232ad..fe21e63be 100644 --- a/stubs/livewire-common/resources/views/components/action-message.blade.php +++ b/stubs/livewire-common/resources/views/components/action-message.blade.php @@ -6,5 +6,5 @@ x-transition:leave.opacity.duration.1500ms style="display: none;" {{ $attributes->merge(['class' => 'text-sm text-gray-600 dark:text-gray-400']) }}> - {{ $slot->isEmpty() ? 'Saved.' : $slot }} + {{ $slot->isEmpty() ? __('Saved.') : $slot }}