Skip to content

LaraEnv 0.4.8 — Warning-free php.ini provisioning

Choose a tag to compare

@thayronarrais thayronarrais released this 03 Jun 16:04

What's new in 0.4.8

Fixed: PHP startup warnings on every command

Running php, php artisan tinker, or Composer no longer floods the
terminal with PHP Warning: Unable to load dynamic library 'bcmath'
(and similar) messages.

Root cause: the php.ini generator enabled extensions without
checking whether a matching DLL actually shipped in ext/. Statically
compiled built-ins such as bcmath have no php_bcmath.dll by design,
so the extension=bcmath line could never load and warned on every run —
even though the functions were fully available.

The fix makes php.ini provisioning warning-free by construction and
self-healing:

  • An extension=<x> line is now written only when php_<x>.dll exists
    in ext/. Built-ins and genuinely missing DLLs are skipped.
  • Existing installs are repaired automatically on next launch: dead
    extension= lines (no DLL), duplicate active lines (e.g. the
    mysqli "already loaded" warning), and stale Unix .so example
    paths left over from the PHP template are commented out.

bcmath and other built-ins keep working — they are compiled into the PHP
binary; only the redundant, warning-emitting lines are removed.

Verified clean across PHP 7.4, 8.1, 8.3, and 8.4.

Install / verify

Download LaraEnv-0.4.8.msi and verify with the included sidecar:

(Get-FileHash -Algorithm SHA256 LaraEnv-0.4.8.msi).Hash
# expected: 92954EF7CEEB93C6202017C8727E2F85F9DFD7C752B186E1F919A389AF569670