Using Doctrine in pimcore

Hi!

I want to use doctrine for custom data persisting. I’ve tried to install doctrine orm via composer as mentioned in this post: [thisurl]/t/doctrine-entity/1213
(Just replace [thisurl] with the url of the forum. I can only post 2 links due to newbie status)

I’m getting errors in the migrations, full log see below. Am I missing something or am I doing something wrong?

TIA!

Downloadable (and mybe prettier) logs:


composer.json
{
“name”: “pimcore/skeleton”,
“type”: “project”,
“license”: “GPL-3.0-or-later”,
“config”: {
“optimize-autoloader”: true,
“sort-packages”: true
},
“require”: {
“php”: “>=7.1”,
“wikimedia/composer-merge-plugin”: “^1.4”,
“pimcore/pimcore”: “~5.8.0”
},
“require-dev”: {
“cache/integration-tests”: “^0.16.0”,
“codeception/codeception”: “~2.4.5”
},
“autoload”: {
“psr-4”: {
“”: [“src/”],
“Pimcore\Model\DataObject\”: “var/classes/DataObject”,
“Pimcore\Model\Object\”: “var/classes/Object”,
“Website\”: “legacy/website/lib”
},
“classmap”: [
“app/AppKernel.php”
]
},
“scripts”: {
“post-create-project-cmd”: “Pimcore\Composer::postCreateProject”,
“post-install-cmd”: [
“Pimcore\Composer::postInstall”,
@symfony-scripts
],
“post-update-cmd”: [
“Pimcore\Composer::postUpdate”,
@symfony-scripts”,
“Pimcore\Composer::executeMigrationsUp”
],
“pre-package-update”: [
“Pimcore\Composer::prePackageUpdate”
],
“symfony-scripts”: [
“Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache”,
“Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets”,
“Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile”,
“Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget”
]
},
“extra”: {
“symfony-app-dir”: “app”,
“symfony-bin-dir”: “bin”,
“symfony-var-dir”: “var”,
“symfony-web-dir”: “web”,
“symfony-tests-dir”: “tests”,
“symfony-assets-install”: “relative”,
“merge-plugin”: {
“include”: [
“composer.local.json”
],
“recurse”: true,
“replace”: true,
“merge-dev”: true,
“merge-extra”: false,
“merge-extra-deep”: false,
“merge-scripts”: false
}
}
}

log
D:\dev\web\server\apache\htdocs\pimcore\doctrine.pimcore.test>composer req doctrine/orm
Using version ^2.6 for doctrine/orm
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals

  • Installing doctrine/orm (v2.6.3): Loading from cache
    Writing lock file
    Generating optimized autoload files
    ocramius/package-versions: Generating version class…
    ocramius/package-versions: …done generating version class
    Endroid Installer detected project type “all”

Pimcore\Composer::postUpdate
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

// Clearing the cache for the dev environment with debug true

[OK] Cache for the “dev” environment (debug=true) was successfully cleared.

Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets

Trying to install assets as relative symbolic links.


        Bundle               Method / Error

WARNING PimcoreCoreBundle copy
WARNING PimcoreAdminBundle copy


! [NOTE] Some assets were installed via copy. If you make changes to these assets you have to run this command again.

[OK] All assets were successfully installed.

Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
Pimcore\Composer::executeMigrationsUp

[OK] Pimcore data cache cleared successfully

                Pimcore Core Migrations

Migrating up to 20190508074339 from 20190508074339

++ migrating 20180724144005

 -> Initial Migration

++ migrated (0.02s)

++ migrating 20180830113528

++ migrated (0.6s)

++ migrating 20180830122128

++ migrated (0s)

++ migrating 20180904201947

 -> Changing Database schema for new workflows. Please see upgrade notes for migration of data!

Migration 20180904201947 failed during Execution. Error The column ‘place’ on table ‘element_workflow_state’ already exists.

In SchemaException.php line 119:

The column ‘place’ on table ‘element_workflow_state’ already exists.

pimcore:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–configuration [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-b|–bundle BUNDLE] [-s|–set SET] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [–ignore-maintenance-mode] [–maintenance-mode] [-e|–env ENV] [–no-debug] [–] []

Script Pimcore\Composer::executeMigrationsUp handling the post-update-cmd event terminated with an exception

Installation failed, reverting ./composer.json to its original content.

[RuntimeException]
An error occurred when executing the ““pimcore:migrations:migrate -s pimcore_core -n”” command:

                  Pimcore Core Migrations

Migrating up to 20190508074339 from 20190508074339

++ migrating 20180724144005

   -> Initial Migration

++ migrated (0.02s)

++ migrating 20180830113528


++ migrated (0.6s)

++ migrating 20180830122128


++ migrated (0s)

++ migrating 20180904201947

   -> Changing Database schema for new workflows. Please see upgrade notes for migration of data!

Migration 20180904201947 failed during Execution. Error The column ‘place’ on table ‘element_workflow_state’ alread
y exists.

In SchemaException.php line 119:

The column 'place' on table 'element_workflow_state' already exists.

pimcore:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–configura
tion [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-b|–bundle BUND
LE] [-s|–set SET] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-inte
raction] [–ignore-maintenance-mode] [–maintenance-mode] [-e|–env ENV] [–no-debug] [–] []

require [–dev] [–prefer-source] [–prefer-dist] [–no-progress] [–no-suggest] [–no-update] [–no-scripts] [–update-no-dev] [–update-with-dependencies] [–update-with-all-dependencies] [–ignore-platform-reqs] [–prefer-stable] [–prefer-lowest] [–sort-packages] [-o|–optimize-autoloader] [-a|–classmap-authoritative] [–apcu-autoloader] [–] []…