Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/convergence-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
array_first_last=0
route_uses_string=5
event_fire=3
config_getEnvironment=3
where_raw=1
eloquent_lists=6
macroable_trait=12
Expand Down
1 change: 0 additions & 1 deletion ci/convergence-ratchet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ PATTERNS=(
"array_first_last:::\\b(array_first|array_last)\\("
"route_uses_string:::['\"]uses['\"][[:space:]]*=>"
"event_fire:::->fire\\("
"config_getEnvironment:::getEnvironment\\("
"where_raw:::->whereRaw\\("
"eloquent_lists:::->lists\\("
"macroable_trait:::MacroableTrait"
Expand Down
10 changes: 9 additions & 1 deletion docs/DIVERGENCE-LEDGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Grandfather yang lama; blok yang **baru**.
| `array_first_last` | `array_first($x)` / `array_last($x)` | `Arr::first($x)` / `Arr::last($x)` | helper global dihapus di L13 |
| `route_uses_string` | `Route::get('/x', ['uses'=>'C@m'])` | `Route::get('/x', [C::class,'m'])` | valid di 4.2 **dan** 13 |
| `event_fire` | `Event::fire(...)` / `->fire(...)` | `->dispatch(...)` | rename di L13; `firing()` dihapus |
| `config_getEnvironment` | `Config::getEnvironment()` | helper app `app_env()` (`config('app.env')`) | method **dihapus** di L13 (dipakai app!) |
| `where_raw` | `->whereRaw("id=$id")` | binding `->where('id',$id)` / `?` | SQL injection + konvergensi |
| `eloquent_lists` | `$q->lists('c')` | `$q->pluck('c')` | `->lists()` dihapus |
| `macroable_trait` | `use …\MacroableTrait` | `use …\Macroable` | rename di L13 |
Expand All @@ -29,6 +28,15 @@ Grandfather yang lama; blok yang **baru**.
| `pagination_getters` | `->getCurrentPage()`, `->getLastPage()`, `->getFrom/To/Total/PerPage()` | `->currentPage()`, `->lastPage()`, `->firstItem/lastItem/total/perPage()` | getter di-rename massal |
| `route_filters` | `Route::filter(...)`, `->before(...)`, `->after(...)` | middleware | filter **dihapus total** di L13 |

## Sudah type-enforced (dipindah dari ratchet)

Pola yang komponen fork-nya sudah di-*tighten* (method dihapus tanpa shim) → panggilan lama =
method-not-found (PHP+Psalm menangkap). Grep-ratchet jadi redundan → dicabut (framework-first §0.2).

| `key` (eks-ratchet) | Pola 4.2 | Konvergen ke L13 | Enforcement sekarang |
|---|---|---|---|
| `config_getEnvironment` | `Config::getEnvironment()` | `App::environment()` | task 2.7 drop `Repository::getEnvironment()` (no shim) → method-not-found |

## Gotcha yang butuh perhatian manual (tak di-ratchet, cek saat digarap)

| Isu | Aksi |
Expand Down
12 changes: 1 addition & 11 deletions src/Illuminate/Config/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public function package($package, $hint, $namespace = null)

$this->afterLoading($namespace, function($me, $group, $items) use ($package)
{
$env = $me->getEnvironment();
$env = $me->environment;

$loader = $me->getLoader();

Expand Down Expand Up @@ -342,16 +342,6 @@ public function setLoader(LoaderInterface $loader)
$this->loader = $loader;
}

/**
* Get the current configuration environment.
*
* @return string
*/
public function getEnvironment()
{
return $this->environment;
}

/**
* Get the after load callback array.
*
Expand Down
Loading