Clone the Repository
git clone https://github.com/akeneo/pim-community-dev.git
cd pim-community-dev
dev-master branch for the latest development version.Install Dependencies
composer install
composer.json has the correct Akeneo PIM version constraints (e.g., ^3.2 or ^4.0).Configure Environment
.env.dist to .env and update:
APP_ENV=dev
APP_DEBUG=true
DATABASE_URL="mysql://user:pass@127.0.0.1:3306/pim"
php bin/console akeneo:install:framework
First Use Case: Launch a Local PIM Instance
php bin/console server:run
http://localhost:8000 (admin credentials: admin/admin).dev branch).src/ – Core PIM logic (models, services, controllers).config/ – Bundle configurations (e.g., pim_catalog, pim_enrich).var/ – Runtime data (logs, cache, uploads).php bin/console debug:config – Inspect loaded configurations.php bin/console debug:container – Browse service container.Use Case: Adding custom attributes or attribute types.
# config/pim_catalog/attributes.yaml
akeneo_attribute.simple:
pim_catalog.attribute.simple:
- your_custom_attribute
config/pim_catalog/attributes.yaml.// src/Service/CustomAttributeValidator.php
class CustomAttributeValidator implements AttributeValidatorInterface
{
public function validate($value, AttributeInterface $attribute) { ... }
}
services.yaml:
services:
your_bundle.validator.custom:
class: Your\Bundle\Service\CustomAttributeValidator
tags: [pim_catalog.attribute_validator]
Use Case: Adding a tab or modifying the product grid.
{# templates/pim_enrich/product/_tab_custom.html.twig #}
<div class="custom-tab">
{{ include('YourBundle:Product:_custom_content.html.twig') }}
</div>
pim_enrich.grid events (Symfony EventDispatcher).pim_enrich.datagrid.builder to modify columns:
$builder->add('your_custom_column', 'string', [
'label' => 'Your Label',
'searchable' => true,
]);
Use Case: Adding endpoints or modifying API responses.
# config/routes/your_api.yaml
your_api_product:
path: /api/product/custom
methods: [GET]
defaults:
_controller: your_bundle.controller.product::customAction
_format: json
Pim\Bundle\CatalogBundle\Controller\Api\Rest\ProductController.getProduct() to inject custom logic.pim_user.api_token).Use Case: Triggering actions on product updates.
// src/EventListener/ProductUpdateListener.php
class ProductUpdateListener implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [
'pim_catalog.product.update' => 'onProductUpdate',
];
}
public function onProductUpdate(ProductUpdateEvent $event) { ... }
}
pim_catalog.product.create, pim_catalog.attribute.update.ProductManagerInterface to fetch/update products in listeners.Database Migrations
src/Akeneo/Pim/InstallerBundle/Resources/migrations).php bin/console doctrine:migrations:migrate may fail if schema is out of sync. Use:
php bin/console pim:installer:database:load --env=dev
var/data before migrations.Caching Quirks
php bin/console cache:clear
php bin/console pim:installer:assets:install
APP_DEBUG=true to bypass cache during development.Attribute Types
Akeneo\Tool\Component\Attribute\Type\TypeInterface.pim_catalog.attribute.type.simple) instead of reinventing.Symfony Flex Conflicts
akeneo/pim-community-dev may conflict with Symfony Flex recipes.composer config extra.symfony.allow-contrib true
Log Configuration
.env:
MONOLOG_LEVEL=debug
var/log/dev.log.Dumping Data
dump($product->getValues());
php bin/console debug:container | grep serializer
Common Errors
config/bundles.php.php bin/console pim:installer:assets:install --env=dev
Custom Bundles
src/ or vendor/ (for reusable packages).src/
├── Your/
│ └── Bundle/
│ ├── DependencyInjection/
│ ├── Resources/
│ │ └── config/
│ │ └── services.yaml
│ └── YourBundle.php
Hooking into PIM’s Pipeline
pim_catalog.pre_save_product or pim_catalog.post_save_product events.# config/services.yaml
services:
your_bundle.listener.product_hook:
class: Your\Bundle\EventListener\ProductHookListener
tags:
- { name: kernel.event_listener, event: pim_catalog.pre_save_product, method: onPreSave }
Overriding Templates
vendor/akeneo/pim-community-dev/src/Pim/Bundle/*Bundle/Resources/views/ to templates/pim/*bundle/*/ in your project.templates/
└── pim_enrich/
└── product/
└── _form.html.twig
How can I help you explore Laravel packages today?