internal/toml
PHP 8.1+ TOML 1.0/1.1 parser and encoder. Parse TOML into PHP arrays or an AST, modify and round-trip back to TOML. Simple static API (Toml::parse/parseToArray/encode) for config files and tooling.
Toml::parseToArray(), Toml::encode()). The AST access enables advanced workflows like validation or schema enforcement without custom code.[key] = "value" vs. [key]="value") or hex/octal numbers.config/toml/) and wants to eliminate manual parsing, ensuring consistency and reducing errors.spatie/toml (TOML 0.5.0) may suffice.merge() logic for config/array files). This package is framework-agnostic; consider building a thin wrapper or using vlucas/phpdotenv for Laravel-native config loading.rubix/toml or Symfony’s YAML component may be better suited).symfony/yaml or webonyx/graphql-php for validation rules).For Executives:
"Adopting internal/toml (1.1.2) future-proofs our Laravel applications by ensuring seamless integration with modern cloud-native tools like Terraform, Pulumi, and Kubernetes—reducing integration errors and accelerating our IaC adoption. This package resolves critical TOML 1.1 compliance gaps (e.g., bare keys, table arrays), directly improving CI/CD reliability and developer productivity. With a minimal dependency and no vendor lock-in, we gain a spec-compliant, PHP-core-maintained TOML parser, aligning us with industry trends while reducing technical debt in configuration management. The investment is low-risk and high-reward for our infrastructure modernization roadmap."
For Engineering (Technical Leadership):
*"We’re adopting internal/toml 1.1.2 to:
spatie/toml might suffice, but this is the only TOML 1.1-compliant option for Laravel.For Developers: *"This package lets you work with TOML in Laravel like a pro:
$config = Toml::parseToArray(file_get_contents('config.toml'));
$toml = (string) Toml::encode($phpArray); // Hex numbers stay hex!
DateTimeImmutable, JsonSerializable, and custom objects.
Getting started:composer require internal/toml.Toml::parseToArray() for parsing or Toml::encode() for generation.config/toml/.
Example use case: Replace config/app.php with config/app.toml for cleaner, tool-friendly configurations!"*How can I help you explore Laravel packages today?