Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Grumphp Bom Task

Grumphp Bom Task Laravel Package

pluswerk/grumphp-bom-task

GrumPHP task that checks and fixes files so they have no BOM. Configure the plus_bom_fixer task in grumphp.yml for PHP, CSS, SCSS, LESS, JSON, SQL, YAML, and text files, then register the ExtensionLoader. Install with composer require --dev pluswerk/grumphp-bom-task.

View on GitHub
Deep Wiki
Context7

A TYPO3/PHP Project code-quality config

Frequently asked questions about Grumphp Bom Task
How do I install pluswerk/grumphp-bom-task in a Laravel project?
Install it as a dev dependency with composer require --dev pluswerk/grumphp-bom-task. It is a GrumPHP extension rather than a standalone tool, so GrumPHP itself must already be part of your project's tooling. After installing, register PLUS\GrumPHPBomTask\ExtensionLoader in the extensions section of grumphp.yml so the plus_bom_fixer task becomes available.
How do I configure the plus_bom_fixer task in grumphp.yml?
Add plus_bom_fixer under parameters.tasks and list the file types you want it to run on, for example triggered_by: [php, css, scss, less, json, sql, yml, txt]. Then add PLUS\GrumPHPBomTask\ExtensionLoader to the extensions list in the same file. There is no service provider, config file or Laravel registration step involved, all configuration lives in grumphp.yml.
Which file types can the BOM task check?
The documented example covers PHP, CSS, SCSS, LESS, JSON, SQL, YAML and plain text files. Because GrumPHP triggers tasks by extension, you can extend or trim that list with triggered_by to match your own project, for example adding extensions used by your Blade, Twig or config files. Only files that GrumPHP actually passes to the task are checked.
Does pluswerk/grumphp-bom-task support Laravel 11 and PHP 8.3?
The package is not Laravel-specific, it plugs into GrumPHP, which runs inside any PHP project including Laravel 11 or 12. Laravel apps on PHP 8.2 or 8.3 with a current GrumPHP release are the natural fit. Because a major version bump is the usual point where maintainers drop legacy PHP or GrumPHP versions, check the composer.json constraints of 11.x to confirm the minimum requirements before adopting.
What changed between version 10.x and 11.x of the BOM task?
The visible 11.1.1 notes only mention internal code hygiene such as removing unused imports by default and a Rector follow-up. That suggests BOM detection, file type coverage and the grumphp.yml contract are unchanged. The release that justified the major bump is 11.0.0, so review its changelog and composer.json diff before you upgrade.
How do I upgrade from andersundsehr/grumphp-bom-task?
Rename the task from aus_bom_fixer to plus_bom_fixer and change the loader from AUS\GrumPHPBomTask\ExtensionLoader to PLUS\GrumPHPBomTask\ExtensionLoader in grumphp.yml. Then replace the composer requirement with pluswerk/grumphp-bom-task. Your triggered_by extension list can stay exactly as it is.
Does the BOM fixer rewrite my files or only report them?
The package description says it checks and fixes files so they contain no BOM, and the task name plus_bom_fixer reflects that intent. In practice GrumPHP tasks usually report offending files during a pre-commit or pre-push run and leave the actual change to you or to a separate fixer run. Test it on a scratch file with a known BOM before you rely on automatic rewriting in CI.
Why is the GitHub repository marked READONLY?
The repository is an archive because development moved to the pluswerk organisation, which is why the composer name is pluswerk/grumphp-bom-task and the namespace is PLUS\GrumPHPBomTask. Issues and pull requests belong on the active repository, not the readonly URL. If you stay on the 10.x line, watch whether that branch still receives maintenance now that 11.x is the active release.
Is the LGPL-3.0 license a problem for commercial Laravel applications?
The package is LGPL-3.0, not MIT, so it is not covered by the assumption many teams make about dev-only tooling. Using it as a dev dependency in a proprietary application is generally acceptable, but have your license policy or legal team confirm before adding it, especially if you plan to fork or redistribute it.
Are there alternatives to pluswerk/grumphp-bom-task for removing BOMs?
You can detect the UTF-8 BOM byte sequence with a grep in a Composer script or CI step, or prevent it entirely with editorconfig and IDE settings that enforce UTF-8 without BOM. Teams already running GrumPHP often prefer this package because the check happens in the same pre-commit pipeline as their other static analysis. For a one-off cleanup a short PHP or sed script is usually enough.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package