Questions tagged [symfony-3.2]

This is the Symfony 3.2.x specific tag. Use it in addition to the symfony3 tag if your question is specific to Symfony 3.2.x — not just 3.x.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

Information

This tag is specific for the 3.2 version of Symfony. See the tag for general Symfony 3.x questions.

The 3.2.0 version was released on the 30th November 2016.

326 questions
1
vote
1 answer

updating form with date field generate error (symfony, php)

I would like to update a form containing a date field. I can create the form with no problem but I could not edit it because I got an error. So here is my first class Contract:
bsm
  • 81
  • 2
  • 9
1
vote
0 answers

Symfony3 render CSS file from Controller

I would like to do this in Symfony 3 : public function styleAction() { // Fetch it from service or whatever strategy you have $backgroundColor = '#ff0000'; return $this->render( 'AcmeMyBundle::somefile.css.twig', …
Joss D.
  • 77
  • 1
  • 12
1
vote
0 answers

Symfony returns NotBlank error message on form field despite not having that constraint

After multiple Google searches (including reading many Stack Overflow questions and answers) and a few hours spent reading the Symfony source code (to no avail), I finally decided to create an account here and ask the community. My problem is that a…
willherzog
  • 61
  • 1
  • 9
1
vote
1 answer

Error upgrading Symfony 3.2 to 3.3 - console.error_listener must be public as event subscribers are lazy-loaded

After upgrading Symfony from 3.2 to 3.3 i've got the following error right after composer update on the clearCache command: PHP Fatal error: Uncaught InvalidArgumentException: The service "console.error_listener" must be public as event subscribers…
Pedro Casado
  • 1,705
  • 1
  • 21
  • 43
1
vote
1 answer

Get current logged in user in entity

I want to create some virtual properties for an entity in an n:m relation. I have an User, an Achievment and an AchievementUser entity. The value an user have in an Achievement is stored in the field value in the entity AchievementUser. User…
mgluesenkamp
  • 529
  • 6
  • 19
1
vote
1 answer

@ORM\Id does not make an identifier for an entity in symfony

I hava a class City which consists of a number of traits. /** * @ORM\Entity * @ORM\Table(name="City") * @SoftDeleteable(fieldName="deletedAt") */ class City { use IdentifiableEntity; use TimestampableEntity; } I have a trait…
hvertous
  • 1,133
  • 11
  • 25
1
vote
2 answers

Symfony 3 - Can't pass token_storage to from subscriber

I want to get current logged user in form event but for some reason I can't get it to work. I used services to inject token_storage and create constructor method to fetch token storage instance but I got error right at constructor: Type error:…
user2496520
  • 881
  • 4
  • 13
  • 36
1
vote
1 answer

Symfony: multiple routes with different parameters with default null

I am busy developping a Symfony 3 app. I need to know if it is possible to have an action which is served by 2 routes : one with 1 parameter one with 2 parameters In the first case, it would be for creating a new entity which is associated to the…
mentinet
  • 744
  • 3
  • 9
  • 23
1
vote
0 answers

FosuserBundle - How get All users loggeds using FosUserbundle?

I'm using FosUserBundle in Symfony3... I would get (or check) all users loggeds. Thanks!
PululuK
  • 113
  • 1
  • 6
1
vote
1 answer

Symfony 3.2 Multi tenant application with multiple Guard entry points

I am implementing a multi tenant application where the customer requires me to follow a specific data model. The customer required two seperate login systems that I am implementing using the guard system. The first one is used to login customers.…
Daan
  • 21
  • 3
1
vote
1 answer

Doctrine column based on two references

i have a problem with doctrine. I want to create the following classes in symfony: Device id name type Type id name attributes Attribute id name value The problem is that the value from the attribute class based on the device. So how i have to…
user6691398
1
vote
1 answer

Call static method on classes without namspaces

I have a library that don't uses namespaces but uses only static methods, how could I make it available throughout the application? I'm using Symfony 3.2
Marco
  • 2,757
  • 1
  • 19
  • 24
1
vote
0 answers

Service argument injection: "Argument 1 passed to entity constructor must be must be an instance of Entity, none given"

I'm working with forms on my Symfony 3 app. I have a ClassType created to create the form of a specific entity: public function buildForm(FormBuilderInterface $builder, array $options) { $currencies =…
aln447
  • 981
  • 2
  • 15
  • 44
1
vote
1 answer

Symfony - forms with variable number of fields

I want to create form, that serve for adding, editing (and removing when url field is empty) menu items. Problem is that the count of rows/items are variable. (As you can see on the first picture) Questions: 1)How to write a form that has variable…
J. M.
  • 35
  • 1
  • 9
1
vote
2 answers

Symfony One Application - Multiple Subdomains

i want to achieve the following in a Symfony 3 application. Lets say i have 2 restricted areas for users and admins. Users should be able to access their area on user.mydomain.com while admins should go to admin.mydomain.com. I have a question for…
user3676604