177 questions
1
vote
1
answer
64
views
Is it possible to override the ID generation strategy defined in Doctrine Translatable AbstractPersonalTranslation?
I need some help regarding the usage of Doctrine Translatable (from Doctrine Extensions)
Context
I use Doctrine Translatable to translate an entity, and my use-case follows closely this example from ...
0
votes
2
answers
108
views
Gedmo/Doctrine Tree Extension Cannot use object as array
I've created an entity with a closure table and a repository alongside. I'm trying a basic example of building a tree but am seeing the error Cannot use object of type App\Entity\Discussion\Comment as ...
0
votes
0
answers
29
views
SoftDeleteable documents in Doctrine MongoDB in Symfony
Does anyone have any information on how to turn on softdeleteable for MongoDB Documents in Symfony?
I see the classes are present in the library, and I tried to turn them on, but everything ...
1
vote
1
answer
233
views
How to query a translatable property with API Platform and Gedmo Translatable
I am using Symfony 6 + API Platform + Gedmo Translatable.
Updating / posting items is working perfectly and storing the translations correctly.
Also getting a collection in the correct language is ...
0
votes
1
answer
581
views
Entity with TimestampableEntity trait fails on PUT operation
I'm on a fresh install of API Platform (v3.2.7) and I'm using Gedmo\Timestampable\Traits\TimestampableEntity
This is my entity (Greeting example)
<?php
namespace App\Entity;
use ApiPlatform\...
2
votes
0
answers
160
views
How to order entities by case-insensitive string using API Platform?
I am using API Platform 3.0. In my application, I have an entity that includes a 'title' field. I'm looking to sort the entities by this 'title' field in a case-insensitive manner.
I currently have ...
0
votes
1
answer
547
views
Symfony UX Autocomplete - choice_label with KnpLabs Translatable
Autocomplete choice labels don't translate
Platform is Symfony 6.3, with UX Autocomplete 2.9
My issue
My issue: I have a Symfony UX Autocomplete form field, the choice_labels are stored in translated ...
0
votes
1
answer
92
views
Doctrine Extension working locally but doesn't work on the live server
I'm binding entity manager in the container like this with the configurations including the DATE extension function
.......
Config::class => create(Config::class)-&...
0
votes
0
answers
419
views
Symfony, doctrine, API platform - problem with filter
I get my data into Vue Js app with API platform mechanism called - “properties[]”. My URL look like “http://address/resource?properties[subresources]=id. I have custom doctrine extension to checking ...
0
votes
1
answer
2k
views
Listener "SoftDeleteableListener" was not added to the EventManager. Soft delete works but i can't register softdeleteable filter
I'm having issues with soft delete from "stof/doctrine-extensions-bundle" package. I'm running Symfony 5.4.
SoftDelete functionality actually works fine, but I can't set up the ...
1
vote
1
answer
234
views
Use Extension to filter OneToMany relationship
I'm using API Platform 3 and Gedmo's Softdeleteable Extension. For my entities, I'm using Extensions to add $queryBuilder->andWhere('o.deletedAt IS NULL') to all queries.
This is working fine, but ...
1
vote
1
answer
1k
views
How to use DoctrineExtensions Blameable from the command line?
I am using DoctrineExtensions Blameable to store the user who created an entity, and when making a HTTP request with JWTs, all is working as desired.
<?php
namespace App\Entity;
use Doctrine\ORM\...
0
votes
0
answers
452
views
Doctrine getRepository call cannot find class following composer update
I have run a composer update on my Symfony 4.4 project and ran into an issue that will run throughout my project.
The following line:
$this->stadiumEntity = $this->getDoctrine()->...
-1
votes
1
answer
940
views
Test DB schema different than production DB (doctrine:schema:create)
I am setting up a test environment for unit tests, following Symfony's Test-Guide.
However each time I deploy the test-DB the final tables look slightly different than the originals from the ...
1
vote
0
answers
251
views
How to automatically add a property on every Entities
It's been days that I'm trying to achieve the following :
Add a deletedAt property on every entities by default without having to use a trait, or adding inheritance (or mapped superclasses) to all of ...
0
votes
1
answer
665
views
Symfony/flex problem installing stof_doctrine_extensions
I'm trying to use slugs for my symfony project. The first thing that I wanted to do is to install StofDoctrineExtensionsBundle. I tried to follow the tutorial in symfony website
https://symfony.com/...
0
votes
2
answers
421
views
"Syntax error or access violation: 1064" When changing column type from string to integer [LARAVEL MIGRATION]
In the down() function of my migration i have the following line:
$table->integer('placeholder')->change();
Here I try to change the column type 'number' from string(750 characters) to integer....
0
votes
1
answer
974
views
Using Doctrine extension Translatable with API Pplatform
I'm trying to add a feature of multi language to my application using API Plateform and ReactJS.
I've installed StofDoctrineExtensionsBundle, I want to use the extension Translatable.
I send the local(...
0
votes
0
answers
364
views
Symfony / Doctrine materializedPath issues
I have followed the docs:
https://github.com/Atlantic18/DoctrineExtensions/blob/v2.4.x/doc/tree.md#materialized-path
I am getting the following error:
An exception occurred while executing 'UPDATE ...
2
votes
2
answers
2k
views
ApiPaltform - recover soft deleted element
I'm using ApiPlatform and Symfony5
I've implemented softdelete on an entity User
This entity is softdeleted properly, I still want to displayed the deleted users for some roles, so I'm trying a ...
1
vote
0
answers
232
views
Doctrine DateInterval in QueryBuilder
Doctrine 2 supports FieldType "interval" and it is stored in DB as varchar "+P00Y00M168DT00H00M00S"
For Entity's this is enough to add this to an DateTime-Object.
But i wonder why this can't used in ...
2
votes
1
answer
2k
views
How to get some child nodes by id with all parents (DoctrineExtensions, Gedmo-Tree NestedTreeRepository, Symfony)
Goal:
I have a category entity.
Every category can have subcategories.
Now I want to get specific category nodes by id with all its parents
My current solution (custom repository function):
public ...
2
votes
1
answer
248
views
when I try to write a dql query there is an error for lag & over ( beberlei/DoctrineExtensions )
I'm trying to convert a MySQL8 query to Doctrine DQL in Symfony4. I used to https://github.com/beberlei/DoctrineExtensions extensions. But there are still errors.
Query is work well.
SELECT id, ...
1
vote
1
answer
1k
views
Symfony DI: access config params on compiler pass during bundle build
Is it possible to get config parameters during compiler pass?
I have this extention config:
my_extension:
foo: 'bar'
I need to see if a config is set before adding a compiler pass:
<?php
...
-1
votes
1
answer
414
views
Cannot sort One-To-Many association with Doctrine
I am following the doctrine documentation about sort association: Ordering To-Many Associations
I have a category entity, it has many articles:
class Category
{
/**
* @ORM\OneToMany(...
1
vote
0
answers
951
views
Symfony 3.4 - updating entity after soft-deleting related entity row
I've got an entity called Logs that has a ManyToOne relation to an HourlyRates entity. Both Logs and HourlyRates have date properties. When adding a log with a specific date, an hourlyRate is assigned ...
0
votes
0
answers
2k
views
gedmo loggable doesn't save in database
I want to register logs when i update my entity with gdmo-loggable, the table exists but no one register.
Here's my current code
# config.yaml
# Doctrine Configuration
doctrine:
orm:
...
3
votes
1
answer
2k
views
Symfony vich uploader and doctrine loggable extension problem?
I am using this two libraries to create an entity that has a picture using vich/uploader-bundle and I am logging entity changes history using the loggable doctrine extension provided from stof/...
3
votes
1
answer
2k
views
PHP Timestampable - update and create for one single field, possible?
I have two fields in my entity - $creationDate and $lastUpdate, which I am updating with the help of:
@Gedmo\Mapping\Annotation\Timestampable(on="create")
and respectively.
@Gedmo\Mapping\...
0
votes
1
answer
586
views
How to load tables with static content in production environment with symfony 3.4
Scenario
We want to autofill a table with new static content with doctrine, ideally with something like a fixture class or similar.
We follow the simple development life-cycle with development to ...
1
vote
2
answers
374
views
how to use utc timestamp symfony 4?
How to use utc_timestamp in Symfony 4?
Getting below message while using utc_timestamp
[Semantical Error] line 0, col 199 near 'UTC_TIMESTAMP': Error:
'UTC_TIMESTAMP' is not defined.
1
vote
0
answers
1k
views
How to configure Gedmo Sluggable in Symfony 4 properly?
I have tried to configure Gedmo Sluggable properly in a Symfony 4 application and failed. The issue is: it is not working. Any sluggable columns aren't recognized as being sluggable and stay empty ...
3
votes
0
answers
1k
views
Is Sortable compatible with Symfony 4.2 (using stof/doctrineExtensionsBundle)?
I am using stof/doctrineExtensionsBundle v1.3 with Symfony v4.2.4, having some trouble setting up the Sortable extension. I have installed the bundle using Symfony flex:
composer require stof/...
0
votes
1
answer
500
views
Sort Gedmo Tree by arbitrary field using symfony4, doctrine2 and stofDoctrineExtensionsBundle
Introduction
For my personal project i am using:
Windows 10 Pro
XAMPP with PHP v7.2.14
Postgres v10.6
Symfony v4.2.4
Doctrine v2.6.3
StofDoctrineExtensionsBundle in order to manage Tree structure.
...
0
votes
1
answer
355
views
How to set an user value in BlameableListener in a Zend Expressive application context?
How can I set an user value on Gedmo\Blameable\BlameableListener in a Zend Expressive application?
The event subscribers are successfully added to the EventManager (see configuration file). The ...
1
vote
3
answers
4k
views
YEAR() and beberlei/DoctrineExtensions
I have to make requests with YEAR and I installed beberlei/DoctrineExtensions with doctrine command. I added the requested annotations
doctrine:
orm:
auto_generate_proxy_classes: '%kernel....
1
vote
1
answer
2k
views
How to get DoctrineExtensions sluggable working with doctrine 2.3 / symfony 3.4?
I try to get sluggable doctrine extention working on my project. I follow a setup step found on Internet, bu it seems to not working (@Gedmo\Slug seems to be not called/triggered).
The purpuse is to ...
1
vote
1
answer
330
views
Doctrine Translatable: How to return default value of field if translatable field is not exist
I use Doctrine Translatable for tranlate of my some entity. For example: I have entity "Category" and this entity has one translatable field - "name":
/**
* @ORM\Entity(repositoryClass="AppBundle\...
10
votes
1
answer
5k
views
Using Doctrine extension softdeleteable with api-platform
I'm building an API with Symfony 3.4 and api-platform. I want to use soft delete on my entity. I've installed DoctrineExtensions and StofDoctrineExtensionsBundle.
config.yml:
doctrine:
dbal:
...
1
vote
2
answers
4k
views
API Platform - Entity Translation, Doctrine Translatable
I'm trying to add KnpLabs Doctrine Behaviors - and precisely, the Translatable Behavior - on one of the entity in my API Platform project.
Here's what I've done so far :
namespace App\Entity;
...
0
votes
1
answer
1k
views
How to use sluggable handler, only if a slug is empty?
I use Symfony 3 framework and the sluggable doctrine extension. I need generate a slug with code like this:
<?php
/**
* @Gedmo\Mapping\Annotation\Slug(handlers={
* @Gedmo\Mapping\Annotation\...
0
votes
1
answer
583
views
Symfony Creof FUNCTION mydbname.distance doesn't exist
I'm trying to use the Creof bundle and its Distance function. When I execute the following code, I get the following exception:
public function getMapDecorator(array $requestInformation, $type) : ...
1
vote
1
answer
907
views
Generating Softdeleteable query with StofDoctrineExtensionsBundle [duplicate]
I'm expecting, it should update deleted_at field when I've executed DELETE query. And it should add deleted_at is null condition to end of SELECT query. But its really delete rows with a silly ...
0
votes
1
answer
77
views
Doctrine2 loading DoctrineExtensions
I want to use the DAY() and YEAR() functions in my Doctrine2 query builder. But somehow I keep on getting errors:
Fatal error: Uncaught Doctrine\ORM\Query\QueryException: SELECT DAY(h.date) AS day ...
2
votes
1
answer
757
views
Cloning Doctrine entity with translations made with DoctrineExtensions Translatable
I have entities with traslated fields using Translatable from DoctrineExtensions. This is how it looks:
/**
* @ORM\Table
* @ORM\Entity(repositoryClass="AppBundle\Entity\Repository\...
0
votes
1
answer
989
views
How to use PostgreSQL COLLATE modifier in Doctrine
I use Doctrine and PostgreSQL database in my project and I would like to make it translatable. The problem is that I would like to sort some strings correctly related to the selected language customs.
...
0
votes
2
answers
809
views
error on override akeneo entity
I try to override the category entity of an akeneo project. I follow the doc but always have an error i can't resolve.
added this in config.yml
-
original: Pim\Bundle\CatalogBundle\Entity\...
1
vote
0
answers
735
views
Gedmo Translatable yaml mapping
Is it possible to map Gedmo with yaml ? I'm using yaml file in my project and I would like to use Translatable from doctrine extensions but I have a problem with it.
I have something like that (one ...
0
votes
1
answer
1k
views
Symfony + DoctrineFixtures could not find fixtures in directory
Im running my own project with Symfony 3.3.*, trying to install DoctrineFixturesBundle.
This is my fixture loader.
namespace AdminBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\...
6
votes
1
answer
820
views
Custom JSON serializers for a Symfony 3 entity
I have a Symfony 3.2 entity using Doctrine's Translatable extension.
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\...