Installation:
composer.json:
"repositories": [{
"type": "vcs",
"url": "https://github.com/akeneo-labs/DevToolboxBundle.git",
"branch": "master"
}]
composer require akeneo-labs/dev-toolbox-bundle:v1.0.0
app/AppKernel.php:
$bundles[] = new Pim\Bundle\DevToolboxBundle\PimDevToolboxBundle();
First Use Case:
akeneo:attribute:delete command to delete an attribute:
php bin/console akeneo:attribute:delete <attribute-code>
akeneo:attribute:set-scopable command to change an attribute’s scope:
php bin/console akeneo:attribute:set-scopable <attribute-code> <scope>
Where to Look First:
Attribute Management:
akeneo:attribute:delete to remove attributes safely (e.g., during development or cleanup). Confirm with --force if needed:
php bin/console akeneo:attribute:delete --force <attribute-code>
akeneo:attribute:set-scopable to modify an attribute’s scope (e.g., ecommerce or master). Example:
php bin/console akeneo:attribute:set-scopable product_reference master
Workflow Integration:
- name: Cleanup Attributes
run: php bin/console akeneo:attribute:delete --force unused_attribute
Leveraging Akeneo PIM:
pim:attribute:create) for full attribute lifecycle management.Scope Limitations:
product_reference to master scope may disrupt product identification.Force Flag Misuse:
--force flag bypasses confirmation prompts. Use cautiously to avoid accidental deletions:
php bin/console akeneo:attribute:delete critical_attribute # ❌ Avoid without confirmation
php bin/console akeneo:attribute:delete --force critical_attribute # ⚠️ Risky
Dependency Conflicts:
akeneo/pim-community-dev:~1.3. Ensure compatibility with your Akeneo version.Command Errors:
[ERROR] Attribute "invalid_code" does not exist.
--verbose for detailed output:
php bin/console akeneo:attribute:delete <code> --verbose
Database Locks:
Backup First:
mysqldump -u [user] -p[password] [database] > backup.sql
Batch Processing:
for code in $(cat attributes_to_delete.txt); do
php bin/console akeneo:attribute:delete --force "$code"
done
Extension Points:
config/services.yaml:
Pim\Bundle\DevToolboxBundle\Command\AttributeDeleteCommand:
arguments:
$attributeManager: '@custom.attribute_manager'
How can I help you explore Laravel packages today?