Weave Code
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
Extended Measure Bundle

Extended Measure Bundle Laravel Package

akeneo/extended-measure-bundle

View on GitHub
Deep Wiki
Context7

Provides new measures for Akeneo PIM CE and EE

Frequently asked questions about Extended Measure Bundle
Can I use this bundle with Akeneo PIM versions beyond 2.x (e.g., 5.x)?
No, this bundle is explicitly tied to Akeneo PIM v1.6–2.x. Newer versions may require a complete rewrite or a fork with dependency updates, as the underlying Symfony and Doctrine components are outdated. Check Akeneo’s official documentation for modern alternatives.
How do I add custom measure families (e.g., for scientific units like 'light-years')?
Define a YAML config under `measures_config` with your family name, standard unit, and conversion rules. For example, add `LightYears` with `standard: METER` and `convert: [{'mul': 9461000000000000}]`. Validate via `php bin/console pim:measures:check` after updating `config.yml`.
Is this bundle compatible with non-Akeneo Laravel projects?
No, it’s tightly coupled to Akeneo’s MeasureBundle and Symfony Console commands. For Laravel, you’d need to extract the core logic (unit conversion math) and rebuild it as a standalone service using Laravel’s service container. The YAML config could be adapted to Laravel’s config files.
What’s the best way to handle unit conversion performance in production?
Pre-compile YAML configs into PHP arrays during deployment to avoid runtime parsing overhead. Cache conversion rates in Redis or Laravel’s cache driver. For high-frequency conversions, consider a microservice with preloaded conversion tables.
How do I migrate existing measure data from Akeneo to another PIM system?
Export configs via `php bin/console pim:measures:export` (if available) or manually parse Akeneo’s database tables (`pim_catalog_measure_family`, `pim_catalog_measure_unit`). Transform YAML/DB data into your target system’s schema (e.g., JSON for APIs or database tables for Laravel).
Are there alternatives for UNECE-compliant measure units in Laravel?
Yes, consider standalone libraries like [`spatie/array-to-object`](https://github.com/spatie/array-to-object) for YAML parsing + custom conversion logic, or [`league/unit`](https://github.com/thephpleague/unit) for unit math. For UNECE codes, manually map them in a Laravel migration or use a dedicated data package.
How do I replace Symfony Console commands (e.g., `pim:measures:check`) in a Laravel project?
Create custom Artisan commands or API endpoints. For example, build a `MeasureValidator` class and call it via `php artisan measure:validate` or a web route. Use Laravel’s `Artisan::call()` to reuse logic from existing commands if porting.
Does this bundle support dynamic measure families (e.g., user-uploaded units)?
No, the bundle relies on static YAML configs. For dynamic units, extend the bundle by adding a database-backed measure repository (e.g., Eloquent models) and modify the conversion service to fetch rules from the DB instead of YAML.
What’s the impact of forking this bundle for a custom solution?
Forking is viable but requires updating Symfony 2.8–3.x dependencies to modern versions (e.g., Symfony 6+). Replace deprecated components like Console commands with Laravel equivalents. Test thoroughly, as the original bundle lacks recent CI or tests.
Can I use this bundle for non-PIM applications (e.g., logistics or scientific tools)?
Yes, but strip Akeneo-specific dependencies (e.g., Doctrine, MeasureBundle). Rebuild the core logic as a Laravel package with a clean API. The YAML config system can be adapted to Laravel’s `config/measure.php` or a database table for dynamic rules.
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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware