Commit Graph

141 Commits

Author SHA1 Message Date
Nuno Maduro 13a81bf921
Removes `CreatesApplication` (#6310) 2024-01-03 07:52:33 -06:00
Taylor Otwell 428a190050
[11.x] Slim skeleton (#6188)
See: https://github.com/laravel/framework/pull/47309

# Laravel 11 Skeleton Overview

### General Notes

More environment variables have been added to the `.env.example` file. 

The default `QUEUE_CONNECTION` variable value has been updated to `database` instead of `sync`.

The `BROADCAST_DRIVER` and `CACHE_DRIVER` environment variables have been renamed to `BROADCAST_CONNECTION` and `CACHE_STORE`, respectively.

The HTTP Kernel has been removed. Configuration that was previously done in this file can be done in the `bootstrap/app.php` file, including registering / replacing middleware.

The console kernel has been removed. Schedules can be defined in the console “routes” file. Commands generated by `make:command` are automatically loaded and do not require registration. Additional command loading paths can be registered in the `bootstrap/app.php` file.

The exception handler has been removed. Exception handling behavior can be configured in the `bootstrap/app.php` file via `reportable`, `renderable`, `throttle`, and more. Callbacks received by these functions will have their type hints inspected to see if they handle a given exception.

The base HTTP controller no longer extends any other classes (requiring new middleware definition feature). No traits are included by default on the base controller. Authorization can be done using facades, or traits can be added manually.

All middleware has been removed. Configuration of these middleware’s behavior can be done via static methods on the middleware themselves (see framework notes).

The `User` model now utilizes a `casts` method instead of a property. The `HasApiTokens` trait has been removed by default since Sanctum is not installed by default.

All service providers except the `AppServiceProvider` have been removed. Policies are auto-discovered and gates can be registered in `AppServiceProvider`. Likewise, events can be registered in `AppServiceProvider`. Routing behavior is now determined / customized in the `bootstrap/app.php` file.

New `bootstrap/app.php` file can be used to customize core framework behavior like routing, container bindings, middleware, and exception handling.

Sanctum is no longer installed by default (see `install:api`).

Configuration files are not present by default. Can be published by `config:publish` command. Default values are present in the framework and application level configuration now cascades with framework definitions, so only customized values need be present in application level configuration files.

Migration files have been re-dated to be evergreen. The `password_reset_tokens` table migration has been combined into the `users` table migration file. Likewise, the `jobs` table migration has been combined into a single migration with the `failed_jobs` table.

Echo bootstrapping has been removed by default. It is re-inserted by new `install:broadcasting` command.

API and channel routes files are not present by default, can be recreated by `install:api` and `install:broadcasting` respectively.
2023-11-28 14:28:15 -06:00
Nuno Maduro 55af5469c3
[10.x] Uses PHP Native Type Declarations 🐘 (#6010)
* Adds basic typing around method's arguments and return types

* Adds missing `closure` type

* Adds typing on tests

* Fixes `RedirectIfAuthenticated`

* Fixes `Authenticate`

* Improves `RedirectIfAuthenticated` types

* Fixes user factory `unverified` return type
2023-01-03 10:35:24 +01:00
Nuno Maduro fa5e54a2ab
[9.x] Uses `laravel/pint` for styling (#5945)
* Uses `laravel/pint` for styling

* Makes `.styleci.yml` ignored on export

* Update composer.json

Co-authored-by: Dries Vints <dries@vints.io>
2022-07-15 08:38:49 -05:00
Dries Vints e124d6d98d
Merge branch '8.x'
# Conflicts:
#	CHANGELOG.md
#	composer.json
2021-10-05 20:42:43 +02:00
Taylor Otwell 6a68092228
Revert "Uses `LazilyRefreshDatabase` by default (#5696)" (#5700)
This reverts commit 4578193d52.
2021-10-05 09:23:35 -05:00
Taylor Otwell bdcb9681a6 fix conflicts 2021-10-02 10:47:56 -05:00
Nuno Maduro 4578193d52
Uses `LazilyRefreshDatabase` by default (#5696) 2021-09-29 08:20:24 -05:00
Dries Vints 5808129a1f
Rename test methods (#5574) 2021-03-26 07:47:26 -07:00
Taylor Otwell 919ea4ceb2 update tests 2020-12-28 17:06:01 -06:00
Dries Vints f4b1dc6df0 [6.x] Implement integration test and in-memory DB (#5169)
* Use in-memory DB for testing

* Extend from PHPUnit test case for unit tests
2019-12-06 09:46:02 -06:00
Tim MacDonald 42e864f3f5 remove testing bootstrap extension (#5107) 2019-09-13 07:19:06 -05:00
Dries Vints e656932002 Apply fixes from StyleCI (#5100) 2019-09-10 17:26:00 +02:00
Sjors Ottjes 42936c656c style 2019-09-06 08:17:43 +02:00
Sjors Ottjes 731cd4c499 add phpunit extension 2019-09-06 08:16:34 +02:00
Sjors Ottjes 360993c11e
Update bootstrap.php 2019-09-05 16:10:59 +02:00
Taylor Otwell 8f2a27868f formatting 2019-07-30 16:40:52 -05:00
Tim MacDonald 8ca562265e
style fix 2019-07-09 13:05:55 +10:00
Tim MacDonald 56960ed2a0
introduce test bootstrapping 2019-07-09 11:54:50 +10:00
Roberto Aguilar dc320c8942
Set bcrypt rounds using the hashing config 2018-04-18 10:09:32 -05:00
Taylor Otwell 7b138fe398 set rounds 2017-12-19 08:17:01 -06:00
Taylor Otwell 4bfb164c26 lower rounds 2017-12-19 08:16:00 -06:00
Laurence Ioannou a8407fdb54
Update CreatesApplication.php 2017-12-19 11:47:10 +00:00
Laurence Ioannou c1166f3734
Update CreatesApplication.php 2017-12-19 11:41:38 +00:00
Marcus Moore faa3d2fa34 update example unit test to use RefreshDatabase trait 2017-08-12 18:21:49 -07:00
Taylor Otwell c989b23f36 rename trait 2017-04-11 18:37:49 -05:00
Taylor Otwell 8f6a4897a2 remove trait by default 2017-04-11 18:35:46 -05:00
Taylor Otwell a536402228 update example test 2017-04-11 18:35:01 -05:00
Taylor Otwell a7481f69d5 fix assertion 2016-12-05 13:22:14 -06:00
Taylor Otwell ba5bde7c91 add trait 2016-12-05 12:58:44 -06:00
Taylor Otwell b64d1e3dc8 fix example test 2016-12-05 12:40:03 -06:00
Taylor Otwell ff15da8d59 remove trait from test 2016-11-29 16:17:23 -06:00
Taylor Otwell 08eefbcc11 Organize tests. 2016-11-29 15:48:33 -06:00
Taylor Otwell ff70fac5b8 Fix test. 2016-07-24 15:02:01 -05:00
Amo Chohan 7a449f86b9 Make TestCase abstract 2016-06-02 13:14:42 +01:00
Pantelis Peslis 16e37cb370 Use the ::class notation 2015-06-08 10:29:33 +03:00
Taylor Otwell c3128ad92a import trait 2015-05-28 10:15:09 -05:00
Taylor Otwell ed93318cb7 Update test case. 2015-05-06 16:58:03 -05:00
Taylor Otwell 88f5182d1f Use short-cut. 2015-04-28 13:36:52 -05:00
Austin H 0bbe752e87 Fix more spacing.
This converts AppServiceProvider to spaces since it wasn't and removes
a few empty lines after class declarations.
2015-03-20 20:30:50 -07:00
Taylor Otwell 4c78958b5b Tweak a few things. 2015-02-22 22:37:16 -06:00
Taylor Otwell cc2139ac91 Tweaking a few things. 2015-02-22 21:56:03 -06:00
Taylor Otwell f424b87a63 PSR-2 for app. 2015-02-22 20:47:03 -06:00
Taylor Otwell 0a01aca6b4 Use the console kernel. 2014-11-07 11:56:21 -06:00
Taylor Otwell f66122149a Bootstrap the application when testing. 2014-11-07 10:07:31 -06:00
Taylor Otwell 4301348646 Large refactor of HTTP and Console stack. 2014-10-20 11:14:41 -05:00
crynobone e084583077 Move PHPUnit to require-dev and fixes directory references to tests.
Signed-off-by: crynobone <crynobone@gmail.com>
2014-08-20 19:36:09 +08:00
Taylor Otwell 9aae50e501 Working on the default app structure. 2014-08-18 22:46:16 -05:00
Taylor Otwell 70f586281f removing tests and vendor. 2012-03-27 15:50:33 -05:00
Taylor Otwell 9eabd73b64 <auto> merging hotfixes. re-added tests into repository. 2012-03-27 15:47:04 -05:00