Skip to content

Pre-release 4.2.125 → 4.2.124 — task 4.5 (config): key:generate and config:publish follow configPath() - #98

Merged
agissept merged 1 commit into
masterfrom
pre-release/4.2.125
Oct 6, 2026
Merged

agissept merged 1 commit into
masterfrom
pre-release/4.2.125

Conversation

@oonid

@oonid oonid commented Oct 1, 2026 •

Copy link
Copy Markdown

Task 4.5, config — key:generate and config:publish follow configPath()

Stacks on #97. This is the second config slice. The dicoding app pair moves its configuration from app/config/ to config/, the directory a Laravel 13 app uses and the fork's LoadConfiguration reads by default since 4.2.124. Two fork commands still built their paths from app/config. They now follow configPath().

Changes

  • key:generate replaces the key in configPath('app.php').
    • Its --env variant wrote app/config/{env}/app.php. Since 4.2.124 the configuration no longer cascades from that folder, so the variant is removed, and the command always writes the one app.php.
    • In v13, key:generate writes APP_KEY to .env. That comes with the env-file slice.
  • The config publisher behind config:publish publishes package configuration under configPath().
  • Tests: a new FoundationConfigurationPathTest uses an application whose config path was moved with useConfigPath():
    • key:generate replaces the key in that app.php, keeps the file's other values, updates app.key and reports the new key;
    • the config publisher's destination is under that path.

Verification

  • Fork: the suite is 278 green on PHPUnit 11.5.56. The ratchet is green, with every pattern at its baseline.
  • The tests catch real breaks. Each of these 3 mutations fails at least one test:
    • key:generate still reading app/config/app.php;
    • the new key not written;
    • the publisher still under app/config.
  • Downstream: the dicoding app pair is dicoding-dev/dicoding#6002 (feature/platform/framework-4.2.125-rc1). It moves app/config/ to config/ and drops its useConfigPath() call. It ran with vendor installed exactly from its lock:
    • config()->all() is the same as 4.2.124 in production, local, testing and endtoend. The only differences are the spellings of two paths built from the config file's own location, and they resolve to the same directory and file.
    • Psalm (full project, no cache): no errors.
    • Unit suite: 8964 green.
    • Integration suite: all 3023 tests. The only failures are the 4 long-standing ones and two known flaky tests: one time-boundary test and one order-sensitive test. Each passed 5 of 6 runs alone. 196 are skipped, and no test is flagged risky.
    • The real entry points (php -S + server.php → index.php, and 7 artisan commands) and the 13 in-process request scenarios are identical to 4.2.124.
  • Checks ran in a cloud container without deck (PHP 8.4.26, MariaDB 10.11).

Tag

4.2.125 (92290d07) is not pushed, and neither are 4.2.119–4.2.124. Tag pushes are refused for this session.

🤖 Generated with Claude Code

https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo

@agissept
agissept force-pushed the pre-release/4.2.125 branch from 92290d0 to 37e4ab2 Compare October 2, 2026 09:20
@agissept
agissept added this pull request to stack #102 October 5, 2026 06:14
@agissept
agissept force-pushed the pre-release/4.2.125 branch 5 times, most recently from 61d553f to 479dafc Compare October 6, 2026 02:39
@agissept
agissept marked this pull request as ready for review October 6, 2026 03:15
Base automatically changed from pre-release/4.2.124 to master October 6, 2026 06:09
…th() (task 4.5)

The last two fork paths built from app/config follow the configuration
directory instead:

- key:generate replaces the key in configPath('app.php'). Its --env variant
  wrote app/config/{env}/app.php, a folder the configuration no longer
  cascades from, so it goes.
- The config publisher publishes package configuration under configPath().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169SsatCE8LhaTsQTPiGtVo
@agissept
agissept force-pushed the pre-release/4.2.125 branch from 479dafc to 143f39f Compare October 6, 2026 06:09
@agissept
agissept merged commit 1bb5e74 into master Oct 6, 2026
2 checks passed
@agissept
agissept deleted the pre-release/4.2.125 branch October 6, 2026 06:09
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.

3 participants