Skip to content

Pre-release 4.2.105 → 4.2.104 — task 4.3 translation swap (illuminate/translation v13) - #76

Merged
agissept merged 1 commit into
masterfrom
pre-release/4.2.105
Sep 29, 2026
Merged

agissept merged 1 commit into
masterfrom
pre-release/4.2.105

Conversation

@agissept

Copy link
Copy Markdown
Member

Task 4.3 (L2 per-unit): swap illuminate/translation → ^13 (flip-only). Stacked di atas #75 (4.2.104 log).

Perubahan

  • composer: illuminate/translation replace → require ^13 (v13.33.0). v13 Translation\* shadow tree fork (PSR-4 seed).
  • v13 Translator implement Contracts\Translation\Translator (buang Symfony TranslatorInterface + trans()/transChoice()); LoaderInterface→Contracts\Translation\Loader; Interval/PluralizationRules lebur ke MessageSelector.
  • Shim Foundation\Application untuk v13 TranslationServiceProvider: getFallbackLocale() + bind path.lang (=> path/lang) di bindInstallPaths. Keduanya ponytail:-marked, dicabut saat Foundation swap.
  • Validation (masih fork) coupling: Factory/Validator type-hint Symfony TranslatorInterface (v13 tak implement) + Validator panggil ->trans() (dihapus v13) → repoint import ke Illuminate\Contracts\Translation\Translator (aliased) + trans()→get() (5 titik). Test Validation fork disesuaikan (v13 Translator + addResource shim; mock ke Illuminate contract).
  • Drop tests/Translation/{TranslationTranslatorTest,TranslationFileLoaderTest} (vendored-behavior).

Fork suite 527 hijau.

App matched-pair: dicoding#5914.

@agissept agissept self-assigned this Sep 26, 2026
@agissept
agissept marked this pull request as draft September 26, 2026 04:52
@agissept
agissept added this pull request to stack #80 September 28, 2026 10:04
@agissept
agissept force-pushed the pre-release/4.2.105 branch 2 times, most recently from 767edc9 to b6cdc49 Compare September 29, 2026 08:28
Base automatically changed from pre-release/4.2.104 to master September 29, 2026 09:32
@agissept
agissept marked this pull request as ready for review September 29, 2026 09:32
v13 replaces the whole component (flip-only): Translator now implements
Contracts\Translation\Translator (drops Symfony TranslatorInterface + trans()/
transChoice()); LoaderInterface -> Contracts\Translation\Loader; Interval/
PluralizationRules fold into MessageSelector. v13 Translation\* shadows the fork
tree via the PSR-4 seed mechanism.

- composer: illuminate/translation self.version -> ^13 (v13.33.0).
- Foundation\Application shims for the v13 TranslationServiceProvider:
  * getFallbackLocale() (v13 provider reads it; L4.2 fork lacked it).
  * bind 'path.lang' (=> path/lang) in bindInstallPaths (v13 FileLoader reads path.lang).
  Both ponytail-marked, remove at Foundation swap.
- Validation is still fork-owned and coupled to the translator: Factory/Validator
  type-hinted Symfony\Contracts\Translation\TranslatorInterface (v13 Translator no longer
  implements it) and Validator called $translator->trans() (removed in v13). Repoint the
  import to Illuminate\Contracts\Translation\Translator (aliased) and trans() -> get()
  (5 sites). Fixed the fork Validation tests accordingly (v13 Translator + addResource
  shim; mocks retargeted to the Illuminate contract).
- Drop tests/Translation/{TranslationTranslatorTest,TranslationFileLoaderTest} (vendored
  behavior: mocked the old Illuminate\Translation\LoaderInterface / fork Translator ctor).

Fork suite 527 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@agissept
agissept merged commit 44e2874 into master Sep 29, 2026
2 checks passed
@agissept
agissept deleted the pre-release/4.2.105 branch September 29, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant